Stubhub http请求

时间:2013-06-05 14:59:38

标签: api xmlhttprequest

我正在尝试弄清楚如何使用stubhub列表目录服务请求页面提供的HTTP请求URL:http://stubhubapi.stubhub.com/index.php/Anatomy_of_a_Listing_Catalog_Service_HTTP_Request

我在示例HTTP请求中查看了示例,为什么这样做:http://www.stubhub.com/listingCatalog/select/?q=%2B+stubhubDocumentType%3Agenre%0D%0A%2B+leaf%3Atrue%0D%0A&version=2.2&start=0&rows=10&indent=on返回它返回的内容?

如何修改此链接只返回Fenwick公园的Yankees游戏?

1 个答案:

答案 0 :(得分:0)

根据Stubhub API Reference,示例网址:

http://www.stubhub.com/listingCatalog/select/?q=%2B+stubhubDocumentType%3Agenre%0D%0A%2B+leaf%3Atrue%0D%0A&version=2.2&start=0&rows=10&indent=on

是以下SOLR搜索查询,转换为URL查询字符串:

  

+ stubhubDocumentType:流派

     

+叶:真

这看起来更像是

  

+ stubhubDocumentType:流派\ N +叶:真

最后编码为URL查询

  

%2B + stubhubDocumentType%3Agenre%0D 0A%%2B +叶%3Atrue%0D 0A%

http://www.stubhub.com/listingCatalog/select/是端点

最后的参数指定选项

对于芬威克公园的洋基队,您可能想要搜索位于芬威克公园的Stubhub Events并在描述中包含纽约洋基队。

您应该查看此PHP example,其中包含如何搜索特定搜索查询的搜索结果。

为了便于访问Stubhub Api,请查看Ruby Gem,它是API的好包装。