API Documentation
basicdweet
package basicdweet
Basic APIs of the free dweet service.
- Author: Quan Lin
- License: MIT
Classes
-
BasicDweetError
Functions
-
dweet_for — The
dweet for
API. -
get_latest_dweet_for — The
get latest dweet for
API. -
get_dweets_for — The
get dweets for
API. -
async_dweet_for — The async
dweet for
API. -
async_get_latest_dweet_for — The async
get latest dweet for
API. -
async_get_dweets_for — The async
get dweets for
API.
basicdweet.basicdweet.dweet_for
function dweet_for(thing_name: str, payload: dict, base_url: str = DEFAULT_BASE_URL, **kwargs) → dict
The dweet for
API.
Parameters
-
thing_name : str — The name of the thing to dweet.
-
payload : dict — The content of the thing to dweet. It is passed to
json.dumps
. So a dict fits it the best. -
base_url : str — The base url of the dweet server. (default is "https://dweet.io")
Returns
-
dict — The dweet transaction dict returned from dweet service. It should include the keys of
thing
,content
,created
andtransaction
.
basicdweet.basicdweet.get_latest_dweet_for
function get_latest_dweet_for(thing_name: str, base_url: str = DEFAULT_BASE_URL, **kwargs) → list
The get latest dweet for
API.
Parameters
-
thing_name : str — The name of the thing to dweet.
-
base_url : str — The base url of the dweet server. (default is "https://dweet.io")
Returns
-
list — The list of dweet transaction dicts. There is only the latest transaction dict in it.
basicdweet.basicdweet.get_dweets_for
function get_dweets_for(thing_name: str, base_url: str = DEFAULT_BASE_URL, **kwargs) → list
The get dweets for
API.
Parameters
-
thing_name : str — The name of the thing to dweet.
-
base_url : str — The base url of the dweet server. (default is "https://dweet.io")
Returns
-
list — The list of dweet transaction dicts. There are a few the latest transaction dicts in it.
basicdweet.basicdweet.async_dweet_for
function async_dweet_for(thing_name: str, payload: dict, base_url: str = DEFAULT_BASE_URL, **kwargs) → dict
The async dweet for
API.
The arguments have the same meaning as in dweet_for
.
basicdweet.basicdweet.async_get_latest_dweet_for
function async_get_latest_dweet_for(thing_name: str, base_url: str = DEFAULT_BASE_URL, **kwargs) → list
The async get latest dweet for
API.
The arguments have the same meaning as in get_latest_dweet_for
.
basicdweet.basicdweet.async_get_dweets_for
function async_get_dweets_for(thing_name: str, base_url: str = DEFAULT_BASE_URL, **kwargs) → list
The async get dweets for
API.
The arguments have the same meaning as in get_dweets_for
.