-
Notifications
You must be signed in to change notification settings - Fork 0
/
test_api.http
78 lines (61 loc) · 1.66 KB
/
test_api.http
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
# Tests for FastAPI endpoints
### Get list of categories
GET http://localhost:8000/v1/categories
Accept: application/json
### Get list of genders
GET http://localhost:8000/v1/genders
Accept: application/json
### Get list of regions
GET http://localhost:8000/v1/regions
Accept: application/json
### Get list of filters
GET http://localhost:8000/v1/filters
Content-Type: application/json
Accept: application/json
### Search creators with no filters
POST http://localhost:8000/v1/search_creators
Content-Type: application/json
Accept: application/json
{
"filters": {
"gender": null,
"categories": []
}
}
### Login existing user
POST http://localhost:8000/v1/auth/login
Content-Type: application/x-www-form-urlencoded
Accept: application/json
username = desfrutando.vida@test.com &
password = 00000001
### Get user info for logged existing user
GET http://localhost:8000/v1/auth/user
Accept: application/json
### Logout existing user
POST http://localhost:8000/v1/auth/logout
Accept: application/json
### Signup new user
POST http://localhost:8000/v1/auth/signup
Content-Type: application/x-www-form-urlencoded
Accept: application/json
username = bot@auraz.com.br &
password = 12345678
### Get user info for logged new user
GET http://localhost:8000/v1/auth/user
Accept: application/json
### Logout new user
POST http://localhost:8000/v1/auth/logout
Accept: application/json
### List contacts
GET http://localhost:8000/v1/contacts
Accept: application/json
### Create contact
POST http://localhost:8000/v1/contacts
Content-Type: application/json
Accept: application/json
{
"email": "test@test.com",
"name": "Tester",
"type": "creator",
"message": "Testing contact"
}