-
Notifications
You must be signed in to change notification settings - Fork 9
V2 Changes to handle errors #7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,67 @@ | ||
| from zenduty import ZendutyClient | ||
|
|
||
| zenduty_client = ZendutyClient( | ||
| api_key="f3ab5c762c914dacca2c0c530b260fdf9fff0cc7", use_https=True | ||
| ) # Default credentials to ZENDUTY_API_KEY env variable if not provided. (use export ZENDUTY_API_KEY="<YOUR KEY>") | ||
|
|
||
|
|
||
| from zenduty import AccountMemberClient | ||
| members = AccountMemberClient(zenduty_client).get_all_members() | ||
| test_member = members[0] | ||
| from zenduty import AccountNotificationClient | ||
| member_contact_methods = AccountNotificationClient(zenduty_client,test_member).list_member_contact_methods() | ||
| member_notification_rules = AccountNotificationClient(zenduty_client, test_member).list_member_notification_rules() | ||
|
|
||
| from zenduty import AccountRoleClient | ||
| account_roles = AccountRoleClient(zenduty_client).list_account_roles() | ||
|
|
||
| from zenduty import EventClient | ||
|
|
||
| from zenduty import RouterClient | ||
| all_routers = RouterClient(zenduty_client).get_all_routers() | ||
|
|
||
| from zenduty import IncidentClient | ||
| all_incidents = IncidentClient(zenduty_client).get_all_incidents(status=3) | ||
|
|
||
| from zenduty import IncidentNoteClient | ||
| all_incident_notes = IncidentNoteClient(zenduty_client, all_incidents[0]).get_all_incident_notes() | ||
|
|
||
| from zenduty import IncidentTagClient | ||
| all_tags = IncidentTagClient(zenduty_client, all_incidents[0]).get_all_tags() | ||
|
|
||
| from zenduty import TeamsClient | ||
| teams = TeamsClient(zenduty_client).list_teams() | ||
| team_members = TeamsClient(zenduty_client).list_team_members(teams[0]) | ||
| team_permissions = TeamsClient(zenduty_client).fetch_team_permissions(teams[0]) | ||
| oncall = TeamsClient(zenduty_client).get_all_oncall(teams[0]) | ||
|
|
||
| from zenduty import EscalationPolicyClient | ||
| eps = EscalationPolicyClient(zenduty_client, teams[0]).get_all_policies() | ||
|
|
||
| from zenduty import TeamMaintenanceClient | ||
| team_maintenace = TeamMaintenanceClient(zenduty_client, teams[0]).get_all_maintenance() | ||
|
|
||
| from zenduty import OncallClient | ||
| oncall_v2 = OncallClient(zenduty_client, teams[0]).list_team_oncall_v2() | ||
| oncall = OncallClient(zenduty_client, teams[0]).get_all_oncall() | ||
|
|
||
| from zenduty import PostmortemClient | ||
| pm = PostmortemClient(zenduty_client, teams[0]).get_all_postmortem() | ||
|
|
||
| from zenduty import PriorityClient | ||
| p = PriorityClient(zenduty_client, teams[0]).get_all_priorities() | ||
|
|
||
| from zenduty import IncidentRoleClient | ||
| ir = IncidentRoleClient(zenduty_client, teams[0]).get_all_roles() | ||
|
|
||
| from zenduty import ScheduleClient | ||
| schedules = ScheduleClient(zenduty_client, teams[0]).get_all_schedules() | ||
|
|
||
| from zenduty import ServiceClient | ||
| sercives = ServiceClient(zenduty_client, teams[0]).get_all_services() | ||
|
|
||
| from zenduty import IntegrationClient | ||
| intergrations = IntegrationClient(zenduty_client, teams[0], sercives[0]).get_all_integrations() | ||
|
|
||
| from zenduty import SLAClient | ||
| sla = SLAClient(zenduty_client, teams[0]).get_all_slas() |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,20 +1,7 @@ | ||
| from __future__ import absolute_import | ||
|
|
||
| __version__ = "1.0.0" | ||
| __version__ = "1.2.0" | ||
|
|
||
| # import apis into sdk package | ||
| from .api.incidents_api import IncidentsApi | ||
| from .api.integrations_api import IntegrationsApi | ||
| from .api.members_api import MembersApi | ||
| from .api.services_api import ServicesApi | ||
| from .api.teams_api import TeamsApi | ||
| from .api.events_api import EventsApi | ||
|
|
||
| # import ApiClient | ||
| from .api_client import ApiClient | ||
| from .configuration import Configuration | ||
| from .exceptions import OpenApiException | ||
| from .exceptions import ApiTypeError | ||
| from .exceptions import ApiValueError | ||
| from .exceptions import ApiKeyError | ||
| from .exceptions import ApiException | ||
| from .apiV2 import * | ||
| from .apiV2.serializer import JsonSerializable, serialize |
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Applies accross all these files in apiv1.
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Hi, I have added the V1 files back to the code and made necessary changes to make it accessible |
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There are customers who are still using the v1 configuration. So, we would need it ideally.