Coder Social home page Coder Social logo

artikcloud-python's Introduction

ARTIK Cloud Python SDK

PyPI version

This SDK helps you connect your Python scripts to ARTIK Cloud. The SDK helps authenticating with ARTIK Cloud, and exposes a number of methods to easily execute REST API calls to ARTIK Cloud.

Requirements.

Python 2.7 and 3.4+

Installation & Usage

pip install

If the python package is hosted on Github, you can install directly from Github

pip install git+https://github.com//.git

(you may need to run pip with root permission: sudo pip install git+https://github.com//.git)

Then import the package:

import artikcloud 

Setuptools

Install via Setuptools.

python setup.py install --user

(or sudo python setup.py install to install the package for all users)

Then import the package:

import artikcloud

Getting Started

Please follow the installation procedure and then run the following:

import time
import artikcloud
from artikcloud.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: artikcloud_oauth
artikcloud.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = artikcloud.DeviceTypesApi()
device_type_id = 'device_type_id_example' # str | deviceTypeId

try: 
    # Get Available Manifest Versions
    api_response = api_instance.get_available_manifest_versions(device_type_id)
    pprint(api_response)
except ApiException as e:
    print "Exception when calling DeviceTypesApi->get_available_manifest_versions: %s\n" % e

Documentation for API Endpoints

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

Class Method HTTP request Description
DeviceTypesApi get_available_manifest_versions GET /devicetypes/{deviceTypeId}/availablemanifestversions Get Available Manifest Versions
DeviceTypesApi get_device_type GET /devicetypes/{deviceTypeId} Get Device Type
DeviceTypesApi get_device_types GET /devicetypes Get Device Types
DeviceTypesApi get_device_types_by_application GET /applications/{appId}/devicetypes Get Device Types by Application
DeviceTypesApi get_latest_manifest_properties GET /devicetypes/{deviceTypeId}/manifests/latest/properties Get Latest Manifest Properties
DeviceTypesApi get_manifest_properties GET /devicetypes/{deviceTypeId}/manifests/{version}/properties Get manifest properties
DevicesApi add_device POST /devices Add Device
DevicesApi delete_device DELETE /devices/{deviceId} Delete Device
DevicesApi delete_device_token DELETE /devices/{deviceId}/tokens Delete Device Token
DevicesApi get_device GET /devices/{deviceId} Get Device
DevicesApi get_device_presence GET /devices/{deviceId}/presence Get device presence information
DevicesApi get_device_token GET /devices/{deviceId}/tokens Get Device Token
DevicesApi update_device PUT /devices/{deviceId} Update Device
DevicesApi update_device_token PUT /devices/{deviceId}/tokens Update Device Token
DevicesManagementApi create_tasks POST /devicemgmt/tasks Create a new task for one or more devices
DevicesManagementApi delete_server_properties DELETE /devicemgmt/devices/{did}/serverproperties Deletes a device's properties.
DevicesManagementApi get_all_by_did GET /devicemgmt/devices/{did}/tasks Returns the list of tasks for a particular device id with optional status filter.
DevicesManagementApi get_device_types_info GET /devicemgmt/devicetypes/{dtid} Read a device type device management information.
DevicesManagementApi get_manifest_properties GET /devicemgmt/devicetypes/{dtid}/manifest/properties Get a device type's device management manifest properties
DevicesManagementApi get_properties GET /devicemgmt/devices/{did}/properties Read a device's properties.
DevicesManagementApi get_statuses 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.
DevicesManagementApi get_statuses_history 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.
DevicesManagementApi get_task_by_id GET /devicemgmt/tasks/{tid} Returns the details and global status of a specific task id.
DevicesManagementApi get_tasks GET /devicemgmt/tasks Returns the all the tasks for a device type.
DevicesManagementApi query_properties GET /devicemgmt/devices/properties Query device properties across devices.
DevicesManagementApi update_device_types_info PUT /devicemgmt/devicetypes/{dtid} Updates a device type information
DevicesManagementApi update_server_properties POST /devicemgmt/devices/{did}/serverproperties Updates a device's server properties.
DevicesManagementApi update_task PUT /devicemgmt/tasks/{tid} Updates a task for all devices - For now just allows changing the state to cancelled.
DevicesManagementApi update_task_for_device PUT /devicemgmt/tasks/{tid}/devices/{did} Updates a task for a specific device - For now just allows changing the state to cancelled.
ExportApi export_request POST /messages/export Create Export Request
ExportApi get_export_history GET /messages/export/history Get Export History
ExportApi get_export_result GET /messages/export/{exportId}/result Get Export Result
ExportApi get_export_status GET /messages/export/{exportId}/status Check Export Status
MessagesApi get_aggregates_histogram GET /messages/analytics/histogram Get Normalized Message Histogram
MessagesApi get_field_presence GET /messages/presence Get normalized message presence
MessagesApi get_last_normalized_messages GET /messages/last Get Last Normalized Message
MessagesApi get_message_aggregates GET /messages/analytics/aggregates Get Normalized Message Aggregates
MessagesApi get_message_snapshots GET /messages/snapshots Get Message Snapshots
MessagesApi get_normalized_actions GET /actions Get Normalized Actions
MessagesApi get_normalized_messages GET /messages Get Normalized Messages
MessagesApi send_actions POST /actions Send Actions
MessagesApi send_message POST /messages Send Message
RegistrationsApi confirm_user PUT /devices/registrations/pin Confirm User
RegistrationsApi get_request_status_for_user GET /devices/registrations/{requestId}/status Get Request Status For User
RegistrationsApi unregister_device DELETE /devices/{deviceId}/registrations Unregister Device
RulesApi create_rule POST /rules Create Rule
RulesApi delete_rule DELETE /rules/{ruleId} Delete Rule
RulesApi get_rule GET /rules/{ruleId} Get Rule
RulesApi update_rule PUT /rules/{ruleId} Update Rule
TagsApi get_tag_categories GET /tags/categories Get all categories
TagsApi get_tag_suggestions GET /tags/suggestions Get tag suggestions
TagsApi get_tags_by_categories GET /tags Get all tags of categories
TokensApi check_token POST /accounts/checkToken Check Token
TokensApi refresh_token POST /accounts/token Refresh Token
TokensApi token_info GET /accounts/tokenInfo Token Info
UsersApi create_user_properties POST /users/{userId}/properties Create User Application Properties
UsersApi delete_user_properties DELETE /users/{userId}/properties Delete User Application Properties
UsersApi get_self GET /users/self Get Current User Profile
UsersApi get_user_device_types GET /users/{userId}/devicetypes Get User Device Types
UsersApi get_user_devices GET /users/{userId}/devices Get User Devices
UsersApi get_user_properties GET /users/{userId}/properties Get User application properties
UsersApi get_user_rules GET /users/{userId}/rules Get User Rules
UsersApi update_user_properties PUT /users/{userId}/properties Update User Application Properties

Documentation For Models

Documentation For Authorization

artikcloud_oauth

Usage

Peek into tests for examples about how to use the SDK.

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

License and Copyright

Licensed under the Apache License. See LICENSE.

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

artikcloud-python's People

Contributors

imrehg avatar jjue avatar luisgabrielroldan avatar taroface avatar yujingwu avatar

Stargazers

 avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.