canonicalwebteam.store-api 4.7.2__tar.gz → 4.8.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: canonicalwebteam.store-api
3
- Version: 4.7.2
3
+ Version: 4.8.0
4
4
  Summary:
5
5
  License: LGPL-3.0
6
6
  Author: Canonical Web Team
@@ -60,6 +60,29 @@ class SnapStore(Store):
60
60
  name, None, fields, api_version
61
61
  )
62
62
 
63
+ def find(
64
+ self,
65
+ query="",
66
+ category="",
67
+ architecture="",
68
+ publisher="",
69
+ featured="false",
70
+ fields=[],
71
+ ):
72
+ url = self.get_endpoint_url("find", 2)
73
+ headers = self.config[2].get("headers")
74
+ params = {
75
+ "q": query,
76
+ "category": category,
77
+ "architecture": architecture,
78
+ "publisher": publisher,
79
+ "featured": featured,
80
+ }
81
+ if fields:
82
+ params["fields"] = ",".join(fields)
83
+ response = self.session.get(url, params=params, headers=headers)
84
+ return self.process_response(response)
85
+
63
86
 
64
87
  class SnapPublisher(Publisher):
65
88
  def __init__(self, session=requests.Session()):
@@ -1,6 +1,6 @@
1
1
  [tool.poetry]
2
2
  name = 'canonicalwebteam.store-api'
3
- version = '4.7.2'
3
+ version = '4.8.0'
4
4
  description = ''
5
5
  authors = ['Canonical Web Team <webteam@canonical.com>']
6
6
  license = 'LGPL-3.0'