isogeo_pysdk.api.routes_contact module

Isogeo API v1 - API Routes for Contacts entities

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

class isogeo_pysdk.api.routes_contact.ApiContact(api_client=None)[source]

Bases: object

Routes as methods of Isogeo API used to manipulate contacts (conditions).

associate_metadata(metadata: isogeo_pysdk.models.metadata.Metadata, contact: isogeo_pysdk.models.contact.Contact, role: str = 'pointOfContact') → requests.models.Response[source]

Associate a metadata with a contact.

If the specified contact is already associated, the response is still 200.

Parameters:
  • metadata (Metadata) – metadata object to update
  • contact (Contact) – contact model object to associate
  • role (str) – role to assign to the contact
create(workgroup_id: str, contact: isogeo_pysdk.models.contact.Contact, check_exists: int = 1) → isogeo_pysdk.models.contact.Contact[source]

Add a new contact to a workgroup.

Parameters:
  • workgroup_id (str) – identifier of the owner workgroup
  • contact (class) – Contact model object to create
  • check_exists (int) –

    check if a contact already exists inot the workgroup:

    • 0 = no check
    • 1 = compare name [DEFAULT]
    • 2 = compare email
Returns:

the created contact or False if a similar cataog already exists or a tuple with response error code

Return type:

Contact

delete(workgroup_id: str, contact_id: str)[source]

Delete a contact from Isogeo database.

Parameters:
  • workgroup_id (str) – identifier of the owner workgroup
  • contact_id (str) – identifier of the resource to delete
dissociate_metadata(metadata: isogeo_pysdk.models.metadata.Metadata, contact: isogeo_pysdk.models.contact.Contact) → requests.models.Response[source]

Removes the association between a metadata and a contact.

If the specified contact is not associated, the response is 404.

Parameters:
  • metadata (Metadata) – metadata object to update
  • contact (Contact) – contact model object to associate
exists(contact_id: str) → bool[source]

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

Parameters:contact_id (str) – identifier of the contact to verify
get(contact_id: str) → isogeo_pysdk.models.contact.Contact[source]

Get details about a specific contact.

Parameters:contact_id (str) – contact UUID
listing(workgroup_id: str = None, include: list = ['count'], caching: bool = 1) → list[source]

Get workgroup contacts.

Parameters:
  • workgroup_id (str) – identifier of the owner workgroup
  • include (list) – identifier of the owner workgroup
  • caching (bool) – option to cache the response
update(contact: isogeo_pysdk.models.contact.Contact, caching: bool = 1) → isogeo_pysdk.models.contact.Contact[source]

Update a contact owned by a workgroup.

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