isogeo_pysdk.api.routes_license module
Isogeo API v1 - API Routes for Licenses (= CGUs, conditions) entities
See: http://help.isogeo.com/api/complete/index.html
- class isogeo_pysdk.api.routes_license.ApiLicense(api_client=None)
Bases:
object
Routes as methods of Isogeo API used to manipulate licenses (conditions).
- associate_metadata(metadata, license, description, force=0)
Associate a condition (license + specific description) to a metadata. When a license is associated to a metadata, it becomes a condition.
By default, if the specified license is already associated, the method won’t duplicate the association. Use force option to overpass this behavior.
- Parameters
- Example
>>> # retrieve objects to be associated >>> md = isogeo.metadata.get( metadata_id="6b5cc93626634d0e9b0d2c48eff96bc3", include=['conditions'] ) >>> lic = isogeo.license.license("f6e0c665905a4feab1e9c1d6359a225f") >>> # associate them >>> isogeo.license.associate_metadata( metadata=md, license=lic, description="Specific description for this license when applied to this metadata." )
- Return type
- create(workgroup_id, check_exists=1, license={'_abilities': None, '_id': None, '_tag': None, 'content': None, 'count': None, 'link': None, 'name': None, 'owner': None})
Add a new license to a workgroup.
- Parameters
0 = no check
1 = compare name [DEFAULT]
- Parameters
license (class) – License model object to create
- Return type
- delete(workgroup_id, license_id)
Delete a license from Isogeo database.
- exists(license_id)
Check if the specified license exists and is available for the authenticated user.
- get(license_id)
Get details about a specific license.
- listing(workgroup_id=None, include=('_abilities', 'count'), caching=1)
Get workgroup licenses.