google-api-python-client icon indicating copy to clipboard operation
google-api-python-client copied to clipboard

regionsVersion query param does not work

Open YonatanSasoony opened this issue 3 years ago • 3 comments

Hey,

I've tried to create a subscription using this method monetization.subscriptions.create:

google_play_api.monetization().subscriptions().create( packageName=package_name, productId=product_id, regionsVersion={"version": "2022/01"}, body=subscription_details, ).execute()

and got this error: TypeError: Got an unexpected keyword argument regionsVersion.

I've also tried to send "regionsVersion.version"="2022/01" as mentioned in some other places in the docs, but it didn't work for me as well.

YonatanSasoony avatar Aug 21 '22 07:08 YonatanSasoony

+1

tbenhamou avatar Aug 21 '22 09:08 tbenhamou

A dirty fix for this to make it work:

req = google_play_api.monetization().subscriptions().create(
    packageName=package_name, productId=product_id, body=subscription_details,
)
req.uri += "&regionsVersion.version=2022/01"  # just add required querystring manually
req.execute()

infinityxxx avatar Aug 26 '22 13:08 infinityxxx