要确定谷歌是否拒绝了您的更新,您可以使用Google Play Developer API来检查更新状态。以下是一个使用Python编写的示例代码:
import requests
# 设置API密钥和应用程序包名
api_key = 'YOUR_API_KEY'
package_name = 'com.example.app'
# 创建API请求
url = f'https://play.googleapis.com/admin/edits/{package_name}/tracks/production'
headers = {
'Authorization': f'Bearer {api_key}',
'Accept': 'application/json',
'Content-Type': 'application/json'
}
response = requests.get(url, headers=headers)
# 检查响应状态码
if response.status_code == 200:
data = response.json()
status = data['track']['status']
if status == 'completed':
print("应用程序更新已发布。")
elif status == 'draft':
print("应用程序更新仍在草稿状态。")
elif status == 'halted':
print("应用程序更新已暂停。")
elif status == 'inProgress':
print("应用程序更新正在进行中。")
else:
print("无法确定应用程序更新的状态。")
else:
print("检查应用程序更新状态时出错。")
请确保替换YOUR_API_KEY
为您自己的Google Play Developer API密钥,com.example.app
为您的应用程序的包名。此代码将向Google Play Developer API发送请求,并解析响应以确定更新的状态。