firebase-admin-python icon indicating copy to clipboard operation
firebase-admin-python copied to clipboard

AndroidApp instance is incomplete

Open ruha9005 opened this issue 6 years ago • 3 comments

For example, after I execute 'project_management.list_android_apps()' it returns list of 'AndroidApp's (https://github.com/firebase/firebase-admin-python/blob/master/firebase_admin/project_management.py#L157) Every instance have only one property ('app_id'), but I also need 'package_name'. I don't want to fetch metadata (https://github.com/firebase/firebase-admin-python/blob/master/firebase_admin/project_management.py#L527) for every app, just because I have a lot of them. At the time I see, that after I execute same request through REST (https://firebase.google.com/docs/projects/api/reference/rest/v1beta1/projects.androidApps/list), I have 'name', 'appId', 'projectId' and"packageName" properties in AndroidApp's list.

ruha9005 avatar Jul 07 '19 19:07 ruha9005

I found a few problems with this issue:

  • I couldn't figure out how to label this issue, so I've labeled it for a human to triage. Hang tight.
  • This issue does not seem to follow the issue template. Make sure you provide all the required information.

google-oss-bot avatar Jul 07 '19 19:07 google-oss-bot

One idea that was suggested by @weixifan was to cache the metadata returned by the first API call, and avoid making another API call when get_metadata() is called.

hiranya911 avatar Jul 19 '19 20:07 hiranya911

I would expect the response the SDK to match the response from a similar REST API (if available) which in this case doesn't seem to happen. How expensive is the get_metadata call?

allentv avatar Jan 03 '21 20:01 allentv