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=None, _creator=None, _id=None, _modified=None, applications=None, catalogs=None, groups=None, name=None, rights=None, type=None, urlToken=None)

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='https://app.isogeo.com')

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

property applications: list

Gets the applications of this Share.

Returns

The applications of this Share.

Return type

str

property catalogs: list

Gets the catalogs of this Share.

Returns

The catalogs of this Share.

Return type

str

property groups: list

Gets the groups of this Share.

Returns

The groups of this Share.

Return type

list

property name: str

Gets the name of this Share.

Returns

The name of this Share.

Return type

str

opencatalog_url(url_base='https://open.isogeo.com')

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

Return type

str

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

property rights: list

Gets the rights of this Share.

Returns

The rights of this Share.

Return type

str

to_dict()

Returns the model properties as a dict.

Return type

dict

to_dict_creation()

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

Return type

dict

to_str()

Returns the string representation of the model.

Return type

str

property type: str

Gets the type of this Share.

Returns

The type of this Share.

Return type

str

property urlToken: str

Gets the urlToken of this Share.

Returns

The urlToken of this Share.

Return type

str