-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrestClient.http
188 lines (147 loc) · 2.65 KB
/
restClient.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
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
@endpoint = http://localhost:4200/graphql
# !: RESTAURANT
###
POST {{endpoint}}
Content-Type: application/json
X-REQUEST-TYPE: GraphQL
query getAllRestaurants {
getAllRestaurants {
name
description
cookingStyles {
label
}
}
}
###
POST {{ endpoint }}
Content-Type: application/json
X-REQUEST-TYPE: GraphQL
query getRestaurant($id:ID!) {
getRestaurant(id: $id) {
name
description
cookingStyles {
label
}
}
}
{"id":1}
###
POST {{ endpoint }}
Content-Type: application/json
X-REQUEST-TYPE: GraphQL
query getRestaurantByCookingStyle($label: String!) {
getRestaurantByCookingStyle(label: $label){
name
}
}
{"label": "Albanie"}
# !: MANAGER
###
POST {{ endpoint }}
Content-Type: application/json
X-REQUEST-TYPE: GraphQL
query getAllManagers {
getAllManagers {
firstname
lastname
email
}
}
###
POST {{ endpoint }}
Content-Type: application/json
X-REQUEST-TYPE: GraphQL
query getManager($id: ID!) {
getManager(id: $id) {
firstname
lastname
email
}
}
{"id":3}
# !: CITY
###
POST {{ endpoint }}
Content-Type: application/json
X-REQUEST-TYPE: GraphQL
query GetAllCities {
getAllCities{
id
name
restaurants{
id
name
}
}
}
###
POST {{ endpoint }}
Content-Type: application/json
X-REQUEST-TYPE: GraphQL
query GetAllRestaurantByCity($CityId: ID!) {
getCity(id: $CityId){
id
name
restaurants{
id
name
}
}
}
{
"CityId":193
}
# !: COOKING STYLE
###
POST {{ endpoint }}
Content-Type: application/json
X-REQUEST-TYPE: GraphQL
query GetCookingStyles {
getCookingStyles{
label
}
}
###
POST {{ endpoint }}
Content-Type: application/json
X-REQUEST-TYPE: GraphQL
query GetStyleByName($label: String!) {
getStyleByName(label: $label) {
label
id
restaurants{
name
city{
name
}
}
}
}
{
"label":"Cuba"
}
##################################
# !: API WEATHER THIRD PARTY
### KEY Disabled
POST {{ endpoint }}
Content-Type: application/json
X-REQUEST-TYPE: GraphQL
query GetCity($getCityId: ID!) {
getCity(id: $getCityId) {
name
weather{
LocalizedName
}
}
}
{
"getCityId": 3
}
### TEST API here
GET https://pokeapi.co/api/v2/pokemon/ditto
###
GET https://ghibliapi.herokuapp.com/films/58611129-2dbc-4a81-a72f-77ddfc1b1b49
### TEST weather API
GET http://dataservice.accuweather.com/locations/v1/cities/geoposition/search?apikey=Egf1hkjXCK8bKk3iTgjPvH3NV92uf7ES&q=-72.9477%2C7.4994 HTTP/1.1