wotpy.protocols.coap.resources.action

CoAP resources to deal with Action interactions.

Functions

get_thing_action(server, request)

Takes a CoAP request and returns the Thing Action identified by the request arguments.

Classes

ActionResource(server[, clear_ms])

CoAP resource to invoke Actions and observe those invocations.

class wotpy.protocols.coap.resources.action.ActionResource(server, clear_ms=None)

Bases: ObservableResource

CoAP resource to invoke Actions and observe those invocations.

DEFAULT_CLEAR_MS = 300000
async add_observation(request, server_observation)

Method that decides whether to add a new observer. Observers are added for GET requests (checks for invocation status) but not for POST requests (action invocations).

async render_get(request)

Handler to check the status of an ongoing invocation.

async render_post(request)

Handler for action invocations.

async wotpy.protocols.coap.resources.action.get_thing_action(server, request)

Takes a CoAP request and returns the Thing Action identified by the request arguments.