Package restxclient :: Module restx_service :: Class RestxService
[hide private]
[frames] | no frames]

Class RestxService

source code

object --+
         |
        RestxService
Known Subclasses:

Represents information about a service of a RESTx component.

This representation can be used by clients to find out about service capabilities, but it cannot be used to actually access a service, since that operation is only allowed for resources. See also RestxAccessibleService.

Instance Methods [hide private]
 
__str__(self)
Return a string representation of this service.
source code
 
__init__(self, name, sdesc)
Create a new service representation in memomory.
source code
string
get_name(self)
Return the name of the service.
source code
string
get_description(self)
Return the description of the service.
source code
string
get_uri(self)
Return the URI of the service.
source code
dict of RestxParameter
get_all_parameters(self)
Return all parameters defined for this service.
source code
dict of RestxParameter
get_parameter(self, name)
Return one parameters of this service.
source code
list
get_positional_param_names(self)
Return list of positional parameters.
source code

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __subclasshook__

Class Variables [hide private]
  __DESC_KEY = 'desc'
  __URI_KEY = 'uri'
  __PARAMS_KEY = 'params'
  __POSITIONAL_PARAMS_KEY = 'positional_params'
  __name = None
  __description = None
  __uri = None
  __parameters = None
  __positional_params = None
Properties [hide private]
string name
Return the name of the service.
string description
Return the description of the service.
string uri
Return the URI of the service.

Inherited from object: __class__

Method Details [hide private]

__str__(self)
(Informal representation operator)

source code 

Return a string representation of this service.

Overrides: object.__str__

__init__(self, name, sdesc)
(Constructor)

source code 

Create a new service representation in memomory.

Parameters:
  • name (string) - Name of this service.
  • sdesc (dict) - Dictionary describing the service. This is the dictionary returned by the server when a component or resource is accessed.
Overrides: object.__init__

get_name(self)

source code 

Return the name of the service.

Returns: string
Name of service.

get_description(self)

source code 

Return the description of the service.

Returns: string
Description of the service.

get_uri(self)

source code 

Return the URI of the service.

Returns: string
URI of the service.

get_all_parameters(self)

source code 

Return all parameters defined for this service.

Returns: dict of RestxParameter
Dictionary of all parameters.

get_parameter(self, name)

source code 

Return one parameters of this service.

Parameters:
  • name (string) - Name of the parameter.
Returns: dict of RestxParameter
Dictionary of all parameters.

get_positional_param_names(self)

source code 

Return list of positional parameters.

The order of the parameter names in the returned list reflects the order in which values for those parameters are expected in the URI path.

Returns: list
List of names of positional parameters.

Property Details [hide private]

name

Return the name of the service.

Get Method:
get_name(self) - Return the name of the service.
Type:
string

description

Return the description of the service.

Get Method:
get_description(self) - Return the description of the service.
Type:
string

uri

Return the URI of the service.

Get Method:
get_uri(self) - Return the URI of the service.
Type:
string