Module stac_fastapi.core.models.links¶
link helpers.
Variables¶
INFERRED_LINK_RELS
Functions¶
merge_params¶
def merge_params(
url: str,
newparams: Dict
) -> str
Merge url parameters.
Classes¶
BaseLinks¶
class BaseLinks(
request: starlette.requests.Request
)
Create inferred links common to collections and items.
Descendants¶
- stac_fastapi.core.models.links.CollectionLinks
- stac_fastapi.core.models.links.PagingLinks
Instance variables¶
base_url
Get the base url.
url
Get the current request url.
Methods¶
create_links¶
def create_links(
self
) -> List[Dict[str, Any]]
Return all inferred links.
get_links¶
def get_links(
self,
extra_links: Union[List[Dict[str, Any]], NoneType] = None
) -> List[Dict[str, Any]]
Generate all the links.
Get the links object for a stac resource by iterating through available methods on this class that start with link_.
link_root¶
def link_root(
self
) -> Dict
Return the catalog root.
link_self¶
def link_self(
self
) -> Dict
Return the self link.
resolve¶
def resolve(
self,
url
)
Resolve url to the current request url.
CollectionLinks¶
class CollectionLinks(
request: starlette.requests.Request,
collection_id: str,
extensions: List[str] = NOTHING
)
Create inferred links specific to collections.
Ancestors (in MRO)¶
- stac_fastapi.core.models.links.BaseLinks
Instance variables¶
base_url
Get the base url.
url
Get the current request url.
Methods¶
create_links¶
def create_links(
self
) -> List[Dict[str, Any]]
Return all inferred links.
get_links¶
def get_links(
self,
extra_links: Union[List[Dict[str, Any]], NoneType] = None
) -> List[Dict[str, Any]]
Generate all the links.
Get the links object for a stac resource by iterating through available methods on this class that start with link_.
link_aggregate¶
def link_aggregate(
self
) -> Dict[str, Any]
Create the aggregate
link.
link_aggregations¶
def link_aggregations(
self
) -> Dict[str, Any]
Create the aggregations
link.
link_items¶
def link_items(
self
) -> Dict[str, Any]
Create the items
link.
link_parent¶
def link_parent(
self
) -> Dict[str, Any]
Create the parent
link.
link_queryables¶
def link_queryables(
self
) -> Dict[str, Any]
Create the queryables
link.
link_root¶
def link_root(
self
) -> Dict
Return the catalog root.
link_self¶
def link_self(
self
) -> Dict
Return the self link.
resolve¶
def resolve(
self,
url
)
Resolve url to the current request url.
PagingLinks¶
class PagingLinks(
request: starlette.requests.Request,
*,
next: Union[str, NoneType] = None
)
Create links for paging.
Ancestors (in MRO)¶
- stac_fastapi.core.models.links.BaseLinks
Instance variables¶
base_url
Get the base url.
url
Get the current request url.
Methods¶
create_links¶
def create_links(
self
) -> List[Dict[str, Any]]
Return all inferred links.
get_links¶
def get_links(
self,
extra_links: Union[List[Dict[str, Any]], NoneType] = None
) -> List[Dict[str, Any]]
Generate all the links.
Get the links object for a stac resource by iterating through available methods on this class that start with link_.
link_next¶
def link_next(
self
) -> Union[Dict[str, Any], NoneType]
Create link for next page.
link_root¶
def link_root(
self
) -> Dict
Return the catalog root.
link_self¶
def link_self(
self
) -> Dict
Return the self link.
resolve¶
def resolve(
self,
url
)
Resolve url to the current request url.