phac-nml / irida-staramr-results

Enables StarAMR analysis results that were run through IRIDA to be downloaded into a spreadsheet using the command line.
Apache License 2.0
3 stars 1 forks source link

Less api calls #27

Closed mariellemanlulu closed 3 years ago

mariellemanlulu commented 3 years ago

Summary of Changes

Lessen API calls

3 ways:

  1. Stored analysis_submission_url as an instance variable for re-use instead of calling _get_link every time we need it.
  2. Changed the method from get_completed_amr_analysis_submission to get_completed_amr_analysis_results so that it return results instead of submissions. This will avoid requesting additional analysis call when checking if the analysis is of type AMR_DETECTION.
  3. Added get_analysis_results_url method, which does not uses self._get_link() method but assumes what the endpoint is.

Additional Changes