简体   繁体   English

从Yelp API获取多个商业图片(image_url)

[英]Get multiple business images (image_url) from yelp api

Using the Yelp Business API, is it possible to get more than one business image? 使用Yelp业务API,是否可以获取多个业务图像?

According to the documentation, the json returns only one image: http://www.yelp.com/developers/documentation/v2/business 根据文档,json仅返回一个图像: http : //www.yelp.com/developers/documentation/v2/business

There are several images available: 有几种可用的图像:

  • image_url - URL of photo for this business image_url-此商家的照片网址
  • snippet_image_url - URL of snippet image associated with this business snippet_image_url-与该业务相关联的代码段图像的URL
  • deals.image_url - Deal image url deal.image_url-交易图片网址
  • gift_certificates.image_url - Gift certificate image url gift_certificates.image_url-礼券图片网址
  • reviews.user.image_url - User profile image url reviews.user.image_url-用户个人资料图片网址
  • others that I may have missed 我可能已经错过的其他人

So, yes, it is possible to get more than one image. 因此,是的,有可能获得多个图像。

Of these image types, there could be multiple gift_certificate images (because gift_certificates is defined as a list). 在这些图像类型中,可能会有多个gift_certificate图像(因为gift_certificates被定义为列表)。 Similarly for deals.image_url . 对于deals.image_url同样deals.image_url Reviews might in future, but is currently restricted to 1 review at present. 评论可能会在将来发布,但目前仅限于1条评论。

There is an end point called the "business API". 有一个端点称为“业务API”。 According to the documentation the JSON response to this end point contains a field called photos where you can access multiple pictures of the business in question. 根据文档 ,对此终点的JSON响应包含一个称为photos的字段,您可以在其中访问所涉及业务的多张照片。 Hope this helped. 希望这会有所帮助。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM