Licenses
Related to the License API
- class koordinates.licenses.LicenseManager(client)
Bases:
Manager
Accessor for querying licenses.
Access via the
licenses
property of akoordinates.client.Client
instance.- expand(*args, **kwargs)
Returns an expanded Query view of the model objects. Equivalent to calling
.list().expand()
. Using expansions may have significant performance implications for some API requests. Seekoordinates.base.Query.expand()
.
- filter(*args, **kwargs)
Returns a filtered Query view of the model objects. Equivalent to calling
.list().filter(...)
. Seekoordinates.base.Query.filter()
.
- get(id, expand=[])
Fetches a Model instance determined by the value of id.
- Parameters:
id – numeric ID for the Model.
- get_creative_commons(slug, jurisdiction=None)
Returns the Creative Commons license for the given attributes.
- Parameters:
slug (str) – the type of Creative Commons license. It must start with
cc-by
and can optionally containnc
(non-commercial),sa
(share-alike),nd
(no derivatives) terms, seperated by hyphens. Note that a CC license cannot be bothsa
andnd
jurisdiction (str) – The jurisdiction for a ported Creative Commons license (eg.
nz
), orNone
for unported/international licenses.
- Return type:
- list()
Fetches a set of model objects
- Return type:
koordinates.base.Query
- order_by(*args, **kwargs)
Returns an ordered Query view of the model objects. Equivalent to calling
.list().order_by(...)
. Seekoordinates.base.Query.order_by()
.
- class koordinates.licenses.License(**kwargs)
Bases:
Model
Represents a license that can be applied to layers, tables, sources, and documents.
- refresh()
Refresh this model from the server.
Updates attributes with the server-defined values. This is useful where the Model instance came from a partial response (eg. a list query) and additional details are required.
Existing attribute values will be overwritten.