Skip to content

xopenapi/worth-open-api-py

Repository files navigation

worth

worth open api

This Python package is automatically generated by the OpenAPI Generator project:

  • API version: 1.0.0
  • Package version: 1.0.0
  • Build package: org.openapitools.codegen.languages.PythonClientCodegen

Requirements.

Python 2.7 and 3.4+

Installation & Usage

pip install

If the python package is hosted on a repository, you can install directly using:

pip install git+https://github.com/xopenapi/worth-open-api-py.git

(you may need to run pip with root permission: sudo pip install git+https://github.com/xopenapi/worth-open-api-py.git)

Then import the package:

import worth

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 worth

Getting Started

Please follow the installation procedure and then run the following:

from __future__ import print_function

import time
import worth
from worth.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to https://iot.worthcloud.net
# See configuration.py for a list of all supported configuration parameters.
configuration = worth.Configuration(
    host = "https://iot.worthcloud.net"
)



# Enter a context with an instance of the API client
with worth.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = worth.AuthenticatorApi(api_client)
    access_key = 'access_key_example' # str | access_key
secret_key = 'secret_key_example' # str | secret_key

    try:
        # 生成token
        api_response = api_instance.gen_token(access_key, secret_key)
        pprint(api_response)
    except ApiException as e:
        print("Exception when calling AuthenticatorApi->gen_token: %s\n" % e)
    

Documentation for API Endpoints

All URIs are relative to https://iot.worthcloud.net

Class Method HTTP request Description
AuthenticatorApi gen_token GET /v1/authenticator/{access_key}/{secret_key} 生成token
DeviceApi send_action POST /v1/devices/send_action 发送指令

Documentation For Models

Documentation For Authorization

All endpoints do not require authorization.

Author

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors