xautomata-hive 3.1.3__py3-none-any.whl → 3.2.0__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.
- hive/api.py +6 -3
- hive/cookbook/acl_docs.py +1 -1
- hive/cookbook/acl_overrides.py +22 -1
- hive/cookbook/analytics.py +11 -1
- hive/cookbook/anomalies.py +30 -1
- hive/cookbook/calendars.py +95 -1
- hive/cookbook/contacts.py +114 -1
- hive/cookbook/customers.py +293 -7
- hive/cookbook/dashboards.py +82 -1
- hive/cookbook/dispatchers.py +117 -1
- hive/cookbook/downtimes.py +100 -1
- hive/cookbook/external_tickets.py +117 -1
- hive/cookbook/firmware_updates.py +20 -1
- hive/cookbook/groups.py +88 -1
- hive/cookbook/last_status.py +48 -2
- hive/cookbook/login.py +163 -1
- hive/cookbook/messages.py +35 -1
- hive/cookbook/metric_ingest.py +1 -1
- hive/cookbook/metric_types.py +71 -1
- hive/cookbook/metrics.py +77 -1
- hive/cookbook/notification_provider_types.py +32 -1
- hive/cookbook/notification_providers.py +28 -1
- hive/cookbook/objects.py +95 -1
- hive/cookbook/opening_reasons.py +33 -1
- hive/cookbook/probe_types.py +31 -1
- hive/cookbook/probes.py +70 -1
- hive/cookbook/probes_log_ingest.py +5 -1
- hive/cookbook/profile_topics.py +24 -1
- hive/cookbook/reason_for_closure.py +36 -6
- hive/cookbook/retention_rules.py +30 -1
- hive/cookbook/schedules.py +20 -1
- hive/cookbook/services.py +114 -2
- hive/cookbook/sites.py +93 -1
- hive/cookbook/tree_hierarchy.py +89 -1
- hive/cookbook/ts_cost_azure_raw.py +154 -1
- hive/cookbook/ts_cost_management.py +136 -114
- hive/cookbook/ts_metric_status.py +20 -1
- hive/cookbook/ts_metric_value.py +19 -1
- hive/cookbook/ts_ntop_flows.py +25 -1
- hive/cookbook/ts_service_status.py +48 -2
- hive/cookbook/ts_service_value.py +43 -1
- hive/cookbook/users.py +174 -3
- hive/cookbook/users_notifications.py +109 -0
- hive/cookbook/virtual_domains.py +47 -1
- hive/cookbook/webhooks.py +21 -1
- hive/cookbook/widget_groups.py +39 -1
- hive/cookbook/widgets.py +60 -1
- hive/version.py +1 -1
- {xautomata_hive-3.1.3.dist-info → xautomata_hive-3.2.0.dist-info}/METADATA +1 -1
- xautomata_hive-3.2.0.dist-info/RECORD +58 -0
- xautomata_hive-3.1.3.dist-info/RECORD +0 -57
- {xautomata_hive-3.1.3.dist-info → xautomata_hive-3.2.0.dist-info}/LICENSE +0 -0
- {xautomata_hive-3.1.3.dist-info → xautomata_hive-3.2.0.dist-info}/WHEEL +0 -0
- {xautomata_hive-3.1.3.dist-info → xautomata_hive-3.2.0.dist-info}/top_level.txt +0 -0
hive/api.py
CHANGED
@@ -289,6 +289,8 @@ class ApiManager:
|
|
289
289
|
url_put = '/' + url_put.lstrip('/').rstrip('/') + '/'
|
290
290
|
|
291
291
|
method = url_get.split('/')[1]
|
292
|
+
if method not in ['customers', 'virtual_domains', 'sites', 'groups', 'objects', 'metric_types', 'metrics', 'services']:
|
293
|
+
raise NotImplementedError(f'the {method} has not been implemented')
|
292
294
|
|
293
295
|
get_count, post_count, put_count = 0, 0, 0
|
294
296
|
|
@@ -462,8 +464,6 @@ from hive.cookbook.external_tickets import ExternalTickets
|
|
462
464
|
from hive.cookbook.firmware_updates import FirmwareUpdates
|
463
465
|
from hive.cookbook.groups import Groups
|
464
466
|
from hive.cookbook.metric_ingest import MetricIngest
|
465
|
-
from hive.cookbook.last_status import LastStatus
|
466
|
-
from hive.cookbook.tree_hierarchy import TreeHierarchy
|
467
467
|
from hive.cookbook.login import Login
|
468
468
|
from hive.cookbook.messages import Messages
|
469
469
|
from hive.cookbook.metrics import Metrics
|
@@ -481,6 +481,8 @@ from hive.cookbook.retention_rules import RetentionRules
|
|
481
481
|
from hive.cookbook.schedules import Schedules
|
482
482
|
from hive.cookbook.services import Services
|
483
483
|
from hive.cookbook.sites import Sites
|
484
|
+
from hive.cookbook.last_status import LastStatus
|
485
|
+
from hive.cookbook.tree_hierarchy import TreeHierarchy
|
484
486
|
from hive.cookbook.ts_cost_azure_raw import TsCostAzureRaw
|
485
487
|
from hive.cookbook.ts_cost_management import TsCostManagement
|
486
488
|
from hive.cookbook.ts_metric_status import TsMetricStatus
|
@@ -489,6 +491,7 @@ from hive.cookbook.ts_ntop_flows import TsNtopFlows
|
|
489
491
|
from hive.cookbook.ts_service_status import TsServiceStatus
|
490
492
|
from hive.cookbook.ts_service_value import TsServiceValue
|
491
493
|
from hive.cookbook.users import Users
|
494
|
+
from hive.cookbook.users_notifications import UsersNotifications
|
492
495
|
from hive.cookbook.virtual_domains import VirtualDomains
|
493
496
|
from hive.cookbook.widgets import Widgets
|
494
497
|
from hive.cookbook.webhooks import Webhooks
|
@@ -496,7 +499,7 @@ from hive.cookbook.widget_groups import WidgetGroups
|
|
496
499
|
# hive imports stop
|
497
500
|
|
498
501
|
|
499
|
-
class XautomataApi(AclDocs, AclOverrides, Analytics, Anomalies, Calendars, Contacts, Customers, Dashboards, Dispatchers, Downtimes, ExternalTickets, FirmwareUpdates, Groups, MetricIngest,
|
502
|
+
class XautomataApi(AclDocs, AclOverrides, Analytics, Anomalies, Calendars, Contacts, Customers, Dashboards, Dispatchers, Downtimes, ExternalTickets, FirmwareUpdates, Groups, MetricIngest, Login, Messages, Metrics, ProbesLogIngest, MetricTypes, NotificationProviders, NotificationProviderTypes, Objects, OpeningReasons, Probes, ProbeTypes, ProfileTopics, ReasonForClosure, RetentionRules, Schedules, Services, Sites, LastStatus, TreeHierarchy, TsCostAzureRaw, TsCostManagement, TsMetricStatus, TsMetricValue, TsNtopFlows, TsServiceStatus, TsServiceValue, Users, UsersNotifications, VirtualDomains, Widgets, Webhooks, WidgetGroups):
|
500
503
|
"""
|
501
504
|
Class with each specific API, based on the ApiManager Class created for a more general interaction with Xautomata API
|
502
505
|
"""
|
hive/cookbook/acl_docs.py
CHANGED
hive/cookbook/acl_overrides.py
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
from hive.api import ApiManager, handling_single_page_methods
|
1
|
+
from hive.api import ApiManager, handling_single_page_methods, warning_wrong_parameters
|
2
2
|
|
3
3
|
|
4
4
|
class AclOverrides(ApiManager):
|
@@ -27,6 +27,14 @@ class AclOverrides(ApiManager):
|
|
27
27
|
Returns: list"""
|
28
28
|
if kwargs is None:
|
29
29
|
kwargs = dict()
|
30
|
+
official_params_list = ['sort_by', 'null_fields', 'code',
|
31
|
+
'json_schema', 'skip', 'limit', 'like', 'join', 'count']
|
32
|
+
params.get('sort_by'), params.get('null_fields'), params.get('code'
|
33
|
+
), params.get('json_schema'), params.get('skip'), params.get(
|
34
|
+
'limit'), params.get('like'), params.get('join'), params.get(
|
35
|
+
'count')
|
36
|
+
warning_wrong_parameters(self.acl_overrides.__name__, params,
|
37
|
+
official_params_list)
|
30
38
|
response = self.execute('GET', path=f'/acl_overrides/', single_page
|
31
39
|
=single_page, page_size=page_size, warm_start=warm_start,
|
32
40
|
params=params, **kwargs)
|
@@ -43,6 +51,10 @@ class AclOverrides(ApiManager):
|
|
43
51
|
Returns: list"""
|
44
52
|
if kwargs is None:
|
45
53
|
kwargs = dict()
|
54
|
+
official_payload_list = ['code', 'acl_override']
|
55
|
+
payload.get('code'), payload.get('acl_override')
|
56
|
+
warning_wrong_parameters(self.acl_overrides_create.__name__,
|
57
|
+
payload, official_payload_list)
|
46
58
|
response = self.execute('POST', path=f'/acl_overrides/', payload=
|
47
59
|
payload, **kwargs)
|
48
60
|
return response
|
@@ -74,6 +86,10 @@ class AclOverrides(ApiManager):
|
|
74
86
|
Returns: list"""
|
75
87
|
if kwargs is None:
|
76
88
|
kwargs = dict()
|
89
|
+
official_payload_list = ['code', 'acl_override']
|
90
|
+
payload.get('code'), payload.get('acl_override')
|
91
|
+
warning_wrong_parameters(self.acl_overrides_put.__name__, payload,
|
92
|
+
official_payload_list)
|
77
93
|
response = self.execute('PUT', path=f'/acl_overrides/{uuid}',
|
78
94
|
payload=payload, **kwargs)
|
79
95
|
return response
|
@@ -110,6 +126,11 @@ class AclOverrides(ApiManager):
|
|
110
126
|
Returns: list"""
|
111
127
|
if kwargs is None:
|
112
128
|
kwargs = dict()
|
129
|
+
official_params_list = ['skip', 'limit', 'like', 'join', 'count']
|
130
|
+
params.get('skip'), params.get('limit'), params.get('like'
|
131
|
+
), params.get('join'), params.get('count')
|
132
|
+
warning_wrong_parameters(self.acl_overrides_users.__name__, params,
|
133
|
+
official_params_list)
|
113
134
|
response = self.execute('GET', path=f'/acl_overrides/{uuid}/users',
|
114
135
|
single_page=single_page, page_size=page_size, warm_start=
|
115
136
|
warm_start, params=params, **kwargs)
|
hive/cookbook/analytics.py
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
from hive.api import ApiManager, handling_single_page_methods
|
1
|
+
from hive.api import ApiManager, handling_single_page_methods, warning_wrong_parameters
|
2
2
|
|
3
3
|
|
4
4
|
class Analytics(ApiManager):
|
@@ -30,6 +30,16 @@ class Analytics(ApiManager):
|
|
30
30
|
Returns: list"""
|
31
31
|
if kwargs is None:
|
32
32
|
kwargs = dict()
|
33
|
+
official_params_list = ['sort_by', 'null_fields', 'date_start',
|
34
|
+
'date_end', 'metric_profile', 'metric_name', 'skip', 'limit',
|
35
|
+
'like', 'join', 'count']
|
36
|
+
params.get('sort_by'), params.get('null_fields'), params.get(
|
37
|
+
'date_start'), params.get('date_end'), params.get('metric_profile'
|
38
|
+
), params.get('metric_name'), params.get('skip'), params.get(
|
39
|
+
'limit'), params.get('like'), params.get('join'), params.get(
|
40
|
+
'count')
|
41
|
+
warning_wrong_parameters(self.analytic.__name__, params,
|
42
|
+
official_params_list)
|
33
43
|
response = self.execute('GET', path=f'/analytics/{uuid_customer}',
|
34
44
|
single_page=single_page, page_size=page_size, warm_start=
|
35
45
|
warm_start, params=params, **kwargs)
|
hive/cookbook/anomalies.py
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
from hive.api import ApiManager, handling_single_page_methods
|
1
|
+
from hive.api import ApiManager, handling_single_page_methods, warning_wrong_parameters
|
2
2
|
|
3
3
|
|
4
4
|
class Anomalies(ApiManager):
|
@@ -30,6 +30,16 @@ class Anomalies(ApiManager):
|
|
30
30
|
Returns: list"""
|
31
31
|
if kwargs is None:
|
32
32
|
kwargs = dict()
|
33
|
+
official_params_list = ['sort_by', 'null_fields', 'date_start',
|
34
|
+
'date_end', 'uuid_customer', 'type', 'value', 'sampling',
|
35
|
+
'skip', 'limit', 'like', 'join', 'count']
|
36
|
+
params.get('sort_by'), params.get('null_fields'), params.get(
|
37
|
+
'date_start'), params.get('date_end'), params.get('uuid_customer'
|
38
|
+
), params.get('type'), params.get('value'), params.get('sampling'
|
39
|
+
), params.get('skip'), params.get('limit'), params.get('like'
|
40
|
+
), params.get('join'), params.get('count')
|
41
|
+
warning_wrong_parameters(self.anomalies.__name__, params,
|
42
|
+
official_params_list)
|
33
43
|
response = self.execute('GET', path=f'/anomalies/', single_page=
|
34
44
|
single_page, page_size=page_size, warm_start=warm_start, params
|
35
45
|
=params, **kwargs)
|
@@ -51,6 +61,13 @@ class Anomalies(ApiManager):
|
|
51
61
|
Returns: list"""
|
52
62
|
if kwargs is None:
|
53
63
|
kwargs = dict()
|
64
|
+
official_payload_list = ['date_anomaly_start', 'date_anomaly',
|
65
|
+
'uuid_customer', 'type', 'value', 'sampling', 'parameters']
|
66
|
+
payload.get('date_anomaly_start'), payload.get('date_anomaly'
|
67
|
+
), payload.get('uuid_customer'), payload.get('type'), payload.get(
|
68
|
+
'value'), payload.get('sampling'), payload.get('parameters')
|
69
|
+
warning_wrong_parameters(self.anomalies_create.__name__, payload,
|
70
|
+
official_payload_list)
|
54
71
|
response = self.execute('POST', path=f'/anomalies/', payload=
|
55
72
|
payload, **kwargs)
|
56
73
|
return response
|
@@ -70,6 +87,10 @@ class Anomalies(ApiManager):
|
|
70
87
|
kwargs = dict()
|
71
88
|
kwargs, params = handling_single_page_methods(kwargs=kwargs, params
|
72
89
|
=params)
|
90
|
+
official_params_list = ['join']
|
91
|
+
params.get('join')
|
92
|
+
warning_wrong_parameters(self.anomalie.__name__, params,
|
93
|
+
official_params_list)
|
73
94
|
response = self.execute('GET', path=f'/anomalies/{uuid}',
|
74
95
|
warm_start=warm_start, params=params, **kwargs)
|
75
96
|
return response
|
@@ -109,6 +130,10 @@ class Anomalies(ApiManager):
|
|
109
130
|
Returns: list"""
|
110
131
|
if kwargs is None:
|
111
132
|
kwargs = dict()
|
133
|
+
official_params_list = ['join']
|
134
|
+
params.get('join')
|
135
|
+
warning_wrong_parameters(self.anomalies_bulk.__name__, params,
|
136
|
+
official_params_list)
|
112
137
|
response = self.execute('POST', path=f'/anomalies/bulk/read/',
|
113
138
|
single_page=single_page, page_size=page_size, warm_start=
|
114
139
|
warm_start, params=params, payload=payload, **kwargs)
|
@@ -144,6 +169,10 @@ class Anomalies(ApiManager):
|
|
144
169
|
Returns: list"""
|
145
170
|
if kwargs is None:
|
146
171
|
kwargs = dict()
|
172
|
+
official_params_list = ['best_effort']
|
173
|
+
params.get('best_effort')
|
174
|
+
warning_wrong_parameters(self.anomalies_create_bulk.__name__,
|
175
|
+
params, official_params_list)
|
147
176
|
response = self.execute('POST', path=f'/anomalies/bulk/create/',
|
148
177
|
single_page=single_page, page_size=page_size, params=params,
|
149
178
|
payload=payload, **kwargs)
|
hive/cookbook/calendars.py
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
from hive.api import ApiManager, handling_single_page_methods
|
1
|
+
from hive.api import ApiManager, handling_single_page_methods, warning_wrong_parameters
|
2
2
|
|
3
3
|
|
4
4
|
class Calendars(ApiManager):
|
@@ -54,6 +54,38 @@ class Calendars(ApiManager):
|
|
54
54
|
Returns: list"""
|
55
55
|
if kwargs is None:
|
56
56
|
kwargs = dict()
|
57
|
+
official_params_list = ['sort_by', 'null_fields', 'name',
|
58
|
+
'local_public_holidays', 'mon_int1_start', 'mon_int1_end',
|
59
|
+
'mon_int2_start', 'mon_int2_end', 'tue_int1_start',
|
60
|
+
'tue_int1_end', 'tue_int2_start', 'tue_int2_end',
|
61
|
+
'wed_int1_start', 'wed_int1_end', 'wed_int2_start',
|
62
|
+
'wed_int2_end', 'thu_int1_start', 'thu_int1_end',
|
63
|
+
'thu_int2_start', 'thu_int2_end', 'fri_int1_start',
|
64
|
+
'fri_int1_end', 'fri_int2_start', 'fri_int2_end',
|
65
|
+
'sat_int1_start', 'sat_int1_end', 'sat_int2_start',
|
66
|
+
'sat_int2_end', 'sun_int1_start', 'sun_int1_end',
|
67
|
+
'sun_int2_start', 'sun_int2_end', 'skip', 'limit', 'like',
|
68
|
+
'join', 'count']
|
69
|
+
params.get('sort_by'), params.get('null_fields'), params.get('name'
|
70
|
+
), params.get('local_public_holidays'), params.get('mon_int1_start'
|
71
|
+
), params.get('mon_int1_end'), params.get('mon_int2_start'
|
72
|
+
), params.get('mon_int2_end'), params.get('tue_int1_start'
|
73
|
+
), params.get('tue_int1_end'), params.get('tue_int2_start'
|
74
|
+
), params.get('tue_int2_end'), params.get('wed_int1_start'
|
75
|
+
), params.get('wed_int1_end'), params.get('wed_int2_start'
|
76
|
+
), params.get('wed_int2_end'), params.get('thu_int1_start'
|
77
|
+
), params.get('thu_int1_end'), params.get('thu_int2_start'
|
78
|
+
), params.get('thu_int2_end'), params.get('fri_int1_start'
|
79
|
+
), params.get('fri_int1_end'), params.get('fri_int2_start'
|
80
|
+
), params.get('fri_int2_end'), params.get('sat_int1_start'
|
81
|
+
), params.get('sat_int1_end'), params.get('sat_int2_start'
|
82
|
+
), params.get('sat_int2_end'), params.get('sun_int1_start'
|
83
|
+
), params.get('sun_int1_end'), params.get('sun_int2_start'
|
84
|
+
), params.get('sun_int2_end'), params.get('skip'), params.get(
|
85
|
+
'limit'), params.get('like'), params.get('join'), params.get(
|
86
|
+
'count')
|
87
|
+
warning_wrong_parameters(self.calendars.__name__, params,
|
88
|
+
official_params_list)
|
57
89
|
response = self.execute('GET', path=f'/calendars/', single_page=
|
58
90
|
single_page, page_size=page_size, warm_start=warm_start, params
|
59
91
|
=params, **kwargs)
|
@@ -98,6 +130,33 @@ class Calendars(ApiManager):
|
|
98
130
|
Returns: list"""
|
99
131
|
if kwargs is None:
|
100
132
|
kwargs = dict()
|
133
|
+
official_payload_list = ['name', 'local_public_holidays',
|
134
|
+
'mon_int1_start', 'mon_int1_end', 'mon_int2_start',
|
135
|
+
'mon_int2_end', 'tue_int1_start', 'tue_int1_end',
|
136
|
+
'tue_int2_start', 'tue_int2_end', 'wed_int1_start',
|
137
|
+
'wed_int1_end', 'wed_int2_start', 'wed_int2_end',
|
138
|
+
'thu_int1_start', 'thu_int1_end', 'thu_int2_start',
|
139
|
+
'thu_int2_end', 'fri_int1_start', 'fri_int1_end',
|
140
|
+
'fri_int2_start', 'fri_int2_end', 'sat_int1_start',
|
141
|
+
'sat_int1_end', 'sat_int2_start', 'sat_int2_end',
|
142
|
+
'sun_int1_start', 'sun_int1_end', 'sun_int2_start', 'sun_int2_end']
|
143
|
+
payload.get('name'), payload.get('local_public_holidays'), payload.get(
|
144
|
+
'mon_int1_start'), payload.get('mon_int1_end'), payload.get(
|
145
|
+
'mon_int2_start'), payload.get('mon_int2_end'), payload.get(
|
146
|
+
'tue_int1_start'), payload.get('tue_int1_end'), payload.get(
|
147
|
+
'tue_int2_start'), payload.get('tue_int2_end'), payload.get(
|
148
|
+
'wed_int1_start'), payload.get('wed_int1_end'), payload.get(
|
149
|
+
'wed_int2_start'), payload.get('wed_int2_end'), payload.get(
|
150
|
+
'thu_int1_start'), payload.get('thu_int1_end'), payload.get(
|
151
|
+
'thu_int2_start'), payload.get('thu_int2_end'), payload.get(
|
152
|
+
'fri_int1_start'), payload.get('fri_int1_end'), payload.get(
|
153
|
+
'fri_int2_start'), payload.get('fri_int2_end'), payload.get(
|
154
|
+
'sat_int1_start'), payload.get('sat_int1_end'), payload.get(
|
155
|
+
'sat_int2_start'), payload.get('sat_int2_end'), payload.get(
|
156
|
+
'sun_int1_start'), payload.get('sun_int1_end'), payload.get(
|
157
|
+
'sun_int2_start'), payload.get('sun_int2_end')
|
158
|
+
warning_wrong_parameters(self.calendars_create.__name__, payload,
|
159
|
+
official_payload_list)
|
101
160
|
response = self.execute('POST', path=f'/calendars/', payload=
|
102
161
|
payload, **kwargs)
|
103
162
|
return response
|
@@ -156,6 +215,33 @@ class Calendars(ApiManager):
|
|
156
215
|
Returns: list"""
|
157
216
|
if kwargs is None:
|
158
217
|
kwargs = dict()
|
218
|
+
official_payload_list = ['name', 'local_public_holidays',
|
219
|
+
'mon_int1_start', 'mon_int1_end', 'mon_int2_start',
|
220
|
+
'mon_int2_end', 'tue_int1_start', 'tue_int1_end',
|
221
|
+
'tue_int2_start', 'tue_int2_end', 'wed_int1_start',
|
222
|
+
'wed_int1_end', 'wed_int2_start', 'wed_int2_end',
|
223
|
+
'thu_int1_start', 'thu_int1_end', 'thu_int2_start',
|
224
|
+
'thu_int2_end', 'fri_int1_start', 'fri_int1_end',
|
225
|
+
'fri_int2_start', 'fri_int2_end', 'sat_int1_start',
|
226
|
+
'sat_int1_end', 'sat_int2_start', 'sat_int2_end',
|
227
|
+
'sun_int1_start', 'sun_int1_end', 'sun_int2_start', 'sun_int2_end']
|
228
|
+
payload.get('name'), payload.get('local_public_holidays'), payload.get(
|
229
|
+
'mon_int1_start'), payload.get('mon_int1_end'), payload.get(
|
230
|
+
'mon_int2_start'), payload.get('mon_int2_end'), payload.get(
|
231
|
+
'tue_int1_start'), payload.get('tue_int1_end'), payload.get(
|
232
|
+
'tue_int2_start'), payload.get('tue_int2_end'), payload.get(
|
233
|
+
'wed_int1_start'), payload.get('wed_int1_end'), payload.get(
|
234
|
+
'wed_int2_start'), payload.get('wed_int2_end'), payload.get(
|
235
|
+
'thu_int1_start'), payload.get('thu_int1_end'), payload.get(
|
236
|
+
'thu_int2_start'), payload.get('thu_int2_end'), payload.get(
|
237
|
+
'fri_int1_start'), payload.get('fri_int1_end'), payload.get(
|
238
|
+
'fri_int2_start'), payload.get('fri_int2_end'), payload.get(
|
239
|
+
'sat_int1_start'), payload.get('sat_int1_end'), payload.get(
|
240
|
+
'sat_int2_start'), payload.get('sat_int2_end'), payload.get(
|
241
|
+
'sun_int1_start'), payload.get('sun_int1_end'), payload.get(
|
242
|
+
'sun_int2_start'), payload.get('sun_int2_end')
|
243
|
+
warning_wrong_parameters(self.calendars_put.__name__, payload,
|
244
|
+
official_payload_list)
|
159
245
|
response = self.execute('PUT', path=f'/calendars/{uuid}', payload=
|
160
246
|
payload, **kwargs)
|
161
247
|
return response
|
@@ -195,6 +281,10 @@ class Calendars(ApiManager):
|
|
195
281
|
Returns: list"""
|
196
282
|
if kwargs is None:
|
197
283
|
kwargs = dict()
|
284
|
+
official_params_list = ['join']
|
285
|
+
params.get('join')
|
286
|
+
warning_wrong_parameters(self.calendars_bulk.__name__, params,
|
287
|
+
official_params_list)
|
198
288
|
response = self.execute('POST', path=f'/calendars/bulk/read/',
|
199
289
|
single_page=single_page, page_size=page_size, warm_start=
|
200
290
|
warm_start, params=params, payload=payload, **kwargs)
|
@@ -253,6 +343,10 @@ class Calendars(ApiManager):
|
|
253
343
|
Returns: list"""
|
254
344
|
if kwargs is None:
|
255
345
|
kwargs = dict()
|
346
|
+
official_params_list = ['best_effort']
|
347
|
+
params.get('best_effort')
|
348
|
+
warning_wrong_parameters(self.calendars_create_bulk.__name__,
|
349
|
+
params, official_params_list)
|
256
350
|
response = self.execute('POST', path=f'/calendars/bulk/create/',
|
257
351
|
single_page=single_page, page_size=page_size, params=params,
|
258
352
|
payload=payload, **kwargs)
|
hive/cookbook/contacts.py
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
from hive.api import ApiManager, handling_single_page_methods
|
1
|
+
from hive.api import ApiManager, handling_single_page_methods, warning_wrong_parameters
|
2
2
|
|
3
3
|
|
4
4
|
class Contacts(ApiManager):
|
@@ -37,6 +37,22 @@ class Contacts(ApiManager):
|
|
37
37
|
Returns: list"""
|
38
38
|
if kwargs is None:
|
39
39
|
kwargs = dict()
|
40
|
+
official_params_list = ['sort_by', 'null_fields', 'type', 'name',
|
41
|
+
'surname', 'qualification', 'company', 'department',
|
42
|
+
'principal_email', 'secondary_email', 'principal_mobile_number',
|
43
|
+
'secondary_mobile_number', 'phone_number', 'birthday', 'notes',
|
44
|
+
'skip', 'limit', 'like', 'join', 'count']
|
45
|
+
params.get('sort_by'), params.get('null_fields'), params.get('type'
|
46
|
+
), params.get('name'), params.get('surname'), params.get(
|
47
|
+
'qualification'), params.get('company'), params.get('department'
|
48
|
+
), params.get('principal_email'), params.get('secondary_email'
|
49
|
+
), params.get('principal_mobile_number'), params.get(
|
50
|
+
'secondary_mobile_number'), params.get('phone_number'), params.get(
|
51
|
+
'birthday'), params.get('notes'), params.get('skip'), params.get(
|
52
|
+
'limit'), params.get('like'), params.get('join'), params.get(
|
53
|
+
'count')
|
54
|
+
warning_wrong_parameters(self.contacts.__name__, params,
|
55
|
+
official_params_list)
|
40
56
|
response = self.execute('GET', path=f'/contacts/', single_page=
|
41
57
|
single_page, page_size=page_size, warm_start=warm_start, params
|
42
58
|
=params, **kwargs)
|
@@ -64,6 +80,19 @@ class Contacts(ApiManager):
|
|
64
80
|
Returns: list"""
|
65
81
|
if kwargs is None:
|
66
82
|
kwargs = dict()
|
83
|
+
official_payload_list = ['type', 'name', 'surname', 'qualification',
|
84
|
+
'company', 'department', 'principal_email', 'secondary_email',
|
85
|
+
'principal_mobile_number', 'secondary_mobile_number',
|
86
|
+
'phone_number', 'birthday', 'notes']
|
87
|
+
payload.get('type'), payload.get('name'), payload.get('surname'
|
88
|
+
), payload.get('qualification'), payload.get('company'
|
89
|
+
), payload.get('department'), payload.get('principal_email'
|
90
|
+
), payload.get('secondary_email'), payload.get(
|
91
|
+
'principal_mobile_number'), payload.get('secondary_mobile_number'
|
92
|
+
), payload.get('phone_number'), payload.get('birthday'
|
93
|
+
), payload.get('notes')
|
94
|
+
warning_wrong_parameters(self.contacts_create.__name__, payload,
|
95
|
+
official_payload_list)
|
67
96
|
response = self.execute('POST', path=f'/contacts/', payload=payload,
|
68
97
|
**kwargs)
|
69
98
|
return response
|
@@ -105,6 +134,19 @@ class Contacts(ApiManager):
|
|
105
134
|
Returns: list"""
|
106
135
|
if kwargs is None:
|
107
136
|
kwargs = dict()
|
137
|
+
official_payload_list = ['type', 'name', 'surname', 'qualification',
|
138
|
+
'company', 'department', 'principal_email', 'secondary_email',
|
139
|
+
'principal_mobile_number', 'secondary_mobile_number',
|
140
|
+
'phone_number', 'birthday', 'notes']
|
141
|
+
payload.get('type'), payload.get('name'), payload.get('surname'
|
142
|
+
), payload.get('qualification'), payload.get('company'
|
143
|
+
), payload.get('department'), payload.get('principal_email'
|
144
|
+
), payload.get('secondary_email'), payload.get(
|
145
|
+
'principal_mobile_number'), payload.get('secondary_mobile_number'
|
146
|
+
), payload.get('phone_number'), payload.get('birthday'
|
147
|
+
), payload.get('notes')
|
148
|
+
warning_wrong_parameters(self.contacts_put.__name__, payload,
|
149
|
+
official_payload_list)
|
108
150
|
response = self.execute('PUT', path=f'/contacts/{uuid}', payload=
|
109
151
|
payload, **kwargs)
|
110
152
|
return response
|
@@ -142,6 +184,13 @@ class Contacts(ApiManager):
|
|
142
184
|
Returns: list"""
|
143
185
|
if kwargs is None:
|
144
186
|
kwargs = dict()
|
187
|
+
official_params_list = ['not_in', 'type', 'skip', 'limit', 'like',
|
188
|
+
'join', 'count']
|
189
|
+
params.get('not_in'), params.get('type'), params.get('skip'
|
190
|
+
), params.get('limit'), params.get('like'), params.get('join'
|
191
|
+
), params.get('count')
|
192
|
+
warning_wrong_parameters(self.contacts_sites.__name__, params,
|
193
|
+
official_params_list)
|
145
194
|
response = self.execute('GET', path=f'/contacts/{uuid}/sites',
|
146
195
|
single_page=single_page, page_size=page_size, warm_start=
|
147
196
|
warm_start, params=params, **kwargs)
|
@@ -160,6 +209,10 @@ class Contacts(ApiManager):
|
|
160
209
|
Returns: list"""
|
161
210
|
if kwargs is None:
|
162
211
|
kwargs = dict()
|
212
|
+
official_payload_list = ['type']
|
213
|
+
payload.get('type')
|
214
|
+
warning_wrong_parameters(self.contacts_sites_put.__name__, payload,
|
215
|
+
official_payload_list)
|
163
216
|
response = self.execute('PUT', path=
|
164
217
|
f'/contacts/{uuid}/sites/{uuid_site}', payload=payload, **kwargs)
|
165
218
|
return response
|
@@ -177,6 +230,10 @@ class Contacts(ApiManager):
|
|
177
230
|
Returns: list"""
|
178
231
|
if kwargs is None:
|
179
232
|
kwargs = dict()
|
233
|
+
official_payload_list = ['type']
|
234
|
+
payload.get('type')
|
235
|
+
warning_wrong_parameters(self.contacts_sites_create.__name__,
|
236
|
+
payload, official_payload_list)
|
180
237
|
response = self.execute('POST', path=
|
181
238
|
f'/contacts/{uuid}/sites/{uuid_site}', payload=payload, **kwargs)
|
182
239
|
return response
|
@@ -217,6 +274,13 @@ class Contacts(ApiManager):
|
|
217
274
|
Returns: list"""
|
218
275
|
if kwargs is None:
|
219
276
|
kwargs = dict()
|
277
|
+
official_params_list = ['not_in', 'type', 'skip', 'limit', 'like',
|
278
|
+
'join', 'count']
|
279
|
+
params.get('not_in'), params.get('type'), params.get('skip'
|
280
|
+
), params.get('limit'), params.get('like'), params.get('join'
|
281
|
+
), params.get('count')
|
282
|
+
warning_wrong_parameters(self.contacts_customers.__name__, params,
|
283
|
+
official_params_list)
|
220
284
|
response = self.execute('GET', path=f'/contacts/{uuid}/customers',
|
221
285
|
single_page=single_page, page_size=page_size, warm_start=
|
222
286
|
warm_start, params=params, **kwargs)
|
@@ -235,6 +299,10 @@ class Contacts(ApiManager):
|
|
235
299
|
Returns: list"""
|
236
300
|
if kwargs is None:
|
237
301
|
kwargs = dict()
|
302
|
+
official_payload_list = ['type']
|
303
|
+
payload.get('type')
|
304
|
+
warning_wrong_parameters(self.contacts_customers_put.__name__,
|
305
|
+
payload, official_payload_list)
|
238
306
|
response = self.execute('PUT', path=
|
239
307
|
f'/contacts/{uuid}/customers/{uuid_customer}', payload=payload,
|
240
308
|
**kwargs)
|
@@ -253,6 +321,10 @@ class Contacts(ApiManager):
|
|
253
321
|
Returns: list"""
|
254
322
|
if kwargs is None:
|
255
323
|
kwargs = dict()
|
324
|
+
official_payload_list = ['type']
|
325
|
+
payload.get('type')
|
326
|
+
warning_wrong_parameters(self.contacts_customers_create.__name__,
|
327
|
+
payload, official_payload_list)
|
256
328
|
response = self.execute('POST', path=
|
257
329
|
f'/contacts/{uuid}/customers/{uuid_customer}', payload=payload,
|
258
330
|
**kwargs)
|
@@ -297,6 +369,15 @@ class Contacts(ApiManager):
|
|
297
369
|
Returns: list"""
|
298
370
|
if kwargs is None:
|
299
371
|
kwargs = dict()
|
372
|
+
official_params_list = ['not_in', 'send_email', 'role_email',
|
373
|
+
'send_sms', 'active_at_timestamp', 'skip', 'limit', 'like',
|
374
|
+
'join', 'count']
|
375
|
+
params.get('not_in'), params.get('send_email'), params.get('role_email'
|
376
|
+
), params.get('send_sms'), params.get('active_at_timestamp'
|
377
|
+
), params.get('skip'), params.get('limit'), params.get('like'
|
378
|
+
), params.get('join'), params.get('count')
|
379
|
+
warning_wrong_parameters(self.contacts_dispatchers.__name__, params,
|
380
|
+
official_params_list)
|
300
381
|
response = self.execute('GET', path=f'/contacts/{uuid}/dispatchers',
|
301
382
|
single_page=single_page, page_size=page_size, warm_start=
|
302
383
|
warm_start, params=params, **kwargs)
|
@@ -318,6 +399,12 @@ class Contacts(ApiManager):
|
|
318
399
|
Returns: list"""
|
319
400
|
if kwargs is None:
|
320
401
|
kwargs = dict()
|
402
|
+
official_payload_list = ['send_email', 'role_email', 'send_sms',
|
403
|
+
'endpoint']
|
404
|
+
payload.get('send_email'), payload.get('role_email'), payload.get(
|
405
|
+
'send_sms'), payload.get('endpoint')
|
406
|
+
warning_wrong_parameters(self.contacts_dispatchers_put.__name__,
|
407
|
+
payload, official_payload_list)
|
321
408
|
response = self.execute('PUT', path=
|
322
409
|
f'/contacts/{uuid}/dispatchers/{uuid_dispatcher}', payload=
|
323
410
|
payload, **kwargs)
|
@@ -339,6 +426,12 @@ class Contacts(ApiManager):
|
|
339
426
|
Returns: list"""
|
340
427
|
if kwargs is None:
|
341
428
|
kwargs = dict()
|
429
|
+
official_payload_list = ['send_email', 'role_email', 'send_sms',
|
430
|
+
'endpoint']
|
431
|
+
payload.get('send_email'), payload.get('role_email'), payload.get(
|
432
|
+
'send_sms'), payload.get('endpoint')
|
433
|
+
warning_wrong_parameters(self.contacts_dispatchers_create.__name__,
|
434
|
+
payload, official_payload_list)
|
342
435
|
response = self.execute('POST', path=
|
343
436
|
f'/contacts/{uuid}/dispatchers/{uuid_dispatcher}', payload=
|
344
437
|
payload, **kwargs)
|
@@ -382,6 +475,10 @@ class Contacts(ApiManager):
|
|
382
475
|
Returns: list"""
|
383
476
|
if kwargs is None:
|
384
477
|
kwargs = dict()
|
478
|
+
official_params_list = ['join']
|
479
|
+
params.get('join')
|
480
|
+
warning_wrong_parameters(self.contacts_bulk.__name__, params,
|
481
|
+
official_params_list)
|
385
482
|
response = self.execute('POST', path=f'/contacts/bulk/read/',
|
386
483
|
single_page=single_page, page_size=page_size, warm_start=
|
387
484
|
warm_start, params=params, payload=payload, **kwargs)
|
@@ -422,6 +519,10 @@ class Contacts(ApiManager):
|
|
422
519
|
Returns: list"""
|
423
520
|
if kwargs is None:
|
424
521
|
kwargs = dict()
|
522
|
+
official_params_list = ['best_effort']
|
523
|
+
params.get('best_effort')
|
524
|
+
warning_wrong_parameters(self.contacts_create_bulk.__name__, params,
|
525
|
+
official_params_list)
|
425
526
|
response = self.execute('POST', path=f'/contacts/bulk/create/',
|
426
527
|
single_page=single_page, page_size=page_size, params=params,
|
427
528
|
payload=payload, **kwargs)
|
@@ -476,6 +577,10 @@ class Contacts(ApiManager):
|
|
476
577
|
Returns: list"""
|
477
578
|
if kwargs is None:
|
478
579
|
kwargs = dict()
|
580
|
+
official_params_list = ['best_effort']
|
581
|
+
params.get('best_effort')
|
582
|
+
warning_wrong_parameters(self.contacts_customers_create_bulk.
|
583
|
+
__name__, params, official_params_list)
|
479
584
|
response = self.execute('POST', path=
|
480
585
|
f'/contacts/bulk/create/customers', single_page=single_page,
|
481
586
|
page_size=page_size, params=params, payload=payload, **kwargs)
|
@@ -537,6 +642,10 @@ class Contacts(ApiManager):
|
|
537
642
|
Returns: list"""
|
538
643
|
if kwargs is None:
|
539
644
|
kwargs = dict()
|
645
|
+
official_params_list = ['best_effort']
|
646
|
+
params.get('best_effort')
|
647
|
+
warning_wrong_parameters(self.contacts_dispatchers_create_bulk.
|
648
|
+
__name__, params, official_params_list)
|
540
649
|
response = self.execute('POST', path=
|
541
650
|
f'/contacts/bulk/create/dispatchers', single_page=single_page,
|
542
651
|
page_size=page_size, params=params, payload=payload, **kwargs)
|
@@ -595,6 +704,10 @@ class Contacts(ApiManager):
|
|
595
704
|
Returns: list"""
|
596
705
|
if kwargs is None:
|
597
706
|
kwargs = dict()
|
707
|
+
official_params_list = ['best_effort']
|
708
|
+
params.get('best_effort')
|
709
|
+
warning_wrong_parameters(self.contacts_sites_create_bulk.__name__,
|
710
|
+
params, official_params_list)
|
598
711
|
response = self.execute('POST', path=f'/contacts/bulk/create/sites',
|
599
712
|
single_page=single_page, page_size=page_size, params=params,
|
600
713
|
payload=payload, **kwargs)
|