查询城市列表
通过本接口根据省份编码获取省份下的城市列表信息,不包含中国港澳台地区城市信息,可用于支行数据过滤查询
请求参数 | 类型 | 描述 |
---|---|---|
province_code | integer | 省份编码 |
php
$instance->v3->capital->capitallhh->areas->provinces->_province_code_->cities->getAsync([
'province_code' => '10',
])
->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/{province_code}/cities')->getAsync([
'province_code' => '10',
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
print_r(json_decode((string) $response->getBody(), true));
})
->wait();
php
$instance['v3/capital/capitallhh/areas/provinces/{province_code}/cities']->getAsync([
'province_code' => '10',
])
->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->_province_code_->cities->get([
'province_code' => '10',
]);
print_r(json_decode((string) $response->getBody(), true));
php
$response = $instance->chain('v3/capital/capitallhh/areas/provinces/{province_code}/cities')->get([
'province_code' => '10',
]);
print_r(json_decode((string) $response->getBody(), true));
php
$response = $instance['v3/capital/capitallhh/areas/provinces/{province_code}/cities']->get([
'province_code' => '10',
]);
print_r(json_decode((string) $response->getBody(), true));
返回字典 | 类型 | 描述 |
---|---|---|
data | object[] | 城市列表 |
city_name | string | 城市名称 |
city_code | integer | 城市编码 |
total_count | integer | 查询数据总条数 |
参阅 官方文档