npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

artikcloud-js

v4.2.1

Published

JS, Node.js client for ARTIK Cloud

Downloads

8

Readme

ARTIK Cloud JavaScript SDK

npm version

This SDK helps you connect your JavaScript applications to ARTIK Cloud. The SDK exposes a number of methods to easily execute REST API calls to ARTIK Cloud.

Installation

For Node.js

npm

To publish the library as a npm, please follow the procedure in "Publishing npm packages".

Then install it via:

npm install artikcloud-js --save

git

The library is hosted at this git repository https://github.com/artikcloud/artikcloud-js then install it via:

npm install artikcloud/artikcloud-js --save

For browser

The library also works in the browser environment via npm and browserify. After following the above steps with Node.js and installing browserify with npm install -g browserify, perform the following (assuming main.js is your entry file):

browserify main.js > bundle.js

Then include bundle.js in the HTML pages.

Getting Started

Please follow the installation instruction and execute the following JS code:

var ArtikCloud = require('artikcloud-js');

var defaultClient = ArtikCloud.ApiClient.default;

// Configure OAuth2 access token for authorization: artikcloud_oauth
var artikcloud_oauth = defaultClient.authentications['artikcloud_oauth'];
artikcloud_oauth.accessToken = "YOUR ACCESS TOKEN"

var api = new ArtikCloud.DeviceTypesApi()

var deviceTypeId = "deviceTypeId_example"; // {String} deviceTypeId


var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getAvailableManifestVersions(deviceTypeId, callback);

Documentation for API Endpoints

All URIs are relative to https://api.artik.cloud/v1.1

Class | Method | HTTP request | Description ------------ | ------------- | ------------- | ------------- ArtikCloud.DeviceTypesApi | getAvailableManifestVersions | GET /devicetypes/{deviceTypeId}/availablemanifestversions | Get Available Manifest Versions ArtikCloud.DeviceTypesApi | getDeviceType | GET /devicetypes/{deviceTypeId} | Get Device Type ArtikCloud.DeviceTypesApi | getDeviceTypes | GET /devicetypes | Get Device Types ArtikCloud.DeviceTypesApi | getDeviceTypesByApplication | GET /applications/{appId}/devicetypes | Get Device Types by Application ArtikCloud.DeviceTypesApi | getLatestManifestProperties | GET /devicetypes/{deviceTypeId}/manifests/latest/properties | Get Latest Manifest Properties ArtikCloud.DeviceTypesApi | getManifestProperties | GET /devicetypes/{deviceTypeId}/manifests/{version}/properties | Get manifest properties ArtikCloud.DevicesApi | addDevice | POST /devices | Add Device ArtikCloud.DevicesApi | deleteDevice | DELETE /devices/{deviceId} | Delete Device ArtikCloud.DevicesApi | deleteDeviceToken | DELETE /devices/{deviceId}/tokens | Delete Device Token ArtikCloud.DevicesApi | getDevice | GET /devices/{deviceId} | Get Device ArtikCloud.DevicesApi | getDevicePresence | GET /devices/{deviceId}/presence | Get device presence information ArtikCloud.DevicesApi | getDeviceToken | GET /devices/{deviceId}/tokens | Get Device Token ArtikCloud.DevicesApi | updateDevice | PUT /devices/{deviceId} | Update Device ArtikCloud.DevicesApi | updateDeviceToken | PUT /devices/{deviceId}/tokens | Update Device Token ArtikCloud.DevicesManagementApi | createTasks | POST /devicemgmt/tasks | Create a new task for one or more devices ArtikCloud.DevicesManagementApi | deleteServerProperties | DELETE /devicemgmt/devices/{did}/serverproperties | Deletes a device's properties. ArtikCloud.DevicesManagementApi | getAllByDid | GET /devicemgmt/devices/{did}/tasks | Returns the list of tasks for a particular device id with optional status filter. ArtikCloud.DevicesManagementApi | getDeviceTypesInfo | GET /devicemgmt/devicetypes/{dtid} | Read a device type device management information. ArtikCloud.DevicesManagementApi | getManifestProperties | GET /devicemgmt/devicetypes/{dtid}/manifest/properties | Get a device type's device management manifest properties ArtikCloud.DevicesManagementApi | getProperties | GET /devicemgmt/devices/{did}/properties | Read a device's properties. ArtikCloud.DevicesManagementApi | getStatuses | GET /devicemgmt/tasks/{tid}/statuses | Returns the details and status of a task id and the individual statuses of each device id in the list. ArtikCloud.DevicesManagementApi | getStatusesHistory | GET /devicemgmt/tasks/{tid}/statuses/history | Returns the history of the status changes for a specific task id, or for a specific device id in that task. ArtikCloud.DevicesManagementApi | getTaskByID | GET /devicemgmt/tasks/{tid} | Returns the details and global status of a specific task id. ArtikCloud.DevicesManagementApi | getTasks | GET /devicemgmt/tasks | Returns the all the tasks for a device type. ArtikCloud.DevicesManagementApi | queryProperties | GET /devicemgmt/devices/properties | Query device properties across devices. ArtikCloud.DevicesManagementApi | updateDeviceTypesInfo | PUT /devicemgmt/devicetypes/{dtid} | Updates a device type information ArtikCloud.DevicesManagementApi | updateServerProperties | POST /devicemgmt/devices/{did}/serverproperties | Updates a device's server properties. ArtikCloud.DevicesManagementApi | updateTask | PUT /devicemgmt/tasks/{tid} | Updates a task for all devices - For now just allows changing the state to cancelled. ArtikCloud.DevicesManagementApi | updateTaskForDevice | PUT /devicemgmt/tasks/{tid}/devices/{did} | Updates a task for a specific device - For now just allows changing the state to cancelled. ArtikCloud.DevicesSharesApi | createShareForDevice | POST /devices/{deviceId}/shares | Share a device ArtikCloud.DevicesSharesApi | deleteSharingForDevice | DELETE /devices/{deviceId}/shares/{shareId} | Delete specific share of the given device id ArtikCloud.DevicesSharesApi | getAllSharesForDevice | GET /devices/{deviceId}/shares | List all shares for the given device id ArtikCloud.DevicesSharesApi | getSharingForDevice | GET /devices/{deviceId}/shares/{shareId} | Get specific share of the given device id ArtikCloud.DevicesStatusApi | getDeviceStatus | GET /devices/{deviceId}/status | Get Device Status ArtikCloud.DevicesStatusApi | getDevicesStatus | GET /devices/status | Get Devices Status ArtikCloud.DevicesStatusApi | putDeviceStatus | PUT /devices/{deviceId}/status | Update Device Status ArtikCloud.ExportApi | exportRequest | POST /messages/export | Create Export Request ArtikCloud.ExportApi | getExportHistory | GET /messages/export/history | Get Export History ArtikCloud.ExportApi | getExportResult | GET /messages/export/{exportId}/result | Get Export Result ArtikCloud.ExportApi | getExportStatus | GET /messages/export/{exportId}/status | Check Export Status ArtikCloud.MessagesApi | getAggregatesHistogram | GET /messages/analytics/histogram | Get Normalized Message Histogram ArtikCloud.MessagesApi | getFieldPresence | GET /messages/presence | Get normalized message presence ArtikCloud.MessagesApi | getLastNormalizedMessages | GET /messages/last | Get Last Normalized Message ArtikCloud.MessagesApi | getMessageAggregates | GET /messages/analytics/aggregates | Get Normalized Message Aggregates ArtikCloud.MessagesApi | getMessageSnapshots | GET /messages/snapshots | Get Message Snapshots ArtikCloud.MessagesApi | getNormalizedActions | GET /actions | Get Normalized Actions ArtikCloud.MessagesApi | getNormalizedMessages | GET /messages | Get Normalized Messages ArtikCloud.MessagesApi | sendActions | POST /actions | Send Actions ArtikCloud.MessagesApi | sendMessage | POST /messages | Send Message ArtikCloud.MonetizationApi | createPricingTiers | POST /pricing/devicetypes/{dtid}/pricingtiers | Define devicetype's pricing tiers. ArtikCloud.MonetizationApi | getPricingTiers | GET /pricing/devices/{did}/pricingtiers | Get a device's pricing tiers ArtikCloud.MonetizationApi | getThePricingTiers | GET /pricing/devicetypes/{dtid}/pricingtiers | Get devicetype's pricing tiers. ArtikCloud.MonetizationApi | getUpgradePath | GET /pricing/devices/{did}/revenueshare/upgradepath | Get upgrade path ArtikCloud.MonetizationApi | setPricingTier | PUT /pricing/devices/{did}/pricingtiers | Set a device's pricing tier ArtikCloud.RegistrationsApi | confirmUser | PUT /devices/registrations/pin | Confirm User ArtikCloud.RegistrationsApi | getRequestStatusForUser | GET /devices/registrations/{requestId}/status | Get Request Status For User ArtikCloud.RegistrationsApi | unregisterDevice | DELETE /devices/{deviceId}/registrations | Unregister Device ArtikCloud.RulesApi | createRule | POST /rules | Create Rule ArtikCloud.RulesApi | deleteRule | DELETE /rules/{ruleId} | Delete Rule ArtikCloud.RulesApi | getRule | GET /rules/{ruleId} | Get Rule ArtikCloud.RulesApi | updateRule | PUT /rules/{ruleId} | Update Rule ArtikCloud.SubscriptionsApi | createSubscription | POST /subscriptions | Create Subscription ArtikCloud.SubscriptionsApi | deleteSubscription | DELETE /subscriptions/{subId} | Delete Subscription ArtikCloud.SubscriptionsApi | getAllSubscriptions | GET /subscriptions | Get All Subscriptions ArtikCloud.SubscriptionsApi | getMessages | GET /notifications/{notifId}/messages | Get Messages ArtikCloud.SubscriptionsApi | getSubscription | GET /subscriptions/{subId} | Get Subscription ArtikCloud.SubscriptionsApi | validateSubscription | POST /subscriptions/{subId}/validate | Validate Subscription ArtikCloud.TagsApi | getTagCategories | GET /tags/categories | Get all categories ArtikCloud.TagsApi | getTagSuggestions | GET /tags/suggestions | Get tag suggestions ArtikCloud.TagsApi | getTagsByCategories | GET /tags | Get all tags of categories ArtikCloud.TokensApi | checkToken | POST /accounts/checkToken | Check Token ArtikCloud.TokensApi | refreshToken | POST /accounts/token | Refresh Token ArtikCloud.TokensApi | tokenInfo | GET /accounts/tokenInfo | Token Info ArtikCloud.UsersApi | createUserProperties | POST /users/{userId}/properties | Create User Application Properties ArtikCloud.UsersApi | deleteUserProperties | DELETE /users/{userId}/properties | Delete User Application Properties ArtikCloud.UsersApi | getSelf | GET /users/self | Get Current User Profile ArtikCloud.UsersApi | getUserDeviceTypes | GET /users/{userId}/devicetypes | Get User Device Types ArtikCloud.UsersApi | getUserDevices | GET /users/{userId}/devices | Get User Devices ArtikCloud.UsersApi | getUserProperties | GET /users/{userId}/properties | Get User application properties ArtikCloud.UsersApi | getUserRules | GET /users/{userId}/rules | Get User Rules ArtikCloud.UsersApi | listAllSharesForUser | GET /users/{userId}/shares | Get User shares ArtikCloud.UsersApi | updateUserProperties | PUT /users/{userId}/properties | Update User Application Properties ArtikCloud.WhitelistingApi | deleteVdid | DELETE /devicetypes/{dtid}/whitelist/{vdid} | Delete a vdid from the devicetype whitelist. ArtikCloud.WhitelistingApi | deleteWhitelistCertificate | DELETE /devicetypes/{dtid}/whitelist/certificates/{cid} | Delete a whitelist certificate associated with a devicetype. ArtikCloud.WhitelistingApi | enableWhitelist | PUT /devicetypes/:dtid/whitelist/enable | Enable or disble whitelist feature of a device type ArtikCloud.WhitelistingApi | getRejectedRowList | GET /devicetypes/{dtid}/whitelist/{uploadId}/rejectedRows | Get the list of rejected rows for an uploaded CSV file. ArtikCloud.WhitelistingApi | getUploadStatus | GET /devicetypes/{dtid}/whitelist/{uploadId}/status | Get the status of a uploaded CSV file. ArtikCloud.WhitelistingApi | getWhitelist | GET /devicetypes/{dtid}/whitelist | Get whitelisted vdids of a device type. ArtikCloud.WhitelistingApi | getWhitelistCertificate | GET /devicetypes/{dtid}/whitelist/certificates | Get whitelist certificate of device type. ArtikCloud.WhitelistingApi | getWhitelistStatus | GET /devicetypes/{dtid}/whitelist/status | Get the status of whitelist feature (enabled/disabled) of a device type. ArtikCloud.WhitelistingApi | uploadCSV | POST /devicetypes/{dtid}/whitelist | Upload a CSV file related to the Device Type.

Documentation for Models

Documentation for Authorization

artikcloud_oauth

  • Type: OAuth
  • Flow: implicit
  • Authorizatoin URL: https://accounts.artik.cloud/authorize
  • Scopes:
    • read:artikcloud: Read from ARTIK Cloud
    • write:artikcloud: Write from ARTIK Cloud

More about ARTIK Cloud

If you are not familiar with ARTIK Cloud, we have extensive documentation at https://developer.artik.cloud/documentation

The full ARTIK Cloud API specification can be found at https://developer.artik.cloud/documentation/api-reference/

Check out advanced sample applications at https://developer.artik.cloud/documentation/samples/

To create and manage your services and devices on ARTIK Cloud, create an account at https://developer.artik.cloud

Also see the ARTIK Cloud blog for tutorials, updates, and more: http://artik.io/blog/cloud

Licence and Copyright

Licensed under the Apache License. See LICENSE.

Copyright (c) 2017 Samsung Electronics Co., Ltd.