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)

Bases: object

Routes as methods of Isogeo API used to manipulate shares.

associate_application(share, application)

Associate a share with an application.

Parameters
  • share (Share) – share model object to update

  • application (Application) – application object to associate

Return type

tuple

associate_catalog(share, catalog)

Associate a share with a catalog.

Parameters
  • share (Share) – share model object to update

  • catalog (Catalog) – object to associate

Return type

tuple

associate_group(share, group)

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

Return type

Response

create(workgroup_id, share={'_created': None, '_creator': (None,), '_id': None, '_modified': None, 'applications': None, 'catalogs': None, 'groups': None, 'name': None, 'rights': None, 'type': None, 'urlToken': None}, check_exists=1)

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]

Return type

Share

delete(share_id)

Delete a share from Isogeo database.

Parameters

share_id (str) – identifier of the resource to delete

Return type

Response

dissociate_application(share, application)

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

Parameters
  • share (Share) – share model object to update

  • application (Application) – object to associate

Return type

tuple

dissociate_catalog(share, catalog)

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

Parameters
  • share (Share) – share model object to update

  • catalog (Catalog) – object to associate

Return type

tuple

dissociate_group(share, group)

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

Return type

tuple

exists(share_id)

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

Parameters

share_id (str) – identifier of the share to verify

Return type

bool

get(share_id, include=('_abilities', 'groups'))

Returns details about a specific share.

Parameters
  • share_id (str) – share UUID

  • inlude (tuple) – additionnal subresource to include in the response

Return type

Share

listing(workgroup_id=None, caching=1)

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

Return type

list

refresh_token(share)

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

Parameters

share (Share) – Share model object to update

Return type

Share

reshare(share, reshare=1)

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

Return type

Share

update(share, caching=1)

Update a share owned by a workgroup.

Parameters
  • share (Share) – Share model object to update

  • caching (bool) – option to cache the response

Return type

Share