File: application.coffee

Defined in: lib/resin/models

Method Summary

Method Details

~ (void) getAll(callback)

Get all applications

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

Parameters:

  • callback ( Function ) callback(error, applications)

Throws:

  • ( NotAny ) — Will throw if no applications were found

~ (void) get(id, callback)

Get a single application

resin.models.application.get 51, (error, application) ->    throw error if error?    console.log(application)

Parameters:

  • id ( String, Number ) application id
  • callback ( Function ) callback(error, application)

Throws:

  • ( NotFound ) — Will throw if application was not found

~ (void) create(name, deviceType, callback)

Create an application

resin.models.application.create 'My App', 'raspberry-pi', (error, id) ->    throw error if error?    console.log(id)

Parameters:

  • name ( String ) application name
  • deviceType ( String ) device type (slug form)
  • callback ( Function ) callback(error, id)

Throws:

  • ( NotFound ) — Will throw if the request doesn't returns an id

~ (void) remove(id, callback)

Remove application

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

Parameters:

  • id ( String, Number ) application id
  • callback ( Function ) callback(error)

~ (void) restart(id, callback)

Restart application

resin.models.application.restart 51, (error) ->    throw error if error?

Parameters:

  • id ( String, Number ) application id
  • callback ( Function ) callback(error)

    Quickly fuzzy find classes, mixins, methods, file:

    Control the navigation frame:

    You can focus and blur the search input: