使用 Etsy 的 API 文档没有列出listings
我可以使用的任何内容,这将允许某人编写如下请求:
$apistateloc = 'florida';
$apiurl = 'https://openapi.etsy.com/v2/listings/active?api_key=' . $apikey . '&limit=' . $apilimit . '®ion=' . $apistateloc;
API 确实提到Associations
了,但即使在查看了在测试区域后会出现的关联之后,也可以从userProfile
:
$userprofile = json_decode(file_get_contents('https://openapi.etsy.com/v2/users/' . $product->user_id . '/profile?api_key=' . $apikey));
$products[$i]["region"] = $userprofile->results[0]->region;
和上面的作品。我认为 API 参考Region
会允许这样做:
$theRegion = json_decode(file_get_contents('https://openapi.etsy.com/v2/private/regions?api_key=' . $apikey));
$products[$i]["region_state"] = $theRegion->results[0]->region_name;
但每次我运行它时,我都会得到以下结果:
"region_state":"European Union"
Etsy API 中有没有一种方法可以将所有活动列表 ( https://openapi.etsy.com/v2/listings/active
) 定位到某个区域,例如florida
?我正在尝试发出一个基于州、国家或城市的 JSON 请求。