reach_commons 0.18.7__py3-none-any.whl → 0.18.9__py3-none-any.whl
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.
|
@@ -4,10 +4,17 @@ import requests
|
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
class OutscraperClient:
|
|
7
|
-
def __init__(self, token=None):
|
|
7
|
+
def __init__(self, token=None, webhook_url=None):
|
|
8
8
|
self.environment = os.environ.get("ENV", "Staging")
|
|
9
9
|
self.base_url = "https://api.app.outscraper.com"
|
|
10
|
-
self.token = token
|
|
10
|
+
self.token = token or {
|
|
11
|
+
"Staging": "MjZjYWUyMzg4MzUxNDk2Zjk0OGRlOTFlMzkyMDhhYWF8ZDhlNzM5OGVmOQ",
|
|
12
|
+
"Prod": "MjZjYWUyMzg4MzUxNDk2Zjk0OGRlOTFlMzkyMDhhYWF8ZDhlNzM5OGVmOQ",
|
|
13
|
+
}.get(self.environment)
|
|
14
|
+
self.webhook_url = webhook_url or {
|
|
15
|
+
"Staging": "https://api-staging.getreach.ai/webhooks/data-bridge/outscraper/scraper-completed?token=tRm4k75N9hK1vF0dSwIi0HcMyV",
|
|
16
|
+
"Prod": "https://api.getreach.ai/webhooks/data-bridge/outscraper/scraper-completed?token=tRm4k75N9hK1vF0dSwIi0HcMyV",
|
|
17
|
+
}.get(self.environment)
|
|
11
18
|
|
|
12
19
|
@property
|
|
13
20
|
def headers(self):
|
|
@@ -16,19 +23,7 @@ class OutscraperClient:
|
|
|
16
23
|
"Content-Type": "application/json",
|
|
17
24
|
}
|
|
18
25
|
|
|
19
|
-
|
|
20
|
-
"Staging": "MjZjYWUyMzg4MzUxNDk2Zjk0OGRlOTFlMzkyMDhhYWF8ZDhlNzM5OGVmOQ",
|
|
21
|
-
"Prod": "MjZjYWUyMzg4MzUxNDk2Zjk0OGRlOTFlMzkyMDhhYWF8ZDhlNzM5OGVmOQ",
|
|
22
|
-
}.get(self.environment)
|
|
23
|
-
|
|
24
|
-
return {**common_headers, "X-API-KEY": self.token or auth_token}
|
|
25
|
-
|
|
26
|
-
@property
|
|
27
|
-
def webhook_url(self):
|
|
28
|
-
return {
|
|
29
|
-
"Staging": "https://api-staging.getreach.ai/webhooks/data-bridge/outscraper/scraper-completed?token=tRm4k75N9hK1vF0dSwIi0HcMyV",
|
|
30
|
-
"Prod": "https://api.getreach.ai/webhooks/data-bridge/outscraper/scraper-completed?token=tRm4k75N9hK1vF0dSwIi0HcMyV",
|
|
31
|
-
}.get(self.environment)
|
|
26
|
+
return {**common_headers, "X-API-KEY": self.token}
|
|
32
27
|
|
|
33
28
|
def search_google_maps_reviews(
|
|
34
29
|
self, google_place_id: str, start_from: int = None, cutoff=None
|
|
@@ -7,7 +7,7 @@ reach_commons/app_logging/logging_config.py,sha256=Y1JaZOoQBWgQjkOqYmeDRIm0p2eCO
|
|
|
7
7
|
reach_commons/clients/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
8
8
|
reach_commons/clients/event_processor.py,sha256=KmYF0kuZxLmHQjJASXMr5jz2D_D3WNHB0c4QOlZo1_E,2024
|
|
9
9
|
reach_commons/clients/hubspot.py,sha256=ntAzvwoaq78MkKaVoZ7geND-AafAzccNnJogfJDahVA,5497
|
|
10
|
-
reach_commons/clients/outscraper.py,sha256=
|
|
10
|
+
reach_commons/clients/outscraper.py,sha256=030VDKcOPCz5rBMhDcjHEOhrdUTlPeJQYO_ukICJi3Y,2059
|
|
11
11
|
reach_commons/clients/reach_data_bridge.py,sha256=TnKqn43qMAT7gexYsZNdTR43gh6mKEIG4jrlwJxp-SY,5630
|
|
12
12
|
reach_commons/clients/reach_ops_api.py,sha256=1kTY4cF2eBCl_kqs1r5lbzxt4_7EFRmltbYSTa5aQA4,2440
|
|
13
13
|
reach_commons/mongo/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
@@ -27,6 +27,6 @@ reach_commons/redis_manager.py,sha256=SgUtdtt0eV4bUwsWDankIa9Bjfgcm2DKcmVMQT6ptF
|
|
|
27
27
|
reach_commons/sms_smart_encoding.py,sha256=92y0RmZ0l4ONHpC9qeO5KfViSNq64yE2rc7lhNDSZqE,1241
|
|
28
28
|
reach_commons/utils.py,sha256=dMgKIGqTgoSItuBI8oz81gKtW3qi21Jkljv9leS_V88,8475
|
|
29
29
|
reach_commons/validations.py,sha256=CJdWg8qc9ILe3rYHYTLdr2upRspsM_8ghhm4IXX4Pg8,1028
|
|
30
|
-
reach_commons-0.18.
|
|
31
|
-
reach_commons-0.18.
|
|
32
|
-
reach_commons-0.18.
|
|
30
|
+
reach_commons-0.18.9.dist-info/METADATA,sha256=cpLGrGZc7U3WHJx3egWExXMXuTlo5oryczp7zpyvIcA,1860
|
|
31
|
+
reach_commons-0.18.9.dist-info/WHEEL,sha256=FMvqSimYX_P7y0a7UY-_Mc83r5zkBZsCYPm7Lr0Bsq4,88
|
|
32
|
+
reach_commons-0.18.9.dist-info/RECORD,,
|
|
File without changes
|