编程方式检查的Windows Store应用更新 [英] Programmatically check Windows Store App update

查看:235
本文介绍了编程方式检查的Windows Store应用更新的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

实际上,我试图找到一种方法来检查是否有可用的更新为Windows Store应用。
有没有办法使用API​​来做到这一点?
的感谢!
埃萨姆


解决方案

还有就是在这个岗位概述了Windows应用商店的数据未公开的访问:




http://jasonthomascarter.blogspot.com/2013/08/the-friendly-developers-guide-to.html




我在这里贴了它的文字,如果该网站曾经消失。 :)



今天,我接到一个老乡开发商的支持电子邮件的询问我的Windows应用商店中的一个应用的应用轮盘赌。这是相当令人耳目一新,我与其他开发者共享信息相当开放。我得到更多的兴奋,看看他们会比担心在竞争的潜力创造。所以,我在这里跟大家分享。总之,这个开发商想知道如何得到这个应用程序的信息,我会解释我是如何访问和如何可以了。



首先一点自我提升,除了到App轮盘我使用一些其他的应用程序信息。开发人员信息中心提供一站式服务,查看来自所有国家的评论对所有的应用程序用一个简单的水龙头给每个评审翻译,Windows应用商店开发者在Windows Store中的所有开发人员的目录(10000)和他们的应用程序,最活跃审稿人最丰富的应用程序评审和评论的目录,并以我个人的投资组合的应用程序软件开发人员,其中列出了所有我已经发表在Windows应用商店的其他应用程序,请给他们中的一些尝试。



下面,我们走!首先,我们将与Windows应用商店网站的robots.txt文件开始。




的http:/ /apps.microsoft.com/robots.txt




网站使用robots.txt指导如何做人网络爬虫,他们想要什么他们看到的,他们不希望他们看到的内容。




http://www.robotstxt.org/




网络机器人(也称为Web流浪汉,爬行,或蜘蛛),是自动遍历Web程序。搜索引擎如谷歌使用它们来索引的网页内容,垃圾邮件发送者使用它们来扫描电子邮件地址,并且它们有许多其他用途。



在这种情况下,站点地图。 XML索引文件是我们感兴趣的是 http://apps.microsoft.com/windows/sitemap_index.xml




http://www.sitemaps.org/




站点地图是网站站长告知搜索引擎有关网站可用于抓取页面的简单方法。在最简单的形式,站点地图是一个XML文件,该文件列出了网站的网址以及关于每个网址相对于网站上其他网址的其他元数据(当它最后更新,多久它通常会发生变化,以及如何重要的是,沿),以便搜索引擎可以更智能地抓取该网站。



该地图索引文件列出了每个单独的站点地图XML文件。截至记者发稿时,apps.microsoft.com网站有141个人站点地图XML文件。



在单个文件成千上万的URL到网页Windows应用商店的应用程序。像这样的URL到PlayTo接收器应用程序: http://apps.microsoft.com/windows/en-us/app/playto-receiver/72a6ba17-2d4e-4a1c-bcfb-cdc5d4b32d0e



这些网页的应用程序不包含一个很好的信息位,我们可以从HTML刮,但我们可以做的更好....关键信息我们正在这里是应用程序的ID和地区的应用程序的ID在商店发布到。
例如: 72a6ba17-2d4e-4a1c-bcfb-cdc5d4b32d0e EN-US 等...



和现在的好东西,有一些Web服务可以调用使用我们新发现的应用程序ID和地理信息。




https://services.apps.microsoft.com/browse/6.2.9200-1 / 615 / EN-US_en-US / C /美国/ CP / 10005001 /应用/ 72a6ba17-2d4e-4a1c-bcfb-cdc5d4b32d0e




有足够的信息可通过该Web服务,但它没有明确的元素名称拼写出来。这里是我的许多解释他们的(不是全部),开始你了。

  sSubCategoryName = rawXML.getElementsByTagName('钪')[0] .getElementsByTagName('N')[0] .childNodes [ 0] .nodeValue; 
sSubCategoryId = rawXML.getElementsByTagName('钪')[0] .getElementsByTagName(I)[0] .childNodes [0] .nodeValue;
sHasTrial = rawXML.getElementsByTagName('尝试')[0] .childNodes [0] .nodeValue;
sDescription = rawXML.getElementsByTagName(D)[0] .childNodes [0] .nodeValue;
sDeveloper = rawXML.getElementsByTagName('资源属性')[0] .childNodes [0] .nodeValue;
sWebsite = rawXML.getElementsByTagName('Ws中')[0] .childNodes [0] .nodeValue;
sSupport = rawXML.getElementsByTagName('SWS')[0] .childNodes [0] .nodeValue;
sPrivacy = rawXML.getElementsByTagName('普')[0] .childNodes [0] .nodeValue;
sCategoryName = rawXML.getElementsByTagName(C)[0] .getElementsByTagName(N)[0] .childNodes [0] .nodeValue;
sCategoryId = rawXML.getElementsByTagName(C)[0] .getElementsByTagName(I)[0] .childNodes [0] .nodeValue;
sPrice = rawXML.getElementsByTagName('P')[0] .childNodes [0] .nodeValue;
sForegroundColor = rawXML.getElementsByTagName('蛋白原')[0] .childNodes [0] .nodeValue;
sBackgroundColor = rawXML.getElementsByTagName('博伽')[0] .childNodes [0] .nodeValue;
sAppIcon = rawXML.getElementsByTagName('伊措')[0] .childNodes [0] .nodeValue;
sAppName = rawXML.getElementsByTagName('T')[0] .childNodes [0] .nodeValue;
sPackageFamilyName = rawXML.getElementsByTagName('PFN')[0] .childNodes [0] .nodeValue;
sResourceId = rawXML.getElementsByTagName(R)[0] .childNodes [0] .nodeValue;
SID = rawXML.getElementsByTagName(I)[0] .childNodes [0] .nodeValue;
sCapabilities = sCapabilities + arrCapabilities [k]的.childNodes [0] .nodeValue +,;
sUpdate = rawXML.getElementsByTagName('的Ud')[0] .childNodes [0] .nodeValue;
sFeatures1 = rawXML.getElementsByTagName('的Dbp')[0] .childNodes [0] .nodeValue;
sFeatures2 = rawXML.getElementsByTagName('的Dbp')[1] .childNodes [0] .nodeValue;
sFeatures3 = rawXML.getElementsByTagName('的Dbp')[2] .childNodes [0] .nodeValue;
sFeatures4 = rawXML.getElementsByTagName('的Dbp')[3] .childNodes [0] .nodeValue;
sFeatures5 = rawXML.getElementsByTagName('的Dbp')[4] .childNodes [0] .nodeValue;
sFeatures6 = rawXML.getElementsByTagName('的Dbp')[5] .childNodes [0] .nodeValue;
sFeatures7 = rawXML.getElementsByTagName('的Dbp')[6] .childNodes [0] .nodeValue;
sFeatures8 = rawXML.getElementsByTagName('的Dbp')[7] .childNodes [0] .nodeValue;
sFeatures9 = rawXML.getElementsByTagName('的Dbp')[8] .childNodes [0] .nodeValue;
sScreenshot1 = rawXML.getElementsByTagName('SS')[0] .getElementsByTagName('U')[0] .childNodes [0] .nodeValue
sScreenshot2 = rawXML.getElementsByTagName(SS)[1 ] .getElementsByTagName('U')[0] .childNodes [0] .nodeValue
sScreenshot3 = rawXML.getElementsByTagName(SS)[2] .getElementsByTagName('U')[0] .childNodes [0] .nodeValue
sScreenshot4 = rawXML.getElementsByTagName(SS)[3] .getElementsByTagName('U')[0] .childNodes [0] .nodeValue
sScreenshot5 = rawXML.getElementsByTagName(SS) [4] .getElementsByTagName('U')[0] .childNodes [0] .nodeValue
sScreenshot6 = rawXML.getElementsByTagName(SS)[5] .getElementsByTagName('U')[0] .childNodes [ 0] .nodeValue
sScreenshot7 = rawXML.getElementsByTagName(SS)[6] .getElementsByTagName('U')[0] .childNodes [0] .nodeValue
sScreenshot8 = rawXML.getElementsByTagName('SS ')[7] .getElementsByTagName(U)[0] .childNodes [0] .nodeValue
sScreenshot9 = rawXML.getElementsByTagName(SS)[8] .getElementsByTagName(U)[0]。子节点[0] .nodeValue
sCaption1 = rawXML.getElementsByTagName('SS')[0] .getElementsByTagName('帽')[0] .childNodes [0] .nodeValue
sCaption2 = rawXML.getElementsByTagName( SS)[1] .getElementsByTagName('第')[0] .childNodes [0] .nodeValue
sCaption3 = rawXML.getElementsByTagName(SS)[2] .getElementsByTagName('第')[0 ] .childNodes [0] .nodeValue
sCaption4 = rawXML.getElementsByTagName(SS)[3] .getElementsByTagName('第')[0] .childNodes [0] .nodeValue
sCaption5 = rawXML。的getElementsByTagName(SS)[4] .getElementsByTagName('第')[0] .childNodes [0] .nodeValue
sCaption6 = rawXML.getElementsByTagName(SS)[5] .getElementsByTagName('第') [0] .childNodes [0] .nodeValue
sCaption7 = rawXML.getElementsByTagName(SS)[6] .getElementsByTagName('第')[0] .childNodes [0] .nodeValue
sCaption8 = rawXML.getElementsByTagName(SS)[7] .getElementsByTagName('帽')[0] .childNodes [0] .nodeValue

有更多的是Windows应用商店的不仅仅是应用程序,也有评论,其中很多。有在Windows应用商店目前的应用程序超过210,000评论。这些评论来自世界各地,所以你需要一些国家或地区代码,您方便的花花公子应用程序ID和结尾要注意PN / 1,你会发现,这种服务只返回,每页10条评论中,只是增量此值PN / 2 PN / 3等,直到你用完了审查。

  VAR arrCounntryCodes =AE,AR,AT,AU,是,BG ,BH,CA,CH,瘦肉精,CN,CO,CR,CY,CZ,DE,DK,DZ EE,EG,ES,FI,FR,GB,GR,HK,HR,湖,标识,IE中,IL ,IN,智商,IT,联办,JP,KW,KZ,LB,LK,LT,吕氏春秋,LV, LY,MA,MT,MX,我的,NL,否,新西兰,OM,体育,PH,PK,PL ,质量检查,RO,RS,位,SA,SE,SG,SI,SK,TH,TN,TR, TT,UA,美国,UY,VE,VN]; 




https://services.apps.microsoft.com/4R/6.2.9200-1/1/en-US/m/US/Apps/f514d64b-8705-43b7-a400-c4f4f3dedfc0/Reviews/all/s /日期/ 1 / PN / 1




这一个是更加具有描述性元素的名称,所以我不看不到任何需要的这种进一步的解释。你可以看到它的全称,显示名称,用户选择了与代表自己的形象。



接下来我们可以做seaching一点点... https://services.apps.microsoft.com/search/6.2。 9200-1 / 615 / EN-US_en-US / M /美国/ C / US / IL / EN-US / CP / 10005001 /查询/ CID / 0 / PF / 1 / PC / 0 / PT / X64 / AF / 0 / LF / 0 / S / 0/2 / PN / 0?短语=软件开发人员



下面就有点神秘一遍,但现在你应该使用它。您可以从我的元素获得一个App ID,并从那里回浏览服务< I> f514d64b-8705-43b7-A400-c4f4f3dedfc0< / I>



所以你有它,拉万吨信息从Windows应用商店中的基础知识,然后可以做你请什么。如果你发现这个有用的和/或使利用信息一些应用程序,有一些额外的信息共享或以其他方式请让我知道在评论中。


I'm actually trying to find a way to check if an update is available for a Windows Store App. Is there a way to do this with an API ? thanks ! Essam

解决方案

There is an undocumented access to the Windows Store data outlined in this post:

http://jasonthomascarter.blogspot.com/2013/08/the-friendly-developers-guide-to.html

I've pasted the text of it here, in case the site ever goes away. :)

Today I received an inquiry from a fellow developer on the support email for one of my Windows Store apps App Roulette. That was pretty refreshing, and I'm pretty open to sharing information with other developers. I get more excited to see what they will create than worried over the potential for competition. So I'm here to share with you all. Anyhow, this developer was wondering how to get this App information and I'll explain how I access that and how you can too.

First a little self promotion, in addition to App Roulette I use this information in a few other apps. Developer Dashboard a one stop shop to view the reviews from all countries for all of your apps with a simple tap to translate each review, Windows Store Developers a directory of all the developers in the Windows Store (over 10000) and their apps, Most Active Reviewers a directory of the most prolific app reviewers and their reviews, and in my own portfolio app Software Developer which lists out all the other apps I have published in the Windows Store, please give some of them a try.

Here we go! First we will start with Robots.txt file for the Windows Store website.

http://apps.microsoft.com/robots.txt

Websites use robots.txt to guide web crawlers on how to behave, what they want them to see, and what they don't want them to see.

http://www.robotstxt.org/

Web Robots (also known as Web Wanderers, Crawlers, or Spiders), are programs that traverse the Web automatically. Search engines such as Google use them to index the web content, spammers use them to scan for email addresses, and they have many other uses.

In this case the Sitemaps.xml index file is what we are interested in. http://apps.microsoft.com/windows/sitemap_index.xml

http://www.sitemaps.org/

Sitemaps are an easy way for webmasters to inform search engines about pages on their sites that are available for crawling. In its simplest form, a Sitemap is an XML file that lists URLs for a site along with additional metadata about each URL (when it was last updated, how often it usually changes, and how important it is, relative to other URLs in the site) so that search engines can more intelligently crawl the site.

The Sitemap Index file lists out each of the individual Sitemap XML files. As of this writing, the apps.microsoft.com website has 141 individual Sitemap XML files.

Inside the individual files are thousands of URL's to the web pages of Windows Store apps. Such as this URL to the PlayTo Receiver app: http://apps.microsoft.com/windows/en-us/app/playto-receiver/72a6ba17-2d4e-4a1c-bcfb-cdc5d4b32d0e

These webpages for the apps do include a good bit of information that we could scrape from the HTML but we can do better.... The key information we are getting here is the App ID's and which geographies those App ID's are published to in the store. For example: 72a6ba17-2d4e-4a1c-bcfb-cdc5d4b32d0e and en-us etc...

And now to the good stuff, there a few web services we can call using our newly found App Id's and geography information.

https://services.apps.microsoft.com/browse/6.2.9200-1/615/en-US_en-US/c/US/cp/10005001/Apps/72a6ba17-2d4e-4a1c-bcfb-cdc5d4b32d0e

There is plenty of information available through this web service but it's not clearly spelled out by the element names. Here is my interpretation of many (not all) of them to start you off.

sSubCategoryName = rawXML.getElementsByTagName('Sc')[0].getElementsByTagName('N')[0].childNodes[0].nodeValue;
sSubCategoryId = rawXML.getElementsByTagName('Sc')[0].getElementsByTagName('I')[0].childNodes[0].nodeValue;
sHasTrial = rawXML.getElementsByTagName('Try')[0].childNodes[0].nodeValue;
sDescription = rawXML.getElementsByTagName('D')[0].childNodes[0].nodeValue;
sDeveloper = rawXML.getElementsByTagName('Dev')[0].childNodes[0].nodeValue;
sWebsite = rawXML.getElementsByTagName('Ws')[0].childNodes[0].nodeValue;
sSupport = rawXML.getElementsByTagName('Sws')[0].childNodes[0].nodeValue;
sPrivacy = rawXML.getElementsByTagName('Pu')[0].childNodes[0].nodeValue;
sCategoryName = rawXML.getElementsByTagName('C')[0].getElementsByTagName('N')[0].childNodes[0].nodeValue;
sCategoryId = rawXML.getElementsByTagName('C')[0].getElementsByTagName('I')[0].childNodes[0].nodeValue;
sPrice = rawXML.getElementsByTagName('P')[0].childNodes[0].nodeValue;
sForegroundColor = rawXML.getElementsByTagName('Fg')[0].childNodes[0].nodeValue;
sBackgroundColor = rawXML.getElementsByTagName('Bg')[0].childNodes[0].nodeValue;
sAppIcon = rawXML.getElementsByTagName('Ico')[0].childNodes[0].nodeValue;
sAppName = rawXML.getElementsByTagName('T')[0].childNodes[0].nodeValue;
sPackageFamilyName = rawXML.getElementsByTagName('Pfn')[0].childNodes[0].nodeValue;
sResourceId = rawXML.getElementsByTagName('R')[0].childNodes[0].nodeValue;
sId = rawXML.getElementsByTagName('I')[0].childNodes[0].nodeValue;
sCapabilities = sCapabilities + arrCapabilities[k].childNodes[0].nodeValue+",";
sUpdate = rawXML.getElementsByTagName('Ud')[0].childNodes[0].nodeValue;
sFeatures1 = rawXML.getElementsByTagName('Dbp')[0].childNodes[0].nodeValue;
sFeatures2 = rawXML.getElementsByTagName('Dbp')[1].childNodes[0].nodeValue;
sFeatures3 = rawXML.getElementsByTagName('Dbp')[2].childNodes[0].nodeValue;
sFeatures4 = rawXML.getElementsByTagName('Dbp')[3].childNodes[0].nodeValue;
sFeatures5 = rawXML.getElementsByTagName('Dbp')[4].childNodes[0].nodeValue;
sFeatures6 = rawXML.getElementsByTagName('Dbp')[5].childNodes[0].nodeValue;
sFeatures7 = rawXML.getElementsByTagName('Dbp')[6].childNodes[0].nodeValue;
sFeatures8 = rawXML.getElementsByTagName('Dbp')[7].childNodes[0].nodeValue;
sFeatures9 = rawXML.getElementsByTagName('Dbp')[8].childNodes[0].nodeValue;
sScreenshot1 = rawXML.getElementsByTagName('Ss')[0].getElementsByTagName('U')[0].childNodes[0].nodeValue
sScreenshot2 = rawXML.getElementsByTagName('Ss')[1].getElementsByTagName('U')[0].childNodes[0].nodeValue
sScreenshot3 = rawXML.getElementsByTagName('Ss')[2].getElementsByTagName('U')[0].childNodes[0].nodeValue
sScreenshot4 = rawXML.getElementsByTagName('Ss')[3].getElementsByTagName('U')[0].childNodes[0].nodeValue
sScreenshot5 = rawXML.getElementsByTagName('Ss')[4].getElementsByTagName('U')[0].childNodes[0].nodeValue
sScreenshot6 = rawXML.getElementsByTagName('Ss')[5].getElementsByTagName('U')[0].childNodes[0].nodeValue
sScreenshot7 = rawXML.getElementsByTagName('Ss')[6].getElementsByTagName('U')[0].childNodes[0].nodeValue
sScreenshot8 = rawXML.getElementsByTagName('Ss')[7].getElementsByTagName('U')[0].childNodes[0].nodeValue
sScreenshot9 = rawXML.getElementsByTagName('Ss')[8].getElementsByTagName('U')[0].childNodes[0].nodeValue
sCaption1 = rawXML.getElementsByTagName('Ss')[0].getElementsByTagName('Cap')[0].childNodes[0].nodeValue
sCaption2 = rawXML.getElementsByTagName('Ss')[1].getElementsByTagName('Cap')[0].childNodes[0].nodeValue
sCaption3 = rawXML.getElementsByTagName('Ss')[2].getElementsByTagName('Cap')[0].childNodes[0].nodeValue
sCaption4 = rawXML.getElementsByTagName('Ss')[3].getElementsByTagName('Cap')[0].childNodes[0].nodeValue
sCaption5 = rawXML.getElementsByTagName('Ss')[4].getElementsByTagName('Cap')[0].childNodes[0].nodeValue
sCaption6 = rawXML.getElementsByTagName('Ss')[5].getElementsByTagName('Cap')[0].childNodes[0].nodeValue
sCaption7 = rawXML.getElementsByTagName('Ss')[6].getElementsByTagName('Cap')[0].childNodes[0].nodeValue
sCaption8 = rawXML.getElementsByTagName('Ss')[7].getElementsByTagName('Cap')[0].childNodes[0].nodeValue

There is more to the Windows Store than just apps, there are also reviews, and lots of them. There are currently over 210,000 reviews for apps in the Windows Store. These reviews come from all over the world, so you'll need some country codes, your handy dandy App Id's and pay attention to the pn/1 at the end, you will find that this service only returns 10 reviews per page, just increment this value to pn/2, pn/3 etc.. until you run out of reviews.

var arrCounntryCodes = ["AE", "AR", "AT", "AU", "BE", "BG", "BH", "CA", "CH", "CL", "CN", "CO", "CR", "CY", "CZ", "DE", "DK", "DZ", "EE", "EG", "ES", "FI", "FR", "GB", "GR", "HK", "HR", "HU", "ID", "IE", "IL", "IN", "IQ", "IT", "JO", "JP", "KW", "KZ", "LB", "LK", "LT", "LU", "LV", "LY", "MA", "MT", "MX", "MY", "NL", "NO", "NZ", "OM", "PE", "PH", "PK", "PL", "QA", "RO", "RS", "RU", "SA", "SE", "SG", "SI", "SK", "TH", "TN", "TR", "TT", "UA", "US", "UY", "VE", "VN"];

https://services.apps.microsoft.com/4R/6.2.9200-1/1/en-US/m/US/Apps/f514d64b-8705-43b7-a400-c4f4f3dedfc0/Reviews/all/s/date/1/pn/1

This one is much more descriptive with the element names, so I don't see any need for further explaination of this. You can see the full name, display name, the image the user has chosen to represent themselves with.

Next up we can do a little bit of seaching... https://services.apps.microsoft.com/search/6.2.9200-1/615/en-US_en-US/m/US/c/US/il/en-US/cp/10005001/query/cid/0/pf/1/pc/0/pt/x64/af/0/lf/0/s/0/2/pn/0?phrase=Software Developer

Here it gets a little cryptic again, but by now you should be used to it. You can get the App ID from the I element and take it from there back to the browse service <I>f514d64b-8705-43b7-a400-c4f4f3dedfc0</I>

So there you have it, the basics of pulling tons of information out of the Windows Store that you can then do what you please with. If you find this useful and/or make some apps utilizing the information, have some additional information to share or otherwise please let me know in the comments.

这篇关于编程方式检查的Windows Store应用更新的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆