MyCapytain.endpoints.proto module¶
-
class
MyCapytain.endpoints.proto.
API
(endpoint)[source]¶ Bases:
object
API Prototype object
Parameters: Variables: endpoint – Url of the endpoint
-
class
MyCapytain.endpoints.proto.
Ahab
(endpoint)[source]¶ Bases:
MyCapytain.endpoints.proto.API
Abstract Capitains Ahab API See : http://capitains.github.io/pages/ahab.html
-
class
MyCapytain.endpoints.proto.
CTS
(endpoint)[source]¶ Bases:
MyCapytain.endpoints.proto.API
CTS API Endpoint Prototype
-
getCapabilities
(inventory)[source]¶ Retrieve the inventory information of an API
Parameters: inventory (text) – Name of the inventory Return type: str
-
getFirstUrn
(urn, inventory)[source]¶ Retrieve the first passage urn of a text
Parameters: Return type:
-
getPassage
(urn, inventory, 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, 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:
-