mirror of
https://github.com/httprunner/httprunner.git
synced 2026-05-19 17:59:34 +08:00
Add example
This commit is contained in:
19
docs/examples/test_klook/api/find_place_api.yml
Normal file
19
docs/examples/test_klook/api/find_place_api.yml
Normal file
@@ -0,0 +1,19 @@
|
||||
name: find place from text
|
||||
base_url: https://maps.googleapis.com
|
||||
request:
|
||||
method: GET
|
||||
url: /maps/api/place/findplacefromtext/json
|
||||
params:
|
||||
key: $key
|
||||
inputtype: textquery
|
||||
input: $input
|
||||
fields: 'formatted_address,geometry,name,permanently_closed,place_id,plus_code,types'
|
||||
language: zh_CN
|
||||
variables:
|
||||
input: 宝安
|
||||
key: your_google_map_key
|
||||
validate:
|
||||
- eq: [status_code, 200]
|
||||
- eq: [content.status, OK]
|
||||
extract:
|
||||
- place_id: content.candidates.0.place_id
|
||||
11
docs/examples/test_klook/api/get_area_groups_api.yml
Normal file
11
docs/examples/test_klook/api/get_area_groups_api.yml
Normal file
@@ -0,0 +1,11 @@
|
||||
name: get_groups
|
||||
base_url: http://localhost:8085
|
||||
request:
|
||||
url: /v1/transferairportadminsrv/area/getGroups
|
||||
method: POST
|
||||
headers:
|
||||
Content-Type: application/x-www-form-urlencoded
|
||||
Accept-language: zh_CN
|
||||
cookie: $admin_cookie
|
||||
data:
|
||||
parentAreaId: 7037 # 广东省
|
||||
17
docs/examples/test_klook/api/place_detail_api.yml
Normal file
17
docs/examples/test_klook/api/place_detail_api.yml
Normal file
@@ -0,0 +1,17 @@
|
||||
name: get place detail
|
||||
request:
|
||||
method: GET
|
||||
url: https://maps.googleapis.com/maps/api/place/details/json
|
||||
params:
|
||||
key: $key
|
||||
placeid: $place_id
|
||||
fields: 'address_component,formatted_address,geometry'
|
||||
language: zh-CN
|
||||
variables:
|
||||
key: your_google_map_key
|
||||
place_id: ChIJzyoujG6SAzQRRD3Jr26PFfM
|
||||
validate:
|
||||
- eq: [status_code, 200]
|
||||
- eq: [content.status, OK]
|
||||
extract:
|
||||
- place_name: content.result.formatted_address
|
||||
11
docs/examples/test_klook/api/search_area_by_name_api.yml
Normal file
11
docs/examples/test_klook/api/search_area_by_name_api.yml
Normal file
@@ -0,0 +1,11 @@
|
||||
name: search_area_by_name
|
||||
base_url: http://localhost:8085
|
||||
request:
|
||||
url: /v1/transferairportadminsrv/area/search_area_by_name
|
||||
method: GET
|
||||
headers:
|
||||
Content-Type: application/x-www-form-urlencoded
|
||||
Accept-language: zh_CN
|
||||
cookie: $admin_cookie
|
||||
params:
|
||||
areaName: $in
|
||||
Reference in New Issue
Block a user