isogeo_pysdk.api.routes_share module

Isogeo API v1 - API Routes for Shares entities

See: http://help.isogeo.com/api/complete/index.html

class isogeo_pysdk.api.routes_share.ApiShare(api_client=None)[source]

Bases: object

Routes as methods of Isogeo API used to manipulate shares.

associate_application(share: isogeo_pysdk.models.share.Share, application: isogeo_pysdk.models.application.Application) → tuple[source]

Associate a share with an application.

Parameters:
  • share (Share) – share model object to update
  • application (Application) – application object to associate
associate_catalog(share: isogeo_pysdk.models.share.Share, catalog: isogeo_pysdk.models.catalog.Catalog) → tuple[source]

Associate a share with a catalog.

Parameters:
  • share (Share) – share model object to update
  • catalog (Catalog) – object to associate
associate_group(share: isogeo_pysdk.models.share.Share, group: isogeo_pysdk.models.workgroup.Workgroup) → requests.models.Response[source]

Associate a group with a share of type ‘group’.

If the specified group is already associated, the response is still 204.

Parameters:
  • share (Share) – share model object to update
  • group (Workgroup) – group object to associate
create(workgroup_id: str, share: object = {'_created': None, '_creator': (None, ), '_id': None, '_modified': None, 'applications': None, 'catalogs': None, 'groups': None, 'name': None, 'rights': None, 'type': None, 'urlToken': None}, check_exists: int = 1) → isogeo_pysdk.models.share.Share[source]

Add a new share to Isogeo.

Parameters:
  • workgroup_id (str) – identifier of the owner workgroup
  • share (Share) – Share model object to create
  • check_exists (int) – check if a share already exists into the workgroup:
  • 0 = no check
  • 1 = compare name [DEFAULT]
delete(share_id: str) → requests.models.Response[source]

Delete a share from Isogeo database.

Parameters:share_id (str) – identifier of the resource to delete
dissociate_application(share: isogeo_pysdk.models.share.Share, application: isogeo_pysdk.models.application.Application) → tuple[source]

Removes the association between the specified share and the specified application.

Parameters:
  • share (Share) – share model object to update
  • application (Application) – object to associate
dissociate_catalog(share: isogeo_pysdk.models.share.Share, catalog: isogeo_pysdk.models.catalog.Catalog) → tuple[source]

Removes the association between the specified share and the specified catalog.

Parameters:
  • share (Share) – share model object to update
  • catalog (Catalog) – object to associate
dissociate_group(share: isogeo_pysdk.models.share.Share, group: isogeo_pysdk.models.workgroup.Workgroup) → tuple[source]

Removes the association between the specified share and the specified group.

If the specified group is associated, the association is removed, Response is 204. If not, the Response is 500.

Parameters:
  • share (Share) – share model object to update
  • group (Workgroup) – object to associate
exists(share_id: str) → bool[source]

Check if the specified share exists and is available for the authenticated user.

Parameters:share_id (str) – identifier of the share to verify
get(share_id: str, include: tuple = ('_abilities', 'groups')) → isogeo_pysdk.models.share.Share[source]

Returns details about a specific share.

Parameters:
  • share_id (str) – share UUID
  • inlude (tuple) – additionnal subresource to include in the response
listing[source]

Get all shares which are accessible by the authenticated user OR shares for a workgroup.

Parameters:
  • workgroup_id (str) – identifier of the owner workgroup. If None, then list shares for the autenticated user
  • caching (bool) – option to cache the response
refresh_token(share: isogeo_pysdk.models.share.Share) → isogeo_pysdk.models.share.Share[source]

Refresh the URL token of a share, used by Cartotheque, CSW, OpenCatalog.

Parameters:share (Share) – Share model object to update
reshare(share: isogeo_pysdk.models.share.Share, reshare: bool = 1) → isogeo_pysdk.models.share.Share[source]

Enable/disable the reshare option for the given share.

Only available for shares of type ‘group’.

Parameters:
  • share (Share) – Share model object to update
  • reshare (bool) – set option to allow recipients groups
update(share: isogeo_pysdk.models.share.Share, caching: bool = 1) → isogeo_pysdk.models.share.Share[source]

Update a share owned by a workgroup.

Parameters:
  • share (Share) – Share model object to update
  • caching (bool) – option to cache the response