如何使用价格参数从foursquare API过滤场地


how to filter the venues from foursquare api using the price parameter

$params = array(
            "ll" => "$lat,$lng",
            "llAcc" => "100000", //"100";
            "radius"=> "100000",
            "categoryId"=>"4d4b7105d754a06374d81259",
            "venuePhotos" => 1,
            "price" => $price,
            "sortByDistance" => 1,
            "limit" => $limit,
            "offset" => $offset,
            "intent" => "global"

);

$response = $this->foursquareapi->GetPublic("venues/explore",$params);

是否有可能使用价格参数过滤场地或其他方式??

根据我的经验,价格参数并不适用于所有国家。它适用于某些国家的场馆,如英国、奥地利、比利时、美国。但与此同时,它并不适用于来自澳大利亚、印度等国家的场馆。

根据explore api端点价格应按如下方式使用:

以逗号分隔的价格点列表。目前价格点的有效范围是[1,2,3,4],1是最便宜的,4是最贵的。对于餐饮场所,在美国,1是<10美元一个主菜,2是10- 20美元一个主菜,3是20- 30美元一个主菜,4是30美元一个主菜。

因此,如果您将相关值传递给price键,则应该返回适当的过滤场地