wotpy.wot.dictionaries.link
Wrapper classes for link dictionaries defined in the Scripting API.
Classes
|
Communication metadata indicating where a service can be accessed by a client application. |
|
A Web link, as specified by IETF RFC 8288. |
- class wotpy.wot.dictionaries.link.FormDict(*args, **kwargs)
Bases:
WotBaseDictCommunication metadata indicating where a service can be accessed by a client application. An interaction might have more than one form.
- class Meta
Bases:
object- defaults = {'contentType': 'application/json'}
- fields = {'additionalResponses', 'contentCoding', 'contentType', 'href', 'op', 'response', 'scopes', 'security', 'subprotocol'}
- required = {'href'}
- property additional_responses
This optional term can be used if additional expected responses are possible, e.g. for error reporting. Each additional response needs to be distinguished from others in some way (for example, by specifying a protocol-specific error code), and may also have its own data schema.
- resolve_uri(base=None)
Resolves and returns the Link URI. When the href does not contain a full URL the base URI is joined with said href.
- property response
This optional term can be used if the output communication metadata differ from input metadata.
- class wotpy.wot.dictionaries.link.LinkDict(*args, **kwargs)
Bases:
WotBaseDictA Web link, as specified by IETF RFC 8288.