/ausPestCheck-API

Scripts for API clients

Primary LanguagePythonMIT LicenseMIT

ausPestCheck-API

Scripts for web service clients.

Quick start

  • Create a config file in the conf folder.
    • Use the template to enter your own credentials and endpoint parameters
  • Using a python interactive console, execute callAPI.py.
    • This loads the functions and config parameters as objects.
  • Execute simulateOccurrence.py
    • This loads several functions that combine to create occurrence records. Together, these records are called the 'payload'. It also runs a couple of API calls to create a local copy of the pest list in the variable pestList
  • invoke 'uploadObs(createPayload())' at the prompt
    • this will upload 3 occurrence records in the Great Australian Bight.
  • Change the num, state and pestIDs as desired.

You can also print the occurence records as a CSV file by executing writeCSV.py and then using 'writeObs(payload)'.

TODO

Upload utility functions to download, edit, filter on some criterion, delete and update records using the API.