Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

  • IOTileCloud

Index

Constructors

constructor

Properties

Private Config

Config: any

Private Optional _server

Private event

event: BlockingEvent

inProgressConnections

inProgressConnections: number

initialized

initialized: Promise<void>

Accessors

server

server:

Methods

Org

  • Org(item: any): Org

Project

checkClaimable

  • checkClaimable(data: any): Promise<__type | __type[]>

claimDevice

  • claimDevice(deviceSlug: string, projectID: string): Promise<void>

createOrg

  • createOrg(name: string, about: string): Promise<any>

createProject

  • createProject(orgSlug: string, name: string): Promise<string>

createStream

  • createStream(variable: string, dataLabel: string): Promise<__type | __type[]>

createVariable

  • createVariable(name: string, project: string, lid: number): Promise<any>

defaultServer

Private deleteFromServer

  • deleteFromServer(uri: string, headers?: undefined | __type): Promise<__type | Array<__type>>

deleteStream

  • deleteStream(streamSlug: string): Promise<Stream>

fetchAcknowledgements

  • fetchAcknowledgements(deviceSlug?: undefined | string): Promise<StreamerAck[]>

fetchAllDevices

  • fetchAllDevices(): Promise<Device[]>
  • ngdoc

    method

    name

    iotile.cloud.service:IOTileCloud#fetchAllDevices

    methodof

    iotile.cloud.service:IOTileCloud

    description

    Fetches all available devices from the IOTile Cloud.

    This is an async method!

    Returns an array of Device objects with all devices retrieved.

    example
    // Get an array of all devices available
    var devices = await IOTileCloud.fetchAllDevices();
    console.log("Found " + devices.length + " IOTile Devices!");
    

    Returns Promise<Device[]>

    A list of the IOTile devices.

fetchAllProjectTemplates

  • ngdoc

    method

    name

    iotile.cloud.service:IOTileCloud#fetchAllProjectTemplates

    methodof

    iotile.cloud.service:IOTileCloud

    description

    Fetches all available project templates from the IOTile Cloud.

    This is an async method!

    Returns an array of ProjectTemplate objects with all project templates retrieved.

    example
    // Get an array of all project templates available
    var project_templates = await IOTileCloud.fetchAllProjectTemplates();
    console.log("Found " + project_templates.length + " IOTile ProjectTemplates!");
    

    Returns Promise<ProjectTemplate[]>

    A list of the IOTile project templates.

fetchAllPropertyTemplates

  • ngdoc

    method

    name

    iotile.cloud.service:IOTileCloud#fetchAllPropertyTemplates

    methodof

    iotile.cloud.service:IOTileCloud

    description

    Fetches all available property templates from the IOTile Cloud.

    This is an async method!

    Returns an array of PropertyTemplate objects with all property templates retrieved.

    example
    // Get an array of all property templates available
    var property_templates = await IOTileCloud.fetchAllPropertyTemplates();
    console.log("Found " + property_templates.length + " IOTile PropertyTemplates!");
    

    Returns Promise<PropertyTemplate[]>

    A list of the IOTile property templates.

fetchAllStreams

  • fetchAllStreams(): Promise<Stream[]>
  • ngdoc

    method

    name

    iotile.cloud.service:IOTileCloud#fetchAllStreams

    methodof

    iotile.cloud.service:IOTileCloud

    description

    Fetches all available streams from the IOTile Cloud.

    This is an async method!

    Returns an array of Stream objects with all streams retrieved.

    example
    // Get an array of all streams available
    var streams = await IOTileCloud.fetchAllStreams();
    console.log("Found " + streams.length + " IOTile Streams!");
    

    Returns Promise<Stream[]>

    A list of the IOTile streams.

fetchAllVarTypes

  • fetchAllVarTypes(): Promise<VarType[]>
  • ngdoc

    method

    name

    iotile.cloud.service:IOTileCloud#fetchAllVarTypes

    methodof

    iotile.cloud.service:IOTileCloud

    description

    Fetches all available vartypes from the IOTile Cloud.

    This is an async method!

    Returns an array of VarType objects with all vartypes retrieved.

    example
    // Get an array of all vartypes available
    var vartypes = await IOTileCloud.fetchAllVarTypes();
    console.log("Found " + vartypes.length + " IOTile VarTypes!");
    

    Returns Promise<VarType[]>

    A list of the IOTile vartypes.

fetchAllVariables

  • fetchAllVariables(): Promise<Variable[]>
  • ngdoc

    method

    name

    iotile.cloud.service:IOTileCloud#fetchAllVariables

    methodof

    iotile.cloud.service:IOTileCloud

    description

    Fetches all available variables from the IOTile Cloud.

    This is an async method!

    Returns an array of Variable objects with all variables retrieved.

    example
    // Get an array of all variables available
    var variables = await IOTileCloud.fetchAllVariables();
    console.log("Found " + variables.length + " IOTile Variables!");
    

    Returns Promise<Variable[]>

    A list of the IOTile variables.

fetchDevice

  • fetchDevice(deviceSlug: string): Promise<Device>
  • ngdoc

    method

    name

    iotile.cloud.service:IOTileCloud#fetchDevice

    methodof

    iotile.cloud.service:IOTileCloud

    description

    Fetches a specific device from the IOTile Cloud.

    This is an async method!

    Returns a Device object with the device requested.

    example
    // Get a device object for device with slug: devSlug
    var device = await IOTileCloud.fetchDevice(devSlug);
    console.log("Found device with label: " + device.label);
    

    Parameters

    • deviceSlug: string

      The slug property of the device that will be fetched.

    Returns Promise<Device>

    An IOTile Device.

Private fetchFromServer

  • fetchFromServer(uri: string, headers?: undefined | __type): Promise<__type | Array<__type>>

fetchOrgMembership

  • ngdoc

    method

    name

    iotile.cloud.service:IOTileCloud#fetchOrgMembership

    methodof

    iotile.cloud.service:IOTileCloud

    description

    Fetches user membership information from a given Org

    This is an async method!

    Returns a Membership object: the user's membership information for the given Org

    example
    // Get membership information for org
    var membership = await IOTileCloud.fetchOrgMembership(org.slug);
    

    Parameters

    Returns Promise<Membership>

    The membership information of the User in the given Org

fetchOrgMetaData

  • ngdoc

    method

    name

    iotile.cloud.service:IOTileCloud#fetchOrgList

    methodof

    iotile.cloud.service:IOTileCloud

    description

    Fetches a list of OrgMetaData objects with the names and ids of all projects in all orgs.

    This is an async method!

    Returns an array of OrgMetaData objects with all organizations retrieved.

    Returns Promise<OrgMetaData[]>

fetchOrgs

  • fetchOrgs(): Promise<Org[]>
  • ngdoc

    method

    name

    iotile.cloud.service:IOTileCloud#fetchOrgs

    methodof

    iotile.cloud.service:IOTileCloud

    description

    Fetches all available organizations from the IOTile Cloud.

    This is an async method!

    Returns an array of Org objects with all organizations retrieved.

    example
    // Get an array of all orgs available
    var orgs = await IOTileCloud.fetchOrgs();
    console.log("Found " + orgs.length + " IOTile Orgs!");
    

    Returns Promise<Org[]>

    A list of the IOTile organizations.

fetchProject

  • fetchProject(projectID: string): Promise<Project>
  • ngdoc

    method

    name

    iotile.cloud.service:IOTileCloud#fetchProject

    methodof

    iotile.cloud.service:IOTileCloud

    description

    Fetches a single project from the IOTile Cloud.

    This is an async method!

    Returns a Project object

    example
    // Get an array of all projects available
    var projects = await IOTileCloud.fetchProjects();
    console.log("Found " + projects.length + " IOTile Projects!");
    

    Parameters

    • projectID: string

    Returns Promise<Project>

    A list of the IOTile projects.

fetchProjectDevices

  • fetchProjectDevices(projectId: string): Promise<Device[]>
  • ngdoc

    method

    name

    iotile.cloud.service:IOTileCloud#fetchProjectDevices

    methodof

    iotile.cloud.service:IOTileCloud

    description

    Fetches all devices for a given project from the IOTile Cloud.

    This is an async method!

    Returns an array of Device objects with all devices retrieved.

    example
    // Get an array of all devices available for project with ID: projId
    var projDevices = await IOTileCloud.fetchProjectDevices(projId);
    console.log("Found " + projDevices.length + " IOTile Devices!");
    

    Parameters

    • projectId: string

      The id property of the project object that devices will be fetched from.

    Returns Promise<Device[]>

    A list of the IOTile devices.

fetchProjectStreams

  • fetchProjectStreams(projectId: string, virtual?: undefined | true | false): Promise<Stream[]>
  • ngdoc

    method

    name

    iotile.cloud.service:IOTileCloud#fetchProjectStreams

    methodof

    iotile.cloud.service:IOTileCloud

    description

    Fetches all streams for a given project from the IOTile Cloud.

    This is an async method!

    Returns an array of Stream objects with all streams retrieved.

    example
    // Get an array of all streams available for project with ID: projId
    var projStreams = await IOTileCloud.fetchProjectStreams(projId);
    console.log("Found " + projStreams.length + " IOTile Streams!");
    

    Parameters

    • projectId: string

      The id property of the project object that streams will be fetched from.

    • Optional virtual: undefined | true | false

    Returns Promise<Stream[]>

    A list of the IOTile streams.

fetchProjectVariables

  • fetchProjectVariables(projectId: string): Promise<Variable[]>
  • ngdoc

    method

    name

    iotile.cloud.service:IOTileCloud#fetchProjectVariables

    methodof

    iotile.cloud.service:IOTileCloud

    description

    Fetches all variables for a given project from the IOTile Cloud.

    This is an async method!

    Returns an array of Variable objects with all variables retrieved.

    example
    // Get an array of all variables available for project with ID: projId
    var projVariables = await IOTileCloud.fetchProjectVariables(projId);
    console.log("Found " + projVariables.length + " IOTile Variables!");
    

    Parameters

    • projectId: string

      The id property of the project object that variables will be fetched from.

    Returns Promise<Variable[]>

    A list of the IOTile variables.

fetchProjects

  • fetchProjects(): Promise<Project[]>
  • ngdoc

    method

    name

    iotile.cloud.service:IOTileCloud#fetchProjects

    methodof

    iotile.cloud.service:IOTileCloud

    description

    Fetches all available projects from the IOTile Cloud.

    This is an async method!

    Returns an array of Project objects with all projects retrieved.

    example
    // Get an array of all projects available
    var projects = await IOTileCloud.fetchProjects();
    console.log("Found " + projects.length + " IOTile Projects!");
    

    Returns Promise<Project[]>

    A list of the IOTile projects.

fetchProperties

  • fetchProperties(deviceSlug: string): Promise<Property[]>
  • ngdoc

    method

    name

    iotile.cloud.service:IOTileCloud#fetchProperties

    methodof

    iotile.cloud.service:IOTileCloud

    description

    Fetches properties for a given target from the IOTile Cloud.

    This is an async method!

    Returns a Property object for the target requested.

    example
    // Get the Properties for a target with slug: slug
    var properties = await IOTileCloud.fetchProperties(slug);
    

    Parameters

    • deviceSlug: string

      The slug property of the device for which the property is associated.

    Returns Promise<Property[]>

    An IOTile Property.

fetchSensorGraphs

fetchStream

  • fetchStream(streamSlug: string): Promise<Stream>
  • ngdoc

    method

    name

    iotile.cloud.service:IOTileCloud#fetchStream

    methodof

    iotile.cloud.service:IOTileCloud

    description

    Fetches a specific stream from the IOTile Cloud.

    This is an async method!

    Returns a Stream object with the stream requested.

    example
    // Get a stream object for stream with slug: streamSlug
    var stream = await IOTileCloud.fetchStream(streamSlug);
    console.log("Found stream with slug: " + stream.slug);
    

    Parameters

    • streamSlug: string

      The slug property of the stream that will be fetched.

    Returns Promise<Stream>

    An IOTile Stream.

fetchStreamData

  • fetchStreamData(streamSlug: string): Promise<Array<DataPoint>>
  • ngdoc

    method

    name

    iotile.cloud.service:IOTileCloud#fetchStreamData

    methodof

    iotile.cloud.service:IOTileCloud

    description

    Fetches a specific stream's datapoints from the IOTile Cloud.

    This is an async method!

    Returns a list of DataPoints from the stream requested.

    example
    // Get an array of DataPoints for stream with slug: streamSlug
    var datapoints = await IOTileCloud.fetchStreamData(streamSlug);
    console.log(`Found ${datapoints.length} datapoints from stream with slug: ${stream.slug}`);
    

    Parameters

    • streamSlug: string

      The slug property of the stream that will be fetched.

    Returns Promise<Array<DataPoint>>

    An array of DataPoints.

fetchStreamer

  • fetchStreamer(streamerSlug: string): Promise<Streamer>
  • ngdoc

    method

    name

    iotile.cloud.service:IOTileCloud#fetchStreamer

    methodof

    iotile.cloud.service:IOTileCloud

    description

    Fetches a specific variable type from the IOTile Cloud.

    This is an async method!

    Returns a Streamer object with the slug requested.

    example
    // Get a Streamer object for variable with slug: streamerSlug
    var streamer = await IOTileCloud.fetchStreamer(streamerSlug);
    console.log("Found streamer with slug: " + streamer.slug);
    

    Parameters

    • streamerSlug: string

      The slug property of the streamer we're requesting.

    Returns Promise<Streamer>

    An IOTile Streamer.

fetchUserData

  • fetchUserData(token: string): Promise<User>

fetchVarType

  • fetchVarType(variableSlug: string): Promise<VarType>
  • ngdoc

    method

    name

    iotile.cloud.service:IOTileCloud#fetchVarType

    methodof

    iotile.cloud.service:IOTileCloud

    description

    Fetches a specific variable type from the IOTile Cloud.

    This is an async method!

    Returns a VarType object with the variable type requested.

    example
    // Get a VarType object for variable with slug: variableSlug
    var vartype = await IOTileCloud.fetchVarType(variableSlug);
    console.log("Found vartype with slug: " + vartype.slug);
    

    Parameters

    • variableSlug: string

      The slug property of the variable for which the vartype is associated.

    Returns Promise<VarType>

    An IOTile Variable.

fetchVariable

  • fetchVariable(variableSlug: string): Promise<Variable>
  • ngdoc

    method

    name

    iotile.cloud.service:IOTileCloud#fetchVariable

    methodof

    iotile.cloud.service:IOTileCloud

    description

    Fetches a specific variable from the IOTile Cloud.

    This is an async method!

    Returns a Variable object with the variable requested.

    example
    // Get a Variable object for variable with slug: variableSlug
    var variable = await IOTileCloud.fetchVariable(variableSlug);
    console.log("Found variable with slug: " + variable.slug);
    

    Parameters

    • variableSlug: string

      The slug property of the variable that will be fetched.

    Returns Promise<Variable>

    An IOTile Variable.

isDefault

  • isDefault(): boolean

login

  • login(email: string, password: string): Promise<User>

logout

  • logout(): Promise<void>

patchModel

  • patchModel(slug: string, patchPayload: __type): Promise<any>
  • ngdoc

    method

    name

    iotile.cloud.service:IOTileCloud#patchStream

    methodof

    iotile.cloud.service:IOTileCloud

    description

    Updates the IOTile Cloud with any changes made to a Stream object.

    This is an async method!

    Returns a promise that will resolve with the status of the http call.

    example
    // Patch our changed Stream object (streamObj) up to the cloud
    var status = await IOTileCloud.patchStream(streamObj);
    console.log("Patched stream with status: " + status.status);
    

    Parameters

    • slug: string
    • patchPayload: __type

    Returns Promise<any>

    A promise that will resolve with the http status.

postEvent

  • postEvent(stream: string, extra_data: object): Promise<void>

postFileToNote

  • postFileToNote(note_id: string, file: File): Promise<void>

postFirmwareUpgrade

  • postFirmwareUpgrade(slug: string, version: string): Promise<void>

postLocation

  • postLocation(target: string, timestamp: Date, lat: number, lon: number): Promise<void>

postNote

  • postNote(target: string, timestamp: Date, note: string): Promise<__type | __type[]>

postStreamData

  • postStreamData(streamSlug: string, type: string, value: any): Promise<__type | __type[]>

Private postToServer

  • postToServer(uri: string, data?: undefined | __type): Promise<__type | Array<__type>>

refreshToken

  • refreshToken(currentToken: string): Promise<string>

register

  • register(username: string, name: string, email: string, password1: string, password2: string): Promise<__type | __type[]>
  • Parameters

    • username: string
    • name: string
    • email: string
    • password1: string
    • password2: string

    Returns Promise<__type | __type[]>

serverList

setToken

  • setToken(token: string): void

Legend

  • Module
  • Object literal
  • Variable
  • Function
  • Function with type parameter
  • Index signature
  • Type alias
  • Enumeration
  • Enumeration member
  • Property
  • Method
  • Interface
  • Interface with type parameter
  • Constructor
  • Property
  • Method
  • Index signature
  • Class
  • Class with type parameter
  • Constructor
  • Property
  • Method
  • Accessor
  • Index signature
  • Inherited constructor
  • Inherited property
  • Inherited method
  • Inherited accessor
  • Protected property
  • Protected method
  • Protected accessor
  • Private property
  • Private method
  • Private accessor
  • Static property
  • Static method

Generated using TypeDoc