Code
stringlengths
103
85.9k
Summary
listlengths
0
94
Please provide a description of the function:def ticket_form_create(self, data, **kwargs): "https://developer.zendesk.com/rest_api/docs/core/ticket_forms#create-ticket-forms" api_path = "/api/v2/ticket_forms.json" return self.call(api_path, method="POST", data=data, **kwargs)
[]
Please provide a description of the function:def ticket_form_delete(self, id, **kwargs): "https://developer.zendesk.com/rest_api/docs/core/ticket_forms#delete-ticket-form" api_path = "/api/v2/ticket_forms/{id}.json" api_path = api_path.format(id=id) return self.call(api_path, method="DEL...
[]
Please provide a description of the function:def ticket_form_show(self, id, **kwargs): "https://developer.zendesk.com/rest_api/docs/core/ticket_forms#show-ticket-form" api_path = "/api/v2/ticket_forms/{id}.json" api_path = api_path.format(id=id) return self.call(api_path, **kwargs)
[]
Please provide a description of the function:def ticket_forms_reorder(self, data, **kwargs): "https://developer.zendesk.com/rest_api/docs/core/ticket_forms#reorder-ticket-forms" api_path = "/api/v2/ticket_forms/reorder.json" return self.call(api_path, method="PUT", data=data, **kwargs)
[]
Please provide a description of the function:def ticket_incidents(self, id, **kwargs): "https://developer.zendesk.com/rest_api/docs/core/tickets#listing-ticket-incidents" api_path = "/api/v2/tickets/{id}/incidents.json" api_path = api_path.format(id=id) return self.call(api_path, **kwarg...
[]
Please provide a description of the function:def ticket_macro_apply(self, ticket_id, id, **kwargs): "https://developer.zendesk.com/rest_api/docs/core/macros#show-ticket-after-changes" api_path = "/api/v2/tickets/{ticket_id}/macros/{id}/apply.json" api_path = api_path.format(ticket_id=ticket_id, ...
[]
Please provide a description of the function:def ticket_metric_show(self, ticket_metric_id, **kwargs): "https://developer.zendesk.com/rest_api/docs/core/ticket_metrics#show-ticket-metrics" api_path = "/api/v2/ticket_metrics/{ticket_metric_id}.json" api_path = api_path.format(ticket_metric_id=tic...
[]
Please provide a description of the function:def ticket_metrics(self, ticket_id, **kwargs): "https://developer.zendesk.com/rest_api/docs/core/ticket_metrics#show-ticket-metrics" api_path = "/api/v2/tickets/{ticket_id}/metrics.json" api_path = api_path.format(ticket_id=ticket_id) return s...
[]
Please provide a description of the function:def ticket_related(self, id, **kwargs): "https://developer.zendesk.com/rest_api/docs/core/tickets#ticket-related-information" api_path = "/api/v2/tickets/{id}/related.json" api_path = api_path.format(id=id) return self.call(api_path, **kwargs)
[]
Please provide a description of the function:def ticket_satisfaction_rating_create(self, ticket_id, data, **kwargs): "https://developer.zendesk.com/rest_api/docs/core/satisfaction_ratings#create-a-satisfaction-rating" api_path = "/api/v2/tickets/{ticket_id}/satisfaction_rating.json" api_path = a...
[]
Please provide a description of the function:def ticket_show(self, id, **kwargs): "https://developer.zendesk.com/rest_api/docs/core/tickets#show-ticket" api_path = "/api/v2/tickets/{id}.json" api_path = api_path.format(id=id) return self.call(api_path, **kwargs)
[]
Please provide a description of the function:def ticket_skips(self, ticket_id, **kwargs): "https://developer.zendesk.com/rest_api/docs/core/ticket_skips#list-skips-for-the-current-account" api_path = "/api/v2/tickets/{ticket_id}/skips.json" api_path = api_path.format(ticket_id=ticket_id) ...
[]
Please provide a description of the function:def ticket_tags(self, id, **kwargs): "https://developer.zendesk.com/rest_api/docs/core/tags#show-tags" api_path = "/api/v2/tickets/{id}/tags.json" api_path = api_path.format(id=id) return self.call(api_path, **kwargs)
[]
Please provide a description of the function:def ticket_tags_delete(self, id, **kwargs): "https://developer.zendesk.com/rest_api/docs/core/tags#remove-tags" api_path = "/api/v2/tickets/{id}/tags.json" api_path = api_path.format(id=id) return self.call(api_path, method="DELETE", **kwargs)
[]
Please provide a description of the function:def tickets_create_many(self, data, **kwargs): "https://developer.zendesk.com/rest_api/docs/core/tickets#create-many-tickets" api_path = "/api/v2/tickets/create_many.json" return self.call(api_path, method="POST", data=data, **kwargs)
[]
Please provide a description of the function:def tickets_list(self, external_id=None, include=None, **kwargs): "https://developer.zendesk.com/rest_api/docs/core/tickets#json-format" api_path = "/api/v2/tickets.json" api_query = {} if "query" in kwargs.keys(): api_query.update...
[]
Please provide a description of the function:def tickets_update_many(self, data, ids=None, **kwargs): "https://developer.zendesk.com/rest_api/docs/core/tickets#update-many-tickets" api_path = "/api/v2/tickets/update_many.json" api_query = {} if "query" in kwargs.keys(): api_q...
[]
Please provide a description of the function:def trigger_create(self, data, **kwargs): "https://developer.zendesk.com/rest_api/docs/chat/triggers#create-trigger" api_path = "/api/v2/triggers" return self.call(api_path, method="POST", data=data, **kwargs)
[]
Please provide a description of the function:def trigger_delete_by_id(self, id, **kwargs): "https://developer.zendesk.com/rest_api/docs/core/triggers#delete-trigger" api_path = "/api/v2/triggers/{id}.json" api_path = api_path.format(id=id) return self.call(api_path, method="DELETE", **kw...
[]
Please provide a description of the function:def trigger_delete_by_trigger_name(self, trigger_name, **kwargs): "https://developer.zendesk.com/rest_api/docs/chat/triggers#delete-trigger" api_path = "/api/v2/triggers/{trigger_name}" api_path = api_path.format(trigger_name=trigger_name) ret...
[]
Please provide a description of the function:def trigger_revision_show(self, trigger_id, revision_id, **kwargs): "https://developer.zendesk.com/rest_api/docs/core/triggers#getting-revisions" api_path = "/api/v2/triggers/{trigger_id}/revisions/{revision_id}.json" api_path = api_path.format(trigge...
[]
Please provide a description of the function:def trigger_revisions(self, trigger_id, **kwargs): "https://developer.zendesk.com/rest_api/docs/core/triggers#list-trigger-revisions" api_path = "/api/v2/triggers/{trigger_id}/revisions.json" api_path = api_path.format(trigger_id=trigger_id) r...
[]
Please provide a description of the function:def trigger_show_by_id(self, id, **kwargs): "https://developer.zendesk.com/rest_api/docs/core/triggers#getting-triggers" api_path = "/api/v2/triggers/{id}.json" api_path = api_path.format(id=id) return self.call(api_path, **kwargs)
[]
Please provide a description of the function:def trigger_show_by_trigger_name(self, trigger_name, **kwargs): "https://developer.zendesk.com/rest_api/docs/chat/triggers#get-a-trigger" api_path = "/api/v2/triggers/{trigger_name}" api_path = api_path.format(trigger_name=trigger_name) return...
[]
Please provide a description of the function:def trigger_update_by_id(self, id, data, **kwargs): "https://developer.zendesk.com/rest_api/docs/core/triggers#update-trigger" api_path = "/api/v2/triggers/{id}.json" api_path = api_path.format(id=id) return self.call(api_path, method="PUT", d...
[]
Please provide a description of the function:def trigger_update_by_trigger_name(self, trigger_name, data, **kwargs): "https://developer.zendesk.com/rest_api/docs/chat/triggers#update-trigger" api_path = "/api/v2/triggers/{trigger_name}" api_path = api_path.format(trigger_name=trigger_name) ...
[]
Please provide a description of the function:def triggers_reorder(self, data, **kwargs): "https://developer.zendesk.com/rest_api/docs/core/triggers#reorder-triggers" api_path = "/api/v2/triggers/reorder.json" return self.call(api_path, method="PUT", data=data, **kwargs)
[]
Please provide a description of the function:def triggers_update_many(self, data, **kwargs): "https://developer.zendesk.com/rest_api/docs/core/triggers#update-many-triggers" api_path = "/api/v2/triggers/update_many.json" return self.call(api_path, method="PUT", data=data, **kwargs)
[]
Please provide a description of the function:def upload_create(self, data, filename=None, token=None, **kwargs): "https://developer.zendesk.com/rest_api/docs/core/attachments#upload-files" api_path = "/api/v2/uploads.json" api_query = {} if "query" in kwargs.keys(): api_query...
[]
Please provide a description of the function:def upload_delete(self, token, **kwargs): "https://developer.zendesk.com/rest_api/docs/core/attachments#delete-upload" api_path = "/api/v2/uploads/{token}.json" api_path = api_path.format(token=token) return self.call(api_path, method="DELETE"...
[]
Please provide a description of the function:def user_compliance_deletion_statuses(self, id, **kwargs): "https://developer.zendesk.com/rest_api/docs/core/users#show-compliance-deletion-statuses" api_path = "/api/v2/users/{id}/compliance_deletion_statuses.json" api_path = api_path.format(id=id) ...
[]
Please provide a description of the function:def user_create(self, data, **kwargs): "https://developer.zendesk.com/rest_api/docs/core/users#create-user" api_path = "/api/v2/users.json" return self.call(api_path, method="POST", data=data, **kwargs)
[]
Please provide a description of the function:def user_delete(self, id, **kwargs): "https://developer.zendesk.com/rest_api/docs/core/users#delete-user" api_path = "/api/v2/users/{id}.json" api_path = api_path.format(id=id) return self.call(api_path, method="DELETE", **kwargs)
[]
Please provide a description of the function:def user_field_create(self, data, **kwargs): "https://developer.zendesk.com/rest_api/docs/core/user_fields#create-user-fields" api_path = "/api/v2/user_fields.json" return self.call(api_path, method="POST", data=data, **kwargs)
[]
Please provide a description of the function:def user_field_delete(self, id, **kwargs): "https://developer.zendesk.com/rest_api/docs/core/user_fields#delete-user-field" api_path = "/api/v2/user_fields/{id}.json" api_path = api_path.format(id=id) return self.call(api_path, method="DELETE"...
[]
Please provide a description of the function:def user_field_option_create(self, field_id, data, **kwargs): "https://developer.zendesk.com/rest_api/docs/core/user_fields#create-or-update-a-user-field-option" api_path = "/api/v2/user_fields/{field_id}/options.json" api_path = api_path.format(field...
[]
Please provide a description of the function:def user_field_option_delete(self, field_id, id, **kwargs): "https://developer.zendesk.com/rest_api/docs/core/user_fields#delete-user-field-option" api_path = "/api/v2/user_fields/{field_id}/options/{id}.json" api_path = api_path.format(field_id=field...
[]
Please provide a description of the function:def user_field_option_show(self, field_id, id, **kwargs): "https://developer.zendesk.com/rest_api/docs/core/user_fields#show-a-user-field-option" api_path = "/api/v2/user_fields/{field_id}/options/{id}.json" api_path = api_path.format(field_id=field_i...
[]
Please provide a description of the function:def user_field_options(self, field_id, **kwargs): "https://developer.zendesk.com/rest_api/docs/core/user_fields#list-user-field-options" api_path = "/api/v2/user_fields/{field_id}/options.json" api_path = api_path.format(field_id=field_id) ret...
[]
Please provide a description of the function:def user_field_show(self, id, **kwargs): "https://developer.zendesk.com/rest_api/docs/core/user_fields#show-user-field" api_path = "/api/v2/user_fields/{id}.json" api_path = api_path.format(id=id) return self.call(api_path, **kwargs)
[]
Please provide a description of the function:def user_fields_reorder(self, data, **kwargs): "https://developer.zendesk.com/rest_api/docs/core/user_fields#reorder-user-field" api_path = "/api/v2/user_fields/reorder.json" return self.call(api_path, method="PUT", data=data, **kwargs)
[]
Please provide a description of the function:def user_group_membership_make_default(self, user_id, membership_id, data, **kwargs): "https://developer.zendesk.com/rest_api/docs/core/group_memberships#set-membership-as-default" api_path = "/api/v2/users/{user_id}/group_memberships/{membership_id}/make_def...
[]
Please provide a description of the function:def user_group_membership_show(self, user_id, id, **kwargs): "https://developer.zendesk.com/rest_api/docs/core/group_memberships#show-membership" api_path = "/api/v2/users/{user_id}/group_memberships/{id}.json" api_path = api_path.format(user_id=user_...
[]
Please provide a description of the function:def user_group_memberships(self, user_id, **kwargs): "https://developer.zendesk.com/rest_api/docs/core/group_memberships#list-memberships" api_path = "/api/v2/users/{user_id}/group_memberships.json" api_path = api_path.format(user_id=user_id) ...
[]
Please provide a description of the function:def user_groups(self, user_id, **kwargs): "https://developer.zendesk.com/rest_api/docs/core/groups#list-groups" api_path = "/api/v2/users/{user_id}/groups.json" api_path = api_path.format(user_id=user_id) return self.call(api_path, **kwargs)
[]
Please provide a description of the function:def user_identities(self, user_id, **kwargs): "https://developer.zendesk.com/rest_api/docs/core/user_identities#list-identities" api_path = "/api/v2/users/{user_id}/identities.json" api_path = api_path.format(user_id=user_id) return self.call(...
[]
Please provide a description of the function:def user_identity_delete(self, user_id, id, **kwargs): "https://developer.zendesk.com/rest_api/docs/core/user_identities#delete-identity" api_path = "/api/v2/users/{user_id}/identities/{id}.json" api_path = api_path.format(user_id=user_id, id=id) ...
[]
Please provide a description of the function:def user_identity_make_primary(self, user_id, id, data, **kwargs): "https://developer.zendesk.com/rest_api/docs/core/user_identities#make-identity-primary" api_path = "/api/v2/users/{user_id}/identities/{id}/make_primary" api_path = api_path.format(us...
[]
Please provide a description of the function:def user_identity_show(self, user_id, id, **kwargs): "https://developer.zendesk.com/rest_api/docs/core/user_identities#show-identity" api_path = "/api/v2/users/{user_id}/identities/{id}.json" api_path = api_path.format(user_id=user_id, id=id) ...
[]
Please provide a description of the function:def user_organization_membership_create(self, user_id, data, **kwargs): "https://developer.zendesk.com/rest_api/docs/core/organization_memberships#create-membership" api_path = "/api/v2/users/{user_id}/organization_memberships.json" api_path = api_pat...
[]
Please provide a description of the function:def user_organization_membership_make_default(self, id, membership_id, data, **kwargs): "https://developer.zendesk.com/rest_api/docs/core/organization_memberships#set-membership-as-default" api_path = "/api/v2/users/{id}/organization_memberships/{membership_i...
[]
Please provide a description of the function:def user_organization_membership_show(self, user_id, id, **kwargs): "https://developer.zendesk.com/rest_api/docs/core/organization_memberships#show-membership" api_path = "/api/v2/users/{user_id}/organization_memberships/{id}.json" api_path = api_path...
[]
Please provide a description of the function:def user_organization_memberships(self, user_id, **kwargs): "https://developer.zendesk.com/rest_api/docs/core/organization_memberships#list-memberships" api_path = "/api/v2/users/{user_id}/organization_memberships.json" api_path = api_path.format(user...
[]
Please provide a description of the function:def user_organization_subscriptions(self, user_id, **kwargs): "https://developer.zendesk.com/rest_api/docs/core/organization_subscriptions#list-organization-subscriptions" api_path = "/api/v2/users/{user_id}/organization_subscriptions.json" api_path =...
[]
Please provide a description of the function:def user_organizations(self, user_id, **kwargs): "https://developer.zendesk.com/rest_api/docs/core/organizations#list-organizations" api_path = "/api/v2/users/{user_id}/organizations.json" api_path = api_path.format(user_id=user_id) return sel...
[]
Please provide a description of the function:def user_password_requirements(self, user_id, **kwargs): "https://developer.zendesk.com/rest_api/docs/core/users#get-a-list-of-password-requirements" api_path = "/api/v2/users/{user_id}/password/requirements.json" api_path = api_path.format(user_id=us...
[]
Please provide a description of the function:def user_related(self, id, **kwargs): "https://developer.zendesk.com/rest_api/docs/core/users#user-related-information" api_path = "/api/v2/users/{id}/related.json" api_path = api_path.format(id=id) return self.call(api_path, **kwargs)
[]
Please provide a description of the function:def user_requests(self, id, **kwargs): "https://developer.zendesk.com/rest_api/docs/core/requests#list-requests" api_path = "/api/v2/users/{id}/requests.json" api_path = api_path.format(id=id) return self.call(api_path, **kwargs)
[]
Please provide a description of the function:def user_session_show(self, user_id, id, **kwargs): "https://developer.zendesk.com/rest_api/docs/core/sessions#show-session" api_path = "/api/v2/users/{user_id}/sessions/{id}.json" api_path = api_path.format(user_id=user_id, id=id) return self...
[]
Please provide a description of the function:def user_sessions(self, user_id, **kwargs): "https://developer.zendesk.com/rest_api/docs/core/sessions#list-sessions" api_path = "/api/v2/users/{user_id}/sessions.json" api_path = api_path.format(user_id=user_id) return self.call(api_path, **k...
[]
Please provide a description of the function:def user_sessions_delete(self, user_id, **kwargs): "https://developer.zendesk.com/rest_api/docs/core/sessions#bulk-deleting-sessions" api_path = "/api/v2/users/{user_id}/sessions.json" api_path = api_path.format(user_id=user_id) return self.ca...
[]
Please provide a description of the function:def user_show(self, id, **kwargs): "https://developer.zendesk.com/rest_api/docs/core/users#show-user" api_path = "/api/v2/users/{id}.json" api_path = api_path.format(id=id) return self.call(api_path, **kwargs)
[]
Please provide a description of the function:def user_skips(self, user_id, **kwargs): "https://developer.zendesk.com/rest_api/docs/core/ticket_skips#list-skips-for-the-current-account" api_path = "/api/v2/users/{user_id}/skips.json" api_path = api_path.format(user_id=user_id) return self...
[]
Please provide a description of the function:def user_tags(self, id, **kwargs): "https://developer.zendesk.com/rest_api/docs/core/tags#show-tags" api_path = "/api/v2/users/{id}/tags.json" api_path = api_path.format(id=id) return self.call(api_path, **kwargs)
[]
Please provide a description of the function:def user_tags_delete(self, id, **kwargs): "https://developer.zendesk.com/rest_api/docs/core/tags#remove-tags" api_path = "/api/v2/users/{id}/tags.json" api_path = api_path.format(id=id) return self.call(api_path, method="DELETE", **kwargs)
[]
Please provide a description of the function:def user_tickets_assigned(self, user_id, external_id=None, **kwargs): "https://developer.zendesk.com/rest_api/docs/core/tickets#allowed-for" api_path = "/api/v2/users/{user_id}/tickets/assigned.json" api_path = api_path.format(user_id=user_id) ...
[]
Please provide a description of the function:def users_autocomplete(self, name=None, **kwargs): "https://developer.zendesk.com/rest_api/docs/core/users#autocomplete-users" api_path = "/api/v2/users/autocomplete.json" api_query = {} if "query" in kwargs.keys(): api_query.updat...
[]
Please provide a description of the function:def users_create_many(self, data, **kwargs): "https://developer.zendesk.com/rest_api/docs/core/users#create-many-users" api_path = "/api/v2/users/create_many.json" return self.call(api_path, method="POST", data=data, **kwargs)
[]
Please provide a description of the function:def users_create_or_update(self, data, **kwargs): "https://developer.zendesk.com/rest_api/docs/core/users#create-or-update-user" api_path = "/api/v2/users/create_or_update.json" return self.call(api_path, method="POST", data=data, **kwargs)
[]
Please provide a description of the function:def users_create_or_update_many(self, data, **kwargs): "https://developer.zendesk.com/rest_api/docs/core/users#create-or-update-many-users" api_path = "/api/v2/users/create_or_update_many.json" return self.call(api_path, method="POST", data=data, **kw...
[]
Please provide a description of the function:def users_destroy_many(self, external_ids=None, ids=None, **kwargs): "https://developer.zendesk.com/rest_api/docs/core/users#bulk-deleting-users" api_path = "/api/v2/users/destroy_many.json" api_query = {} if "query" in kwargs.keys(): ...
[]
Please provide a description of the function:def users_list(self, permission_set=None, role=None, **kwargs): "https://developer.zendesk.com/rest_api/docs/core/users#list-users" api_path = "/api/v2/users.json" api_query = {} if "query" in kwargs.keys(): api_query.update(kwargs...
[]
Please provide a description of the function:def users_me(self, include=None, **kwargs): "https://developer.zendesk.com/rest_api/docs/core/users#show-the-currently-authenticated-user" api_path = "/api/v2/users/me.json" api_query = {} if "query" in kwargs.keys(): api_query.upd...
[]
Please provide a description of the function:def users_me_merge(self, data, **kwargs): "https://developer.zendesk.com/rest_api/docs/core/users#merge-self-with-another-user" api_path = "/api/v2/users/me/merge.json" return self.call(api_path, method="PUT", data=data, **kwargs)
[]
Please provide a description of the function:def users_request_create(self, data, **kwargs): "https://developer.zendesk.com/rest_api/docs/core/users#request-user-create" api_path = "/api/v2/users/request_create.json" return self.call(api_path, method="POST", data=data, **kwargs)
[]
Please provide a description of the function:def users_update_many(self, data, external_ids=None, ids=None, **kwargs): "https://developer.zendesk.com/rest_api/docs/core/users#update-many-users" api_path = "/api/v2/users/update_many.json" api_query = {} if "query" in kwargs.keys(): ...
[]
Please provide a description of the function:def view_count(self, id, **kwargs): "https://developer.zendesk.com/rest_api/docs/core/views#get-view-count" api_path = "/api/v2/views/{id}/count.json" api_path = api_path.format(id=id) return self.call(api_path, **kwargs)
[]
Please provide a description of the function:def view_create(self, data, **kwargs): "https://developer.zendesk.com/rest_api/docs/core/views#create-view" api_path = "/api/v2/views.json" return self.call(api_path, method="POST", data=data, **kwargs)
[]
Please provide a description of the function:def view_delete(self, id, **kwargs): "https://developer.zendesk.com/rest_api/docs/core/views#delete-view" api_path = "/api/v2/views/{id}.json" api_path = api_path.format(id=id) return self.call(api_path, method="DELETE", **kwargs)
[]
Please provide a description of the function:def view_execute(self, id, **kwargs): "https://developer.zendesk.com/rest_api/docs/core/views#execute-view" api_path = "/api/v2/views/{id}/execute.json" api_path = api_path.format(id=id) return self.call(api_path, **kwargs)
[]
Please provide a description of the function:def view_export(self, id, **kwargs): "https://developer.zendesk.com/rest_api/docs/core/views#export-view" api_path = "/api/v2/views/{id}/export.json" api_path = api_path.format(id=id) return self.call(api_path, **kwargs)
[]
Please provide a description of the function:def view_show(self, id, **kwargs): "https://developer.zendesk.com/rest_api/docs/core/views#show-view" api_path = "/api/v2/views/{id}.json" api_path = api_path.format(id=id) return self.call(api_path, **kwargs)
[]
Please provide a description of the function:def view_tickets(self, id, **kwargs): "https://developer.zendesk.com/rest_api/docs/core/views#list-tickets-from-a-view" api_path = "/api/v2/views/{id}/tickets.json" api_path = api_path.format(id=id) return self.call(api_path, **kwargs)
[]
Please provide a description of the function:def views_preview(self, data, **kwargs): "https://developer.zendesk.com/rest_api/docs/core/views#previewing-views" api_path = "/api/v2/views/preview.json" return self.call(api_path, method="POST", data=data, **kwargs)
[]
Please provide a description of the function:def views_preview_count(self, data, **kwargs): "https://developer.zendesk.com/rest_api/docs/core/views#preview-count" api_path = "/api/v2/views/preview/count.json" return self.call(api_path, method="POST", data=data, **kwargs)
[]
Please provide a description of the function:def views_show_many(self, ids=None, **kwargs): "https://developer.zendesk.com/rest_api/docs/core/views#list-views-by-id" api_path = "/api/v2/views/show_many.json" api_query = {} if "query" in kwargs.keys(): api_query.update(kwargs[...
[]
Please provide a description of the function:def views_update_many(self, data, **kwargs): "https://developer.zendesk.com/rest_api/docs/core/views#update-many-views" api_path = "/api/v2/views/update_many.json" return self.call(api_path, method="PUT", data=data, **kwargs)
[]
Please provide a description of the function:def visitor_create(self, data, **kwargs): "https://developer.zendesk.com/rest_api/docs/chat/visitors#create-visitor" api_path = "/api/v2/visitors" return self.call(api_path, method="POST", data=data, **kwargs)
[]
Please provide a description of the function:def visitor_show(self, visitor_id, **kwargs): "https://developer.zendesk.com/rest_api/docs/chat/visitors#get-a-visitor" api_path = "/api/v2/visitors/{visitor_id}" api_path = api_path.format(visitor_id=visitor_id) return self.call(api_path, **k...
[]
Please provide a description of the function:def visitor_update(self, visitor_id, data, **kwargs): "https://developer.zendesk.com/rest_api/docs/chat/visitors#update-visitor" api_path = "/api/v2/visitors/{visitor_id}" api_path = api_path.format(visitor_id=visitor_id) return self.call(api_...
[]
Please provide a description of the function:def include_notify_js_variables(context): ctx = { 'user': context['request'].user, 'update_notification': reverse('notifications:update'), 'mark_notification': reverse('notifications:mark'), 'mark_all_notification': reverse('notificat...
[ "\n Inclusion template tag to include all JS variables required by the\n notify.js file on the HTML page around <script> tags.\n\n Example::\n {% include_notify_js_variables %}\n\n :return: Prepares context for rendering in the inclusion file.\n " ]
Please provide a description of the function:def generate_html(self, notifications): html_chunks = [] for nf in notifications: extra = nf.as_json() if self.target == 'box' else {} html = render_notification(nf, render_target=self.target, **extra) html_chunks....
[ "\n Generates rendered HTML content using supplied notifications.\n :param notifications: Notification QuerySet Object\n :return: Rendered HTML.\n " ]
Please provide a description of the function:def render(self, context): notifications = self.obj.resolve(context) return self.generate_html(notifications)
[ "\n Render method of the template tag, returns generated html content to\n the parent template where it was called.\n :param context: Template context.\n :return: Generated HTML content using notification queryset object.\n " ]
Please provide a description of the function:def unread_all(self, user=None): qs = self.read() if user: qs = qs.filter(recipient=user) qs.update(read=False)
[ "\n Marks all notifications as unread for a user (if supplied)\n\n :param user: Notification recipient.\n\n :return: Updates QuerySet as unread.\n " ]
Please provide a description of the function:def read_all(self, user=None): qs = self.unread() if user: qs = qs.filter(recipient=user) qs.update(read=True)
[ "\n Marks all notifications as read for a user (if supplied)\n\n :param user: Notification recipient.\n\n :return: Updates QuerySet as read.\n " ]
Please provide a description of the function:def delete_all(self, user=None): qs = self.active() if user: qs = qs.filter(recipient=user) soft_delete = getattr(settings, 'NOTIFY_SOFT_DELETE', True) if soft_delete: qs.update(deleted=True) else: ...
[ "\n Method to soft-delete all notifications of a User (if supplied)\n\n :param user: Notification recipient.\n\n :return: Updates QuerySet as soft-deleted.\n " ]
Please provide a description of the function:def active_all(self, user=None): qs = self.deleted() if user: qs = qs.filter(recipient=user) qs.update(deleted=False)
[ "\n Method to soft-delete all notifications of a User (if supplied)\n\n :param user: Notification recipient.\n\n :return: Updates QuerySet as soft-deleted.\n " ]
Please provide a description of the function:def prefetch_relations(weak_queryset): from django.contrib.contenttypes.models import ContentType from django.contrib.contenttypes.fields import GenericForeignKey # reverse model's generic foreign keys into a dict: # { 'field_name': generic.GenericForei...
[ "\n FROM: https://djangosnippets.org/snippets/2492/\n\n Consider such a model class::\n\n class Action(models.Model):\n actor_content_type = models.ForeignKey(ContentType,related_name='actor')\n actor_object_id = models.PositiveIntegerField()\n actor = GenericForeignKey...
Please provide a description of the function:def notification_redirect(request, ctx): if request.is_ajax(): return JsonResponse(ctx) else: next_page = request.POST.get('next', reverse('notifications:all')) if not ctx['success']: return HttpResponseBadRequest(ctx['msg']) ...
[ "\n Helper to handle HTTP response after an action is performed on notification\n\n :param request: HTTP request context of the notification\n\n :param ctx: context to be returned when a AJAX call is made.\n\n :returns: Either JSON for AJAX or redirects to the calculated next page.\n " ]
Please provide a description of the function:def notifications(request): notification_list = request.user.notifications.active().prefetch() return render(request, 'notifications/all.html', {'notifications': notification_list})
[ "\n Returns a rendered page of all notifications for the logged-in user.\n Uses ``notification.nf_type`` as the template for individual notification.\n Each notification type is expected to have a render template\n at ``notifications/includes/NOTIFICATION_TYPE.html``.\n\n :param request: HTTP request...