isogeo_pysdk.api.routes_datasource module¶
Isogeo API v1 - API Routes for Datasources entities
See: http://help.isogeo.com/api/complete/index.html
-
class
isogeo_pysdk.api.routes_datasource.
ApiDatasource
(api_client=None)¶ Bases:
object
Routes as methods of Isogeo API used to manipulate datasources (CSW entry-points).
-
create
(workgroup_id, datasource={'_created': None, '_id': None, '_modified': None, '_tag': None, 'enabled': None, 'lastSession': None, 'location': None, 'name': None, 'resourceCount': None, 'sessions': None}, check_exists=2)¶ Add a new datasource to a workgroup.
Parameters: - workgroup_id (str) – identifier of the owner workgroup
- check_exists (int) – check if a datasource already exists inot the workgroup:
- 0 = no check
- 1 = compare name
- 2 = compare URL (location) [DEFAULT]
Parameters: datasource (class) – Datasource model object to create Return type: Datasource
-
datasource
(workgroup_id, datasource_id)¶ Get details about a specific datasource.
Parameters: - workgroup_id (str) – identifier of the owner workgroup
- datasource_id (str) – datasource UUID
Return type:
-
delete
(workgroup_id, datasource_id)¶ Delete a datasource from Isogeo database.
Parameters: - workgroup_id (str) – identifier of the owner workgroup
- datasource_id (str) – identifier of the resource to delete
-
exists
(workgroup_id, datasource_id)¶ Check if the specified datasource exists and is available for the authenticated user.
Parameters: - workgroup_id (str) – identifier of the owner workgroup
- datasource_id (str) – identifier of the datasource to verify
Return type: bool
-
listing
(self, workgroup_id=None, include=None, caching=1)¶ Get workgroup datasources.
Parameters: - workgroup_id (str) – identifier of the owner workgroup
- include (list) – additionnal subresource to include in the response
- caching (bool) – option to cache the response
Return type: list
-
update
(workgroup_id, datasource, caching=1)¶ Update a datasource owned by a workgroup.
Parameters: - workgroup_id (str) – identifier of the owner workgroup
- datasource (class) – Datasource model object to update
- caching (bool) – option to cache the response
Return type:
-