Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix return type for getStats() when StatAPI is used #231

Open
zcernigoj opened this issue Feb 13, 2023 · 0 comments
Open

Fix return type for getStats() when StatAPI is used #231

zcernigoj opened this issue Feb 13, 2023 · 0 comments

Comments

@zcernigoj
Copy link
Collaborator

zcernigoj commented Feb 13, 2023

Return type for getStats() if StatAPI is used is set to StatisticalApiResponse.
But the actual response of getStats() is not of that type, it's actually:

Statistical API response type is

{
  data: StatisticalApiResponse;
  status: string;
}

example from documentation: Statistics for one single-band output on a given day

{'data': [{'interval': {'from': '2020-07-04T00:00:00Z',
    'to': '2020-07-05T00:00:00Z'},
   'outputs': {'output_B04': {'bands': {'B0': {'stats': {'min': 0.07970000058412552,
        'max': 0.30959999561309814,
        'mean': 0.11471141986778864,
        'stDev': 0.034298170449733226,
        'sampleCount': 3240,
        'noDataCount': 0}}}}}}],
 'status': 'OK'}
@zcernigoj zcernigoj changed the title Fix StatisticalApiResponse type Fix return type for getStats() Feb 13, 2023
@zcernigoj zcernigoj changed the title Fix return type for getStats() Fix return type for getStats() when StatAPI is used Feb 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant