Token¶
- class geodesic.account.tokens.Token(**token)[source]¶
Bases:
geodesic.bases._APIObject
The token class represents the share tokens created when a user shares a dataset through Ted
- Parameters
**token – values corresponding to the token and the dataset it shares
- token¶
(str) - unique 32-bit token created by Ted and used to access a shared dataset
Descriptor:
_StringDescr
- servicer¶
(str) - the servicer of the dataset shared by the token
Descriptor:
_StringDescr
- dataset¶
(str) - the dataset shared by the token
Descriptor:
_StringDescr
- project¶
(str) - the project of the dataset shared by the token
Descriptor:
_StringDescr
- property url¶
Returns the URL that can be used to access a datset shared through Ted on the current environment
- Raises
requests.HTTPErrror for fault –
- Returns
the URL to access the token in question
- property feature_service_url¶
gets a url to an GeoServices FeatureService
Returns a URL pointing to a feature service that can be used in ArcGIS.
DEPRECATED: use get_feature_service_url instead
- property image_service_url¶
gets a url to an GeoServices ImageService
Returns a URL pointing to an image service that can be used in ArcGIS.
DEPRECATED: use get_image_service_url instead
- property vector_tile_service_url¶
gets a url to an GeoServices VectorTileService
Returns a URL pointing to a vector tile service that can be used in ArcGIS.
DEPRECATED: use get_vector_tile_service_url instead
- get_vector_tile_service_url()[source]¶
gets a url to an GeoServices VectorTileService
Returns a URL pointing to a vector tile service that can be used in ArcGIS.
- get_image_service_url()[source]¶
gets a url to an GeoServices ImageService
Returns a URL pointing to an image service that can be used in ArcGIS.
- get_feature_service_url()[source]¶
gets a url to an GeoServices FeatureService
Returns a URL pointing to a feature service that can be used in ArcGIS.
- get_ogc_vector_tile_url(collection=None, tile_matrix_set_id='WebMercatorQuad', tile_matrix_id='z', row_name='y', col_name='x', format='mvt')[source]¶
gets a url to an OGC API: Tiles service
Returns a URL pointing to a vector tile service that can be used in web mapping.
- get_ogc_raster_tile_url(collection=None, tile_matrix_set_id='WebMercatorQuad', tile_matrix_id='z', row_name='y', col_name='x', format='png', tile_path='coverage/tiles')[source]¶
gets a url to an OGC API: Tiles service
Returns a URL pointing to a raster tile service that can be used in web mapping.
- get_feature_layer_url(layer_id=0)[source]¶
gets a url to an GeoServices Feature Layer
Returns a URL pointing to a layer that can directly be used in ArcGIS.
- Parameters
layer – the layer ID to expose
- Returns
a URL to to layer
- feature_layer_url(layer_id=0)¶
Deprecated in 1.0.0
gets a url to an GeoServices Feature Layer
Returns a URL pointing to a layer that can directly be used in ArcGIS.
- Args:
layer: the layer ID to expose
- Returns:
a URL to to layer
- update_ttl(ttl)[source]¶
Update the time to live of a token in redis
- Parameters
ttl – the amount of seconds before the token should expire. Valid values are either -1, representing an infinite token life, or n, where 0 < n <= 2147483647.
- Raises
requests.HTTPErrror for fault –
Note: If successful, nothing is returned.
Expires an active token created by the user, revoking access from anyone using the token
- Raises
requests.HTTPErrror for fault –
Note: If successful, nothing is returned. Deleting a non-existent token does not raise an error.