Class GCEImages (5.0.0)

Package

gce-images

Constructors

(constructor)(config)

  constructor 
 ( 
 config 
 ?: 
  
 GCEImagesConfig 
  
 | 
  
 AuthOptions 
 ); 
 

Constructs a new instance of the GCEImages class

Parameter
Name
Description
config
GCEImagesConfig | AuthOptions

Properties

OS_TO_URL

  OS_TO_URL 
 : 
  
 { 
  
 [ 
 index 
 : 
  
 string 
 ] 
 : 
  
 string 
 ; 
  
 }; 
 

OS_URLS

  OS_URLS 
 : 
  
 OSUrls 
 ; 
 

Methods

_filterDeprecated(image)

  _filterDeprecated 
 ( 
 image 
 : 
  
 Image 
 ) 
 : 
  
 boolean 
 ; 
 
Parameter
Name
Description
image
Returns
Type
Description
boolean

_getAllByOS(options)

  _getAllByOS 
 ( 
 options 
 : 
  
 GetOptions 
 & 
 { 
  
 osNames 
 : 
  
 string 
 []; 
  
 }) 
 : 
  
 Promise<Image 
 []>; 
 
Parameter
Name
Description
options
GetOptions & { osNames: string[]; }
Returns
Type
Description
Promise < Image []>

_parseArguments(options, callback)

  _parseArguments<O 
 , 
  
 C 
> ( 
 options 
 : 
  
 any 
 , 
  
 callback 
 : 
  
 any 
 ) 
 : 
  
 ParsedArguments<O 
 , 
  
 C 
> ; 
 
Parameters
Name
Description
options
any
callback
any
Returns
Type
Description
ParsedArguments <O, C>
Type Parameters
Name
Description
O
C

_parseOsInput(os)

  _parseOsInput 
 ( 
 os 
 : 
  
 string 
 ) 
 : 
  
 { 
  
 name 
 : 
  
 string 
 ; 
  
 version 
 : 
  
 string 
 ; 
  
 url 
 : 
  
 string 
 ; 
  
 }; 
 
Parameter
Name
Description
os
string
Returns
Type
Description
{ name: string; version: string; url: string; }

_sortNewestFirst(imageA, imageB)

  _sortNewestFirst 
 ( 
 imageA 
 : 
  
 Image 
 , 
  
 imageB 
 : 
  
 Image 
 ) 
 : 
  
 0 
  
 | 
  
 1 
  
 | 
  
 - 
 1 
 ; 
 
Parameters
Name
Description
imageA
imageB
Returns
Type
Description
0 | 1 | -1

getAll(cb)

  getAll 
 ( 
 cb 
 : 
  
 GetAllCallback 
 ) 
 : 
  
 void 
 ; 
 

Get all available images.

Parameter
Name
Description
Returns
Type
Description
void

{Promise} if callback is omitted.

getAll(opts)

  getAll 
 ( 
 opts 
 ?: 
  
 GetOptions 
  
 | 
  
 string 
 ) 
 : 
  
 Promise<Image 
 [] 
  
 | 
  
 ImagesMap 
> ; 
 
Parameter
Name
Description
opts
GetOptions | string
Returns
Type
Description
Promise < Image [] | ImagesMap >

getAll(opts, cb)

  getAll 
 ( 
 opts 
 : 
  
 GetOptions 
  
 | 
  
 string 
 , 
  
 cb 
 : 
  
 GetAllCallback 
 ) 
 : 
  
 void 
 ; 
 
Parameters
Name
Description
opts
GetOptions | string
Returns
Type
Description
void

getLatest(cb)

  getLatest 
 ( 
 cb 
 : 
  
 GetLatestCallback 
 ) 
 : 
  
 void 
 ; 
 

Get all available images, but only return the newest one.

Parameter
Name
Description
Returns
Type
Description
void

{Promise} if callback is omitted.

getLatest(opts)

  getLatest 
 ( 
 opts 
 ?: 
  
 GetOptions 
  
 | 
  
 string 
 ) 
 : 
  
 Promise<Image 
  
 | 
  
 ImageMap 
> ; 
 
Parameter
Name
Description
opts
GetOptions | string
Returns
Type
Description
Promise < Image | ImageMap >

getLatest(opts, cb)

  getLatest 
 ( 
 opts 
 : 
  
 GetOptions 
  
 | 
  
 string 
 , 
  
 cb 
 : 
  
 GetLatestCallback 
 ) 
 : 
  
 void 
 ; 
 
Parameters
Name
Description
opts
GetOptions | string
Returns
Type
Description
void

getProjectId()

  getProjectId 
 () 
 : 
  
 Promise<string> 
 ; 
 
Returns
Type
Description
Promise <string>
Design a Mobile Site
View Site in Mobile | Classic
Share by: