isogeo_pysdk.api.routes_specification module
Isogeo API v1 - API Routes for Specifications entities
See: http://help.isogeo.com/api/complete/index.html
- class isogeo_pysdk.api.routes_specification.ApiSpecification(api_client=None)
Bases:
object
Routes as methods of Isogeo API used to manipulate specifications.
- associate_metadata(metadata, specification, conformity=0)
Associate a specification (specification + conformity) to a metadata. When a specification is associated to a metadata, it becomes a ResourceConformity object.
If the specified specification is already associated, the API responses is still a 200.
- Parameters
metadata (Metadata) – metadata object to update
specification (Specification) – specification model object to associate
conformity (bool) – indicates whether the dataset is compliant
- Example
>>> # retrieve objects to be associated >>> md = isogeo.metadata.get( metadata_id=my_metadata_uuid, include=['specifications'] ) >>> spec = isogeo.specification.get(my_specification_uuid) >>> # associate them >>> isogeo.specification.associate_metadata( metadata=md, specification=spec, conformity=1 )
- Return type
- create(workgroup_id, check_exists=1, specification={'_abilities': None, '_id': None, '_tag': None, 'count': None, 'link': None, 'name': None, 'owner': None, 'published': None}, caching=1)
Add a new specification to a workgroup.
- Parameters
0 = no check
1 = compare name [DEFAULT]
- Parameters
specification (class) – Specification model object to create
caching (bool) – option to cache the response
- Return type
- delete(workgroup_id, specification_id)
Delete a specification from Isogeo database.
- dissociate_metadata(metadata, specification_id)
Removes the association between a metadata and a specification.
If the specified specification is not associated, the response is 404.
- Parameters
metadata (Metadata) – metadata object to update
specification_id (Specification) – specification model object to associate
- Return type
- exists(specification_id)
Check if the specified specification exists and is available for the authenticated user.
- get(specification_id)
Get a specification.
- Parameters
specification_id (str) – specification UUID
- Return type
- listing(workgroup_id=None, include=('_abilities', 'count'), caching=1)
Get workgroup specifications.