isogeo_pysdk.api.routes_account module

Isogeo API v1 - API Routes for Account entities

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

class isogeo_pysdk.api.routes_account.ApiAccount(api_client=None)[source]

Bases: object

Routes as methods of Isogeo API used to manipulate account (user).

get[source]

Get authenticated user account(= profile) informations.

Parameters:
  • include (tuple) – additional parts of model to include in response
  • caching (bool) – option to cache the response
memberships[source]

Returns memberships for the authenticated user.

Example:
>>> my_groups = isogeo.account.memberships()
>>> print(len(my_groups))
10
>>> groups_where_iam_admin = list(filter(lambda d: d.get("role") == "admin", my_groups))
>>> print(len(groups_where_iam_admin))
5
>>> groups_where_iam_editor = list(filter(lambda d: d.get("role") == "editor", my_groups))
>>> print(len(groups_where_iam_editor))
4
>>> groups_where_iam_reader = list(filter(lambda d: d.get("role") == "reader", my_groups))
>>> print(len(groups_where_iam_reader))
1
update(account: isogeo_pysdk.models.user.User, caching: bool = 1) → isogeo_pysdk.models.user.User[source]

Update authenticated user account(= profile) informations.

Parameters:
  • account (class) – user account model object to update
  • caching (bool) – option to cache the response