# Module: environment-variables

Source:
  - resource/models/environment-variables.js, line 2

### Methods

#### (static) create(applicationId, name, value, callback)

Create an environment variable for an application

##### Parameters:

Name | Type | Description
--- | --- | ---
`applicationId` | String | Number | application id
`name` | String | environment variable name
`value` | String | environment variable value
`callback` | module:resin.models.environment-variables~createCallback | callback

Source:
  - models/environment-variables.js, line 84

##### Example

    resin.models.environmentVariables.create 91, 'EDITOR', 'vim', (error) ->
    		throw error if error?

#### (static) create(applicationId, name, value, callback)

Create an environment variable for an application

##### Parameters:

Name | Type | Description
--- | --- | ---
`applicationId` | String | Number | application id
`name` | String | environment variable name
`value` | String | environment variable value
`callback` | module:resin.models.environment-variables~createCallback | callback

Source:
  - resource/models/environment-variables.js, line 84

##### Example

    resin.models.environmentVariables.create 91, 'EDITOR', 'vim', (error) ->
    		throw error if error?

#### (static) getAllByApplication(applicationId, callback)

Get all environment variables by application

##### Parameters:

Name | Type | Description
--- | --- | ---
`applicationId` | String | Number | application id
`callback` | module:resin.models.environment-variables~getAllByApplicationCallback | callback

Source:
  - models/environment-variables.js, line 44

##### Example

    resin.models.environmentVariables.getAll (error, environmentVariables) ->
    		throw error if error?
    		console.log(environmentVariables)

#### (static) getAllByApplication(applicationId, callback)

Get all environment variables by application

##### Parameters:

Name | Type | Description
--- | --- | ---
`applicationId` | String | Number | application id
`callback` | module:resin.models.environment-variables~getAllByApplicationCallback | callback

Source:
  - resource/models/environment-variables.js, line 44

##### Example

    resin.models.environmentVariables.getAll (error, environmentVariables) ->
    		throw error if error?
    		console.log(environmentVariables)

#### (static) isSystemVariable(variable) → {Boolean}

Check is a variable is system specific

##### Parameters:

Name | Type | Description
--- | --- | ---
`variable` | EnvironmentVariable | environment variable

Source:
  - resource/models/environment-variables.js, line 173

##### Returns:

Whether a variable is system specific or not

Type
  Boolean

##### Examples

    resin.models.environmentVariables.isSystemVariable('RESIN_SUPERVISOR')
    > true

    resin.models.environmentVariables.isSystemVariable('EDITOR')
    > false

#### (static) isSystemVariable(variable) → {Boolean}

Check is a variable is system specific

##### Parameters:

Name | Type | Description
--- | --- | ---
`variable` | EnvironmentVariable | environment variable

Source:
  - models/environment-variables.js, line 173

##### Returns:

Whether a variable is system specific or not

Type
  Boolean

##### Examples

    resin.models.environmentVariables.isSystemVariable('RESIN_SUPERVISOR')
    > true

    resin.models.environmentVariables.isSystemVariable('EDITOR')
    > false

#### (static) remove(id, callback)

Remove environment variable

##### Parameters:

Name | Type | Description
--- | --- | ---
`id` | String | Number | environment variable id
`callback` | module:resin.models.environment-variables~removeCallback | callback

Source:
  - resource/models/environment-variables.js, line 148

##### Example

    resin.models.environmentVariables.remove 51, (error) ->
    		throw error if error?

#### (static) remove(id, callback)

Remove environment variable

##### Parameters:

Name | Type | Description
--- | --- | ---
`id` | String | Number | environment variable id
`callback` | module:resin.models.environment-variables~removeCallback | callback

Source:
  - models/environment-variables.js, line 148

##### Example

    resin.models.environmentVariables.remove 51, (error) ->
    		throw error if error?

#### (static) update(applicationId, value, callback)

Update an environment variable value from an application

##### Parameters:

Name | Type | Description
--- | --- | ---
`applicationId` | String | Number | application id
`value` | String | environment variable value
`callback` | module:resin.models.environment-variables~updateCallback | callback

Source:
  - models/environment-variables.js, line 117

##### Example

    resin.models.environmentVariables.update 317, 'vim', (error) ->
    		throw error if error?

#### (static) update(applicationId, value, callback)

Update an environment variable value from an application

##### Parameters:

Name | Type | Description
--- | --- | ---
`applicationId` | String | Number | application id
`value` | String | environment variable value
`callback` | module:resin.models.environment-variables~updateCallback | callback

Source:
  - resource/models/environment-variables.js, line 117

##### Example

    resin.models.environmentVariables.update 317, 'vim', (error) ->
    		throw error if error?

### Type Definitions

#### EnvironmentVariable

A Resin API environment variable

##### Type:

- Object

Source:
  - models/environment-variables.js, line 16

#### EnvironmentVariable

A Resin API environment variable

##### Type:

- Object

Source:
  - resource/models/environment-variables.js, line 16

Source:
  - models/environment-variables.js, line 2

### Methods

#### (static) create(applicationId, name, value, callback)

Create an environment variable for an application

##### Parameters:

Name | Type | Description
--- | --- | ---
`applicationId` | String | Number | application id
`name` | String | environment variable name
`value` | String | environment variable value
`callback` | module:resin.models.environment-variables~createCallback | callback

Source:
  - models/environment-variables.js, line 84

##### Example

    resin.models.environmentVariables.create 91, 'EDITOR', 'vim', (error) ->
    		throw error if error?

#### (static) create(applicationId, name, value, callback)

Create an environment variable for an application

##### Parameters:

Name | Type | Description
--- | --- | ---
`applicationId` | String | Number | application id
`name` | String | environment variable name
`value` | String | environment variable value
`callback` | module:resin.models.environment-variables~createCallback | callback

Source:
  - resource/models/environment-variables.js, line 84

##### Example

    resin.models.environmentVariables.create 91, 'EDITOR', 'vim', (error) ->
    		throw error if error?

#### (static) getAllByApplication(applicationId, callback)

Get all environment variables by application

##### Parameters:

Name | Type | Description
--- | --- | ---
`applicationId` | String | Number | application id
`callback` | module:resin.models.environment-variables~getAllByApplicationCallback | callback

Source:
  - models/environment-variables.js, line 44

##### Example

    resin.models.environmentVariables.getAll (error, environmentVariables) ->
    		throw error if error?
    		console.log(environmentVariables)

#### (static) getAllByApplication(applicationId, callback)

Get all environment variables by application

##### Parameters:

Name | Type | Description
--- | --- | ---
`applicationId` | String | Number | application id
`callback` | module:resin.models.environment-variables~getAllByApplicationCallback | callback

Source:
  - resource/models/environment-variables.js, line 44

##### Example

    resin.models.environmentVariables.getAll (error, environmentVariables) ->
    		throw error if error?
    		console.log(environmentVariables)

#### (static) isSystemVariable(variable) → {Boolean}

Check is a variable is system specific

##### Parameters:

Name | Type | Description
--- | --- | ---
`variable` | EnvironmentVariable | environment variable

Source:
  - resource/models/environment-variables.js, line 173

##### Returns:

Whether a variable is system specific or not

Type
  Boolean

##### Examples

    resin.models.environmentVariables.isSystemVariable('RESIN_SUPERVISOR')
    > true

    resin.models.environmentVariables.isSystemVariable('EDITOR')
    > false

#### (static) isSystemVariable(variable) → {Boolean}

Check is a variable is system specific

##### Parameters:

Name | Type | Description
--- | --- | ---
`variable` | EnvironmentVariable | environment variable

Source:
  - models/environment-variables.js, line 173

##### Returns:

Whether a variable is system specific or not

Type
  Boolean

##### Examples

    resin.models.environmentVariables.isSystemVariable('RESIN_SUPERVISOR')
    > true

    resin.models.environmentVariables.isSystemVariable('EDITOR')
    > false

#### (static) remove(id, callback)

Remove environment variable

##### Parameters:

Name | Type | Description
--- | --- | ---
`id` | String | Number | environment variable id
`callback` | module:resin.models.environment-variables~removeCallback | callback

Source:
  - resource/models/environment-variables.js, line 148

##### Example

    resin.models.environmentVariables.remove 51, (error) ->
    		throw error if error?

#### (static) remove(id, callback)

Remove environment variable

##### Parameters:

Name | Type | Description
--- | --- | ---
`id` | String | Number | environment variable id
`callback` | module:resin.models.environment-variables~removeCallback | callback

Source:
  - models/environment-variables.js, line 148

##### Example

    resin.models.environmentVariables.remove 51, (error) ->
    		throw error if error?

#### (static) update(applicationId, value, callback)

Update an environment variable value from an application

##### Parameters:

Name | Type | Description
--- | --- | ---
`applicationId` | String | Number | application id
`value` | String | environment variable value
`callback` | module:resin.models.environment-variables~updateCallback | callback

Source:
  - models/environment-variables.js, line 117

##### Example

    resin.models.environmentVariables.update 317, 'vim', (error) ->
    		throw error if error?

#### (static) update(applicationId, value, callback)

Update an environment variable value from an application

##### Parameters:

Name | Type | Description
--- | --- | ---
`applicationId` | String | Number | application id
`value` | String | environment variable value
`callback` | module:resin.models.environment-variables~updateCallback | callback

Source:
  - resource/models/environment-variables.js, line 117

##### Example

    resin.models.environmentVariables.update 317, 'vim', (error) ->
    		throw error if error?

### Type Definitions

#### EnvironmentVariable

A Resin API environment variable

##### Type:

- Object

Source:
  - models/environment-variables.js, line 16

#### EnvironmentVariable

A Resin API environment variable

##### Type:

- Object

Source:
  - resource/models/environment-variables.js, line 16