簡體   English   中英

Yelp在iOS中搜索Api

[英]Yelp search Api in iOS

我正在開發一個應用程序,其中必須顯示Yelp的配件,價格和其他信息。
經過大量搜索后,我發現了一個有用的鏈接: https : //github.com/Yelp/yelp-api/tree/master/v2/ios
但是這種方法對我不起作用。

到目前為止,我只使用了一個正常工作的Web服務,而其他人則給出了諸如缺少參數之類的錯誤。

這正在工作:

http://api.yelp.com/business_review_search?term=mobile&ywsid=PyHVqegFdleV******&tl_lat=37.9&tl_long=-122.5&br_lat=37.788022&br_long=-122.399797

是否有另一個API調用可以向我返回價格,報價和其他信息,因為上面的一個正在審查中。

檢查我的答案: 如何在iOS中按名稱,位置搜索本地業務?

成功舉辦有關活動的場地信息

-(instancetype)initWithDict:(NSDictionary *)dict {

self = [super init];

if (self) {

    self.name = [dict objectForKey:@"name"];
    self.venueId = [dict objectForKey:@"id"];
    self.thumbURL = [dict objectForKey:@"image_url"];
    self.ratingURL = [dict objectForKey:@"rating_img_url"];
    self.yelpURL = [dict objectForKey:@"url"];
    self.venueId = [dict objectForKey:@"id"];
    self.reviewsCount =[[dict objectForKey:@"review_count"] stringValue];
    self.categories = [dict objectForKey:@"categories"][0][0];
    self.distance = [dict objectForKey:@"distance"];
    self.price = [dict objectForKey:@"deals.options.formatted_price"];
    self.address = [[[dict objectForKey:@"location"] objectForKey:@"address"] componentsJoinedByString:@", "];
    NSArray *adr = [[dict objectForKey:@"location"] objectForKey:@"display_address"];
    self.displayAddress = [adr componentsJoinedByString:@","];
}
return self;

}

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM