是否有适用于Google Play商店应用的官方API?

时间:2012-08-18 08:57:57

标签: android api google-play

Google Play商店应用(又称Android电子市场)已更新为具有许多很酷的功能,甚至wishlist of apps

我想知道是否有任何官方API与它进行通信,甚至意图。我想知道人们是否只是查看日志以查看意图,或者是否有官方API来访问该应用的每个页面。

以下是此类API可能允许您执行此操作的一些示例:

  1. 如果要将应用添加到Google Play商店的心愿单,您会怎么做?
  2. 你会去做一个特定应用程序的评论,甚至去你写评论的部分做什么?
  3. 有没有办法查询特定公司的应用程序?
  4. 过去安装的应用查询怎么样?
  5. 等等......

2 个答案:

答案 0 :(得分:3)

  

1。如果要将应用添加到Google Play的心愿单中,您会怎么做?

你不能

  

2。你会怎么做才能去特定应用的评论,甚至去你写评论的部分?

您可以使用Intent打开Goog​​le Play上的应用页面,其中包含此答案底部链接中的网址。

  

3。有没有办法查询那里特定公司的应用程序?

充其量,您可以使用搜索网址显示特定开发者应用的列表。

  

4。对过去安装的应用程序的查询怎么样?

你不能。

Documentation

答案 1 :(得分:-2)

您可以尝试的其他非官方API也请查看:www.playstoreapi.com

它非官方但易于使用(免费用于非商业用途),它有很多很好的功能,如搜索和顶级图表。来自他们的文档部分:

Node.js的:

var request     = require('request');
var apiKey      = 'wij5czxu3mxkzkt9'; // your API key
var packageName = 'com.whatsapp';     // package Name, e.g. com.whatsapp for WhatsApp

var url = 'http://api.playstoreapi.com/v1.1/apps/' + packageName + '?key=' + apiKey;

request({
    url: url,
    json: true
    }, function (error, response, body) {
    if (!error && response.statusCode === 200) {
        console.log(body) // Print the json response
    }
});

HTML / JS:

<html>
<head>
<body>
<p></p>
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js"></script>

  <script>

  var apiKey = 'wij5czxu3mxkzkt9'; // your API key
  var app    = 'com.whatsapp';     // package com.whatsapp for WhatsApp

  var url = 'http://api.playstoreapi.com/v1.1/apps/' + app + '?key=' + apiKey;

  $.getJSON(url).done(function(appDetails) {
    $('p:last').html(JSON.stringify(appDetails));
  });

  </script>
</body>
</head>
<html>

的Python:

import urllib2
import json

packageName = 'com.whatsapp'      # package com.whatsapp for WhatsApp
apiKey      = 'wij5czxu3mxkzkt9'  # your API key

url = 'http://api.playstoreapi.com/v1.1/apps/{0}?key={1}'

response = urllib2.urlopen(url.format(packageName, apiKey))

data = json.load(response)   
print data

C#.NET:

string apiKey = "wij5czxu3mxkzkt9"; // your API key
string app    = "com.whatsapp";     // package com.whatsapp for WhatsApp

string url = "http://api.playstoreapi.com/v1.1/apps/{0}?key={1}";

using (var webClient = new System.Net.WebClient()) {
    string jsonString = webClient.DownloadString(string.Format(url, app, apiKey));
}
相关问题