Missions¶
Create a mission¶
>>> my_flight, my_mission = sdk.missions.create(
... name='My mission',
... project='5d1a14af0422ae12d537af02',
... survey_date='2019-01-01T00:00:00.000Z',
... number_of_images=2,
... )
See the missions.create()
documentation.
Describe a mission¶
To describe a mission or a list of missions:
>>> my_mission = sdk.missions.describe('5d1a14af0422ae12d537af03')
>>> my_missions = sdk.missions.describe(['5d1a14af0422ae12d537af03',
... '5d1a14af0422ae12d537af06'])
See the missions.describe()
documentation.
Update a mission¶
To update the name of a mission:
>>> my_updated_mission = sdk.missions.update_name('5d1a14af0422ae12d537af03',
... name='new name')
See the missions.update_name()
documentation.
To update the survey date:
>>> my_updated_mission = sdk.missions.update_survey_date('5d1a14af0422ae12d537af03',
... survey_date='2019-01-03')
See the missions.update_survey_date()
documentation.
Delete a mission¶
To delete a mission:
>>> sdk.missions.delete('5d1a14af0422ae12d537af03')
See the missions.delete()
documentation.
Request for an archive of photos¶
To ask for an archive creation for all images of a mission:
>>> sdk.missions.create_archive('5d1a14af0422ae12d537af03')
See the missions.create_archive()
documentation.
Search missions¶
Search the first 20 missions with awesome in the name, sort by newest first:
>>> my_filters = {'name': {'$match': 'awesome'}}
>>> my_sort = {'creation_date': -1}
>>> sdk.missions.search(filter=my_filters, sort=my_sort, limit=20)
Search the second page of same request:
>>> sdk.missions.search(filter=my_filters, sort=my_sort, limit=20, page=2)
See the missions.search()
documentation.
Do some stuff for all results, without using pages but using iterator:
>>> sg = sdk.missions.search_generator(filter=my_filters, sort=my_sort)
>>> for mission in sg:
... print(mission.name)
See the missions.search_generator()
documentation.