Skip to content

查询省份列表

通过本接口获取省份列表数据(不包含中国港澳台地区),可用于省份下的城市数据查询

请求参数类型描述
php
$instance->v3->capital->capitallhh->areas->provinces->getAsync([])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
  print_r(json_decode((string) $response->getBody(), true));
})
->wait();
php
$instance->chain('v3/capital/capitallhh/areas/provinces')->getAsync([])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
  print_r(json_decode((string) $response->getBody(), true));
})
->wait();
php
$instance['v3/capital/capitallhh/areas/provinces']->getAsync([])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
  print_r(json_decode((string) $response->getBody(), true));
})
->wait();
php
$response = $instance->v3->capital->capitallhh->areas->provinces->get([]);
print_r(json_decode((string) $response->getBody(), true));
php
$response = $instance->chain('v3/capital/capitallhh/areas/provinces')->get([]);
print_r(json_decode((string) $response->getBody(), true));
php
$response = $instance['v3/capital/capitallhh/areas/provinces']->get([]);
print_r(json_decode((string) $response->getBody(), true));
返回字典类型描述
dataobject[]省份列表
province_namestring省份名称
province_codeinteger省份编码
total_countinteger查询数据总条数

参阅 官方文档

Published on the GitHub by TheNorthMemory