File tree Expand file tree Collapse file tree 2 files changed +49
-2
lines changed Expand file tree Collapse file tree 2 files changed +49
-2
lines changed Original file line number Diff line number Diff line change @@ -110,6 +110,53 @@ curl --request GET \
110
110
111
111
```
112
112
113
+ ### ` GET /cwv `
114
+
115
+ #### Parameters
116
+
117
+ The following parameters can be used to filter the data:
118
+
119
+ - ` geo ` (` required ` ): A string representing the geographic location.
120
+ - ` technology ` (` required ` ): A string representing the technology name.
121
+ - ` rank ` (` required ` ): An string representing the rank.
122
+ - ` start ` (optional): A string representing the start date in the format ` YYYY-MM-DD ` .
123
+ - ` end ` (optional): A string representing the end date in the format ` YYYY-MM-DD ` .
124
+
125
+ #### Response
126
+
127
+ ``` bash
128
+ curl --request GET \
129
+ --url ' https://dev-gw-2vzgiib6.uk.gateway.dev/v1/cwv?start=2023-01-01&end=2023-09-01&geo=Uruguay&technology=DomainFactory&rank=ALL'
130
+
131
+ ```
132
+
133
+ ``` json
134
+ [
135
+ {
136
+ "geo" : " Uruguay" ,
137
+ "date" : " 2023-06-01" ,
138
+ "rank" : " ALL" ,
139
+ "technology" : " DomainFactory" ,
140
+ "vitals" : [
141
+ {
142
+ "mobile" : {
143
+ "good_number" : 1 ,
144
+ "tested" : 4
145
+ },
146
+ "desktop" : {
147
+ "good_number" : 0 ,
148
+ "tested" : 2
149
+ },
150
+ "name" : " overall"
151
+ },
152
+ ...
153
+ ]
154
+ }
155
+ ]
156
+
157
+ ```
158
+
159
+
113
160
### ` GET /technologies `
114
161
115
162
#### Parameters
Original file line number Diff line number Diff line change @@ -14,11 +14,11 @@ def list_data(params):
14
14
query = query .where ('date' , '>=' , params ['start' ])
15
15
if 'end' in params :
16
16
query = query .where ('date' , '<=' , params ['end' ])
17
+
17
18
if 'geo' in params :
18
19
query = query .where ('geo' , '==' , params ['geo' ])
19
20
if 'technology' in params :
20
- params_array = json .loads (params ['technology' ])
21
- query = query .where ('technology' , 'in' , params_array )
21
+ query = query .where ('technology' , '==' , params ['technology' ])
22
22
if 'rank' in params :
23
23
query = query .where ('rank' , '==' , params ['rank' ])
24
24
You can’t perform that action at this time.
0 commit comments