Skip to content

Commit

Permalink
Add PokeAPI
Browse files Browse the repository at this point in the history
  • Loading branch information
camilamaia committed Jun 25, 2020
1 parent 63dd215 commit b353f26
Show file tree
Hide file tree
Showing 7 changed files with 1,707 additions and 214 deletions.
4 changes: 2 additions & 2 deletions demo-api/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@
[Demo API](https://github.com/scanapi/demo-api) is an API created by the ScanAPI team for demo
purposes. It can be accessed at https://demo.scanapi.dev/api

# Run

Requirements:
- [ScanAPI](https://pypi.org/project/scanapi/)

# Run

```shell
$ git clone [email protected]:scanapi/examples.git
$ cd demo-api
Expand Down
18 changes: 9 additions & 9 deletions demo-api/api.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,15 @@ api:
method: get
path: /health/
tests:
- name: Response Status is 200
- name: status_code_is_200
assert: ${{ response.status_code == 200 }}
- name: Response Body Equals OK
- name: bode_equals_ok
assert: ${{ response.content == b"OK!" }}
- name: languages
method: get
path: /languages/
tests:
- name: Response Status is 200
- name: status_code_is_200
assert: ${{ response.status_code == 200 }}
endpoints:
- name: devs
Expand All @@ -26,21 +26,21 @@ api:
vars:
uuid: ${{response.json()[2]["uuid"]}}
tests:
- name: Response Status is 200
- name: status_code_is_200
assert: ${{ response.status_code == 200 }}
- name: looking_for_new_opportunities
method: get
params:
newOpportunities: true
tests:
- name: Response Status is 200
- name: status_code_is_200
assert: ${{ response.status_code == 200 }}
- name: not_looking_for_new_opportunities
method: get
params:
newOpportunities: false
tests:
- name: Response Status is 200
- name: status_code_is_200
assert: ${{ response.status_code == 200 }}
- name: new
method: post
Expand Down Expand Up @@ -70,18 +70,18 @@ api:
- name: get
method: get
tests:
- name: Response Status is 200
- name: status_code_is_200
assert: ${{ response.status_code == 200 }}
- name: delete
method: delete
headers:
x-api-key: ${DEMO_KEY}
tests:
- name: Response Status is 200
- name: status_code_is_200
assert: ${{ response.status_code == 200 }}
- name: languages
path: languages
method: get
tests:
- name: Response Status is 200
- name: status_code_is_200
assert: ${{ response.status_code == 200 }}
Loading

0 comments on commit b353f26

Please sign in to comment.