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.

Paramètres:
  • share (Share) – share model object to update

  • application (Application) – application object to associate

Type renvoyé:

tuple

associate_catalog(share, catalog)

Associate a share with a catalog.

Paramètres:
  • share (Share) – share model object to update

  • catalog (Catalog) – object to associate

Type renvoyé:

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.

Paramètres:
  • share (Share) – share model object to update

  • group (Workgroup) – group object to associate

Type renvoyé:

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.

Paramètres:
  • 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:

Type renvoyé:

Share

  • 0 = no check

  • 1 = compare name [DEFAULT]

delete(share_id)

Delete a share from Isogeo database.

Paramètres:

share_id (str) – identifier of the resource to delete

Type renvoyé:

Response

dissociate_application(share, application)

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

Paramètres:
  • share (Share) – share model object to update

  • application (Application) – object to associate

Type renvoyé:

tuple

dissociate_catalog(share, catalog)

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

Paramètres:
  • share (Share) – share model object to update

  • catalog (Catalog) – object to associate

Type renvoyé:

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.

Paramètres:
  • share (Share) – share model object to update

  • group (Workgroup) – object to associate

Type renvoyé:

tuple

exists(share_id)

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

Paramètres:

share_id (str) – identifier of the share to verify

Type renvoyé:

bool

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

Returns details about a specific share.

Paramètres:
  • share_id (str) – share UUID

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

Type renvoyé:

Share

listing(workgroup_id=None, caching=1)

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

Paramètres:
  • workgroup_id (str) – identifier of the owner workgroup. If None, then list shares for the autenticated user

  • caching (bool) – option to cache the response

Type renvoyé:

list

refresh_token(share)

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

Paramètres:

share (Share) – Share model object to update

Type renvoyé:

Share

reshare(share, reshare=1)

Enable/disable the reshare option for the given share.

Only available for shares of type “group”.

Paramètres:
  • share (Share) – Share model object to update

  • reshare (bool) – set option to allow recipients groups

Type renvoyé:

Share

update(share, caching=1)

Update a share owned by a workgroup.

Paramètres:
  • share (Share) – Share model object to update

  • caching (bool) – option to cache the response

Type renvoyé:

Share