Last active
April 30, 2019 12:25
-
-
Save gregtap/cbd84ed9486e4a727b8d250909b3ae7e to your computer and use it in GitHub Desktop.
Revisions
-
Greg TAPPERO revised this gist
Apr 30, 2019 . 1 changed file with 4 additions and 3 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -9,7 +9,7 @@ ) http = credentials.authorize(http) service = build('androidpublisher', 'v3', http=http) # android_in_app = service.purchases().products().get(packageName=package_name, # productId="{}.{}".format(package_name, product, token=token)).execute() @@ -18,8 +18,9 @@ package_name = "mobile.chefclub.App" token = "gepkfnlflefaghcnnioohhbd.AO-J1OyYB7ProV2FCuCZzxT4eh5Da47f3JsTqTxuJP-9oc4FkdJdOwA6RDwVGUQ9rJJUcDy3Y3Ffv_Rswmu4fbrt2lvjAsWzdGHMzFibog1OfLhHfxP0ru81W6Qjv5KdTpBMgtXs6tt6sd5eBxQjXCiWjmyVeLB__Q" # The token provided to the user's device when the inapp product was purchased. android_in_app = service.purchases().subscriptions().get(packageName=package_name, subscriptionId="mobile.chefclub.test_premium_subscription", token=token).execute() print(android_in_app) -
Greg TAPPERO revised this gist
Apr 30, 2019 . 1 changed file with 2 additions and 3 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -9,18 +9,17 @@ ) http = credentials.authorize(http) service = build('androidpublisher', 'v2', http=http) # android_in_app = service.purchases().products().get(packageName=package_name, # productId="{}.{}".format(package_name, product, token=token)).execute() products = service.inappproducts().list(packageName="mobile.chefclub.App").execute() print("%s products" % len(products)) package_name = "mobile.chefclub.App" token = "gepkfnlflefaghcnnioohhbd.AO-J1OyYB7ProV2FCuCZzxT4eh5Da47f3JsTqTxuJP-9oc4FkdJdOwA6RDwVGUQ9rJJUcDy3Y3Ffv_Rswmu4fbrt2lvjAsWzdGHMzFibog1OfLhHfxP0ru81W6Qjv5KdTpBMgtXs6tt6sd5eBxQjXCiWjmyVeLB__Q" android_in_app = service.purchases().products().get(packageName=package_name, productId="mobile.chefclub.test_premium_subscription", token=token).execute() print(android_in_app) -
Greg TAPPERO renamed this gist
Apr 30, 2019 . 1 changed file with 0 additions and 0 deletions.There are no files selected for viewing
File renamed without changes. -
Greg TAPPERO created this gist
Apr 30, 2019 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,26 @@ from googleapiclient.discovery import build from oauth2client.service_account import ServiceAccountCredentials import httplib2 http = httplib2.Http(timeout=30) credentials = ServiceAccountCredentials.from_json_keyfile_name( "credentials.json", "https://www.googleapis.com/auth/androidpublisher" ) http = credentials.authorize(http) service = build('androidpublisher', 'v3', http=http) # android_in_app = service.purchases().products().get(packageName=package_name, # productId="{}.{}".format(package_name, product, token=token)).execute() products = service.inappproducts().list(packageName="mobile.chefclub.App").execute() print("%s products" % len(products)) package_name = "mobile.chefclub.App" product = "test_premium_subscription" token = "gepkfnlflefaghcnnioohhbd.AO-J1OyYB7ProV2FCuCZzxT4eh5Da47f3JsTqTxuJP-9oc4FkdJdOwA6RDwVGUQ9rJJUcDy3Y3Ffv_Rswmu4fbrt2lvjAsWzdGHMzFibog1OfLhHfxP0ru81W6Qjv5KdTpBMgtXs6tt6sd5eBxQjXCiWjmyVeLB__Q" android_in_app = service.purchases().products().get(packageName=package_name, productId="{}.{}".format(package_name, product), token=token).execute() print(android_in_app)