Ponytech / appstoreconnectapi

Python wrapper around Apple App Store Api
https://ponytech.net/projects/app-store-connect
MIT License
159 stars 74 forks source link

Include Relationship Data #24

Open lxjhk opened 3 years ago

lxjhk commented 3 years ago

How do I add the include header in my request so that the response from Apple will have the relationship data?

For example, I am getting all the builds of a particular app by using the following: https://developer.apple.com/documentation/appstoreconnectapi/list_builds#url

for b in api.list_builds(filters={"app":app_id}, sort="-uploadedDate"):

I'd like to have the appStoreVersion relationship data included in the response so that I can access it by calling b. appStoreVersion.

ppawlak commented 3 years ago

Thanks for pointing this out @lxjhk

The include parameter is not yet supported. I add this to the TODO list.

In the meantime you should be able to fetch the build's appStoreVersion with b.appStoreVersion() but I just tried and it is also failing. I'll fix this as soon as possible and let you know.

ppawlak commented 3 years ago

I just created a branch to start support for App Store Connect API 1.2 : https://github.com/Ponytech/appstoreconnectapi/tree/api-1.2

First commit is adding support for appStoreVersion

You can checkout this branch and do something like this:

app = api.list_apps(filters={'sku': 'APPSKU')[0]
build = list(app.builds())[0]
version = build.appStoreVersion()
print(version.versionString)

@lxjhk Can you confirm it works for you?