isogeo_pysdk.models.share module

Isogeo API v1 - Model of Share entity

See: http://help.isogeo.com/api/complete/index.html#definition-share

class isogeo_pysdk.models.share.Share(_created: str = None, _creator: isogeo_pysdk.models.workgroup.Workgroup = None, _id: str = None, _modified: str = None, applications: list = None, catalogs: list = None, groups: list = None, name: str = None, rights: list = None, type: str = None, urlToken: str = None)[source]

Bases: object

Shares are entities used to publish catalog(s) of metadata to applications.

Example:
{
    "_created": "string (date-time)",
    "_creator": {
        "_abilities": [
        "string"
        ],
        "_created": "string (date-time)",
        "_id": "string (uuid)",
        "_modified": "string (date-time)",
        "areKeywordsRestricted": "boolean",
        "canCreateMetadata": "boolean",
        "catalogs": "string",
        "contact": {
        "_created": "string (date-time)",
        "_id": "string (uuid)",
        "_modified": "string (date-time)",
        "addressLine1": "string",
        "addressLine2": "string",
        "addressLine3": "string",
        "available": "string",
        "city": "string",
        "groups": "integer (int32)",
        "groupsryCode": "string",
        "email": "string",
        "fax": "string",
        "hash": "string",
        "name": "string",
        "organization": "string",
        "phone": "string",
        "type": "string",
        "zipCode": "string"
        },
        "keywordsCasing": "string",
        "metadataLanguage": "string",
        "themeColor": "string"
    },
    "_id": "string (uuid)",
    "_modified": "string (date-time)",
    "applications": [
        {
        "_created": "string (date-time)",
        "_id": "string (uuid)",
        "_modified": "string (date-time)",
        "canHaveManyGroups": "boolean",
        "client_id": "string",
        "client_secret": "string",
        "groups": [
            {
            "_abilities": [
                "string"
            ],
            "_created": "string (date-time)",
            "_id": "string (uuid)",
            "_modified": "string (date-time)",
            "areKeywordsRestricted": "boolean",
            "canCreateMetadata": "boolean",
            "catalogs": "string",
            "contact": {
                "_created": "string (date-time)",
                "_id": "string (uuid)",
                "_modified": "string (date-time)",
                "addressLine1": "string",
                "addressLine2": "string",
                "addressLine3": "string",
                "available": "string",
                "city": "string",
                "groups": "integer (int32)",
                "groupsryCode": "string",
                "email": "string",
                "fax": "string",
                "hash": "string",
                "name": "string",
                "organization": "string",
                "phone": "string",
                "type": "string",
                "zipCode": "string"
            },
            "keywordsCasing": "string",
            "metadataLanguage": "string",
            "themeColor": "string"
            }
        ],
        "kind": "string",
        "name": "string",
        "redirect_uris": [
            "string"
        ],
        "scopes": [
            "string"
        ],
        "staff": "boolean",
        "url": "string"
        }
    ],
    "catalogs": [
        {
        "$scan": "boolean",
        "_abilities": [
            "string"
        ],
        "_created": "string (date-time)",
        "_id": "string (uuid)",
        "_modified": "string (date-time)"
        }
    ]
}
ATTR_CREA = {'name': <class 'str'>, 'rights': <class 'list'>, 'type': <class 'str'>}
ATTR_MAP = {}
ATTR_TYPES = {'_created': <class 'str'>, '_creator': <class 'isogeo_pysdk.models.workgroup.Workgroup'>, '_id': <class 'str'>, '_modified': <class 'str'>, 'applications': <class 'list'>, 'catalogs': <class 'list'>, 'groups': <class 'list'>, 'name': <class 'str'>, 'rights': <class 'list'>, 'type': <class 'str'>, 'urlToken': <class 'str'>}
admin_url(url_base: str = 'https://app.isogeo.com') → str[source]

Returns the administration URL (https://app.isogeo.com) for this share.

Parameters:url_base (str) – base URL of admin site. Defaults to: https://app.isogeo.com
Return type:str
applications

Gets the applications of this Share.

Returns:The applications of this Share.
Return type:str
catalogs

Gets the catalogs of this Share.

Returns:The catalogs of this Share.
Return type:str
groups

Gets the groups of this Share.

Returns:The groups of this Share.
Return type:list
name

Gets the name of this Share.

Returns:The name of this Share.
Return type:str
opencatalog_url(url_base: str = 'https://open.isogeo.com') → str[source]

Returns the OpenCatalog URL for this share or None if OpenCatalog is not enabled.

Parameters:url_base (str) – base URL of OpenCatalog. Defaults to: https://open.isogeo.com
Returns:
  • False if the share type is not ‘application’
  • None if OpenCatalog is not enabled in the share
  • URL of the OpenCatalog when everything is fine
rights

Gets the rights of this Share.

Returns:The rights of this Share.
Return type:str
to_dict() → dict[source]

Returns the model properties as a dict.

to_dict_creation() → dict[source]

Returns the model properties as a dict structured for creation purpose (POST)

to_str() → str[source]

Returns the string representation of the model.

type

Gets the type of this Share.

Returns:The type of this Share.
Return type:str
urlToken

Gets the urlToken of this Share.

Returns:The urlToken of this Share.
Return type:str