WoTPy
  • Protocol Bindings
  • Authentication Mechanisms
  • API Reference
    • wotpy.codecs
    • wotpy.protocols
    • wotpy.utils
    • wotpy.wot
      • wotpy.wot.consumed
      • wotpy.wot.dictionaries
        • wotpy.wot.dictionaries.base
        • wotpy.wot.dictionaries.filter
        • wotpy.wot.dictionaries.interaction
        • wotpy.wot.dictionaries.link
        • wotpy.wot.dictionaries.schema
        • wotpy.wot.dictionaries.security
        • wotpy.wot.dictionaries.thing
        • wotpy.wot.dictionaries.version
      • wotpy.wot.exposed
      • wotpy.wot.constants
      • wotpy.wot.enums
      • wotpy.wot.events
      • wotpy.wot.form
      • wotpy.wot.interaction
      • wotpy.wot.servient
      • wotpy.wot.td
      • wotpy.wot.thing
      • wotpy.wot.validation
      • wotpy.wot.wot
WoTPy
  • API Reference
  • wotpy.wot
  • wotpy.wot.dictionaries
  • wotpy.wot.dictionaries.link
  • View page source

wotpy.wot.dictionaries.link

Wrapper classes for link dictionaries defined in the Scripting API.

Classes

FormDict(*args, **kwargs)

Communication metadata indicating where a service can be accessed by a client application.

LinkDict(*args, **kwargs)

A Web link, as specified by IETF RFC 8288.

class wotpy.wot.dictionaries.link.FormDict(*args, **kwargs)

Bases: WotBaseDict

Communication 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: WotBaseDict

A Web link, as specified by IETF RFC 8288.

class Meta

Bases: object

fields = {'anchor', 'href', 'hreflang', 'rel', 'sizes', 'type'}
required = {'href'}
Previous Next

© Copyright 2018, Fundacion CTIC.

Built with Sphinx using a theme provided by Read the Docs.