-
Notifications
You must be signed in to change notification settings - Fork 2
ArchiveAPI
Harrison Steyn edited this page Dec 17, 2021
·
15 revisions
The ArchiveAPI object allows for access to searching and ordering methods.
Used to execute SearchRequest objects.
Name | Type | Default Behaviour | Description |
---|---|---|---|
request | SearchRequest | required | The search to execute |
Returns a list
of SearchResponse objects.
Used to order specific scenes. Note: some scenes may require payment.
Name | Type | Default Behaviour | Description |
---|---|---|---|
request | OrderRequest | required | The order to execute |
Returns a OrderResponse
A search can be executed as follows. Note a session will need to have been created.
api = arlulacore.ArlulaAPI(arlula_session)
archive = api.archiveAPI()
# Search for imagery around sydney between 2020-Jan-1 and 2020-Feb-1
# With at most 10m resolution
search_result = archive.search(
arlulacore.SearchRequest(
start=date(2020, 1, 1),
res=10,
)
.set_point_of_interest(-33.8688, 151.2093)
.set_end(date(2020, 2, 1))
)
An order can be executed as follows, by taking an id and corresponding eula from a SearchResponse object.
# Order a specific image from the archive, using the id from above, and (optionally)
# email [email protected] and [email protected] when it is complete.
order_result = archive.order(
arlulacore.OrderRequest(
id="cade11f4-8b4d-43e1-8cb1-3bce85111a01",
eula="Supplier's EULA",
seats=1,
)
.set_emails(["[email protected]", "[email protected]"])
)