File tree Expand file tree Collapse file tree 4 files changed +7
-9
lines changed
functions/technologies/libs Expand file tree Collapse file tree 4 files changed +7
-9
lines changed Original file line number Diff line number Diff line change @@ -246,7 +246,6 @@ Returns a JSON object with the following schema:
246246
247247The following parameters can be used to filter the data:
248248
249- - ` client ` (optional): A string with the client: ` mobile ` or ` desktop ` .
250249- ` technology ` (optional): A comma-separated string representing the technology name(s) or ` ALL ` .
251250- ` category ` (optional): A comma-separated string representing the category name(s).
252251- ` onlyname ` (optional): No value required. If present, only the technology names will be returned.
@@ -255,7 +254,7 @@ The following parameters can be used to filter the data:
255254
256255``` bash
257256curl --request GET \
258- --url ' https://{{HOST}}/v1/technologies?category=Live%20chat%2C%20blog&technology=Smartsupp&client=mobile '
257+ --url ' https://{{HOST}}/v1/technologies?category=Live%20chat%2C%20blog&technology=Smartsupp'
259258```
260259
261260Returns a JSON object with the following schema:
@@ -266,7 +265,10 @@ Returns a JSON object with the following schema:
266265 "client" : " mobile" ,
267266 "similar_technologies" : null ,
268267 "description" : " Smartsupp is a live chat tool that offers visitor recording feature." ,
269- "origins" : 25649 ,
268+ "origins" : {
269+ "desktop" : 22178 ,
270+ "mobile" : 25649
271+ },
270272 "technology" : " Smartsupp" ,
271273 "category" : " Live chat"
272274 }
Original file line number Diff line number Diff line change @@ -3,7 +3,6 @@ class Presenters:
33 @staticmethod
44 def technology (item ):
55 return {
6- 'client' : item ['client' ],
76 'similar_technologies' : item ['similar_technologies' ],
87 'description' : item ['description' ],
98 'origins' : item ['origins' ],
Original file line number Diff line number Diff line change @@ -29,13 +29,10 @@ def list_data(params):
2929 filter = FieldFilter ("category_obj" , "array_contains_any" , params_array )
3030 )
3131
32- if "client" in params :
33- query = query .where (filter = FieldFilter ("client" , "==" , params ["client" ]))
34-
3532 documents = query .stream ()
3633 data = []
3734
38- if "onlyname" in params and "client" not in params :
35+ if "onlyname" in params :
3936 appended_tech = set ()
4037 for doc in documents :
4138 tech = doc .get ("technology" )
Original file line number Diff line number Diff line change @@ -13,7 +13,7 @@ def validate(self):
1313 # self.add_error("technology", "missing technology parameter")
1414
1515 return Result (errors = self .errors , result = self .params )
16-
16+
1717 def add_error (self , key , error ):
1818 self .errors .append ([key , error ])
1919
You can’t perform that action at this time.
0 commit comments