为什么Foursquare的API不返回某些场馆菜单 [英] Why is Foursquare API not returning menu for certain venues
问题描述
我希望有人能想出解决办法:
I am hoping someone can figure this out:
通过Foursquare的API,你可以通过提供一个特定的餐厅Venue_ID获得菜单:
Through the Foursquare API, you can get the menu by providing the Venue_ID of a particular restaurant:
- https://developer.foursquare.com/docs/venues/menu
例如。 <一href=\"https://api.foursquare.com/v2/venues/47a1bddbf964a5207a4d1fe3/menu?oauth_token=my_auth_token_goes_here&v=20130928\" rel=\"nofollow\">https://api.foursquare.com/v2/venues/47a1bddbf964a5207a4d1fe3/menu?oauth_token=my_auth_token_goes_here&v=20130928
和工作的。
不过,这并不以下(和其他几个)餐馆工作:
But it doesn't work for the following (and several other) restaurants:
<一个href=\"https://api.foursquare.com/v2/venues/4fa027ede4b0e4be23b3374e/menu?oauth_token=my_auth_token_goes_here&v=20130928\" rel=\"nofollow\">https://api.foursquare.com/v2/venues/4fa027ede4b0e4be23b3374e/menu?oauth_token=my_auth_token_goes_here&v=20130928
- 这给我回一个响应,但菜单是空的! :(
您可以通过尝试出来的的https://developer.foursquare.com/docs/explore#req=venues/4fa027ede4b0e4be23b3374e/menu
You can confirm by trying it out at https://developer.foursquare.com/docs/explore#req=venues/4fa027ede4b0e4be23b3374e/menu
请问AP preciate任何帮助/这个见解。
Would appreciate any help/insights on this.
谢谢!
推荐答案
四方只允许通过它的公共API重新分配某些供应商菜单数据。不幸的是你在这样的一个例子绊倒了。如果计数
的菜单里面
对象 0
,你应该优雅地处理这种情况。
Foursquare is only allowed to redistribute menu data from certain providers through its public API. Unfortunately you've stumbled upon an example of this. If count
inside the menus
object is 0
, you should handle this situation gracefully.
这篇关于为什么Foursquare的API不返回某些场馆菜单的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!