MyCapytain.endpoints.cts5 module¶
-
class
MyCapytain.endpoints.cts5.
CTS
(endpoint, inventory=None)[source]¶ Bases:
MyCapytain.endpoints.proto.CTS
Basic integration of the MyCapytain.endpoints.proto.CTS abstraction
-
call
(parameters)[source]¶ Call an endpoint given the parameters
Parameters: parameters (dict) – Dictionary of parameters Return type: text
-
getCapabilities
(inventory=None)[source]¶ Retrieve the inventory information of an API
Parameters: inventory (text) – Name of the inventory Return type: str
-
getFirstUrn
(urn, inventory=None)[source]¶ Retrieve the first passage urn of a text
Parameters: Return type:
-
getLabel
(urn, inventory=None)[source]¶ Retrieve informations about a CTS Urn
Parameters: Return type:
-
getPassage
(urn, inventory=None, context=None)[source]¶ Retrieve a passage
Parameters: - urn (text) – URN identifying the text’s passage (Minimum depth : 1)
- inventory (text) – Name of the inventory
- context (int) – Number of citation units at the same level of the citation hierarchy as the requested urn, immediately preceding and immediately following the requested urn to include in the reply
Return type:
-
getPassagePlus
(urn, inventory=None, context=None)[source]¶ Retrieve a passage and informations about it
Parameters: - urn (text) – URN identifying the text’s passage (Minimum depth : 1)
- inventory (text) – Name of the inventory
- context (int) – Number of citation units at the same level of the citation hierarchy as the requested urn, immediately preceding and immediately following the requested urn to include in the reply
Return type:
-