bitmovin Analytics: Bugfix and added two missing attributes #3
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I added two missing enums for AnalyticsAttribute: REBUFFER_PERCENTAGE and VIDEOSTART_FAILED.
I fixed a bug/problem for the /analytics/impression API endpoint. The response for this endpoint comes as a python list, which is attempted to be converted into a dictionary, throwing an Exception. Maybe there is a more elegant solution though. Here is some minimal code to reproduce this error without the fix:
from bitmovin_api_sdk import bitmovin_api, AnalyticsLicenseKey
api_key = 'XXX'
tenant_org_id = 'XXX'
license_key = 'XXX'
test_impression = '8b789d1c-a47b-4401-85ef-18ab68113825'
bitmovinApi = bitmovin_api.BitmovinApi(api_key=api_key, tenant_org_id=tenant_org_id)
response = bitmovinApi.analytics.impressions.create(impression_id=test_impression, analytics_license_key=AnalyticsLicenseKey(license_key=licenses_key))
print(response)