How to use the zenpy.lib.endpoint.MultipleIDEndpoint function in zenpy

To help you get started, we’ve selected a few zenpy examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github facetoe / zenpy / zenpy / lib / endpoint.py View on Github external
users.group_memberships = SecondaryEndpoint('users/%(id)s/group_memberships.json')
    users.deleted = PrimaryEndpoint("deleted_users")
    users.groups = SecondaryEndpoint('users/%(id)s/groups.json')
    users.incremental = IncrementalEndpoint('incremental/users.json')
    users.me = PrimaryEndpoint('users/me')
    users.merge = SecondaryEndpoint('users/%(id)s/merge.json')
    users.organization_memberships = SecondaryEndpoint('users/%(id)s/organization_memberships.json')
    users.organizations = SecondaryEndpoint('users/%(id)s/organizations.json')
    users.related = SecondaryEndpoint('users/%(id)s/related.json')
    users.requested = SecondaryEndpoint('users/%(id)s/tickets/requested.json')
    users.requests = SecondaryEndpoint('users/%(id)s/requests.json')
    users.tags = SecondaryEndpoint('users/%(id)s/tags.json')
    users.set_password = SecondaryEndpoint('users/%(id)s/password.json')
    users.identities = SecondaryEndpoint('users/%(id)s/identities.json')
    users.identities.show = MultipleIDEndpoint('users/{0}/identities/{1}.json')
    users.identities.update = MultipleIDEndpoint('users/{0}/identities/{1}.json')
    users.identities.make_primary = MultipleIDEndpoint('users/{0}/identities/{1}/make_primary')
    users.identities.verify = MultipleIDEndpoint('users/{0}/identities/{1}/verify')
    users.identities.request_verification = MultipleIDEndpoint('users/{0}/identities/{1}/request_verification.json')
    users.identities.delete = MultipleIDEndpoint('users/{0}/identities/{1}.json')
    users.skips = SecondaryEndpoint('users/%(id)s/skips.json')
    views = PrimaryEndpoint('views')
    views.active = PrimaryEndpoint('views/active')
    views.compact = PrimaryEndpoint('views/compact')
    views.count = SecondaryEndpoint('views/%(id)s/count.json')
    views.tickets = SecondaryEndpoint('views/%(id)s/tickets')
    views.execute = SecondaryEndpoint('views/%(id)s/execute.json')
    views.export = SecondaryEndpoint('views/%(id)s/export.json')
    views.search = ViewSearchEndpoint('views/search.json')
    recipient_addresses = PrimaryEndpoint('recipient_addresses')

    class Dummy(object): pass
github facetoe / zenpy / zenpy / lib / endpoint.py View on Github external
help_centre.topics.subscriptions_delete = MultipleIDEndpoint('community/topics/{}/subscriptions/{}.json')
    help_centre.topics.access_policies = SecondaryEndpoint('community/topics/%(id)s/access_policy.json')

    help_centre.posts = PrimaryEndpoint('community/posts')
    help_centre.posts.subscriptions = SecondaryEndpoint('community/posts/%(id)s/subscriptions.json')
    help_centre.posts.subscriptions_delete = MultipleIDEndpoint('community/posts/{}/subscriptions/{}.json')

    help_centre.posts.comments = SecondaryEndpoint('community/posts/%(id)s/comments.json')
    help_centre.posts.comments.delete = MultipleIDEndpoint('community/posts/{}/comments/{}.json')
    help_centre.posts.comments.update = MultipleIDEndpoint('community/posts/{}/comments/{}.json')

    help_centre.posts.votes = SecondaryEndpoint('community/posts/%(id)s/votes.json')
    help_centre.posts.votes.up = SecondaryEndpoint('community/posts/%(id)s/up.json')
    help_centre.posts.votes.down = SecondaryEndpoint('community/posts/%(id)s/down.json')
    help_centre.posts.comments.comment_votes = MultipleIDEndpoint('community/posts/{}/comments/{}/votes.json')
    help_centre.posts.comments.comment_votes.up = MultipleIDEndpoint('community/posts/{}/comments/{}/up.json')
    help_centre.posts.comments.comment_votes.down = MultipleIDEndpoint('community/posts/{}/comments/{}/down.json')

    help_centre.user_segments = PrimaryEndpoint('help_center/user_segments')
    help_centre.user_segments.applicable = PrimaryEndpoint('help_center/user_segments/applicable')
    help_centre.user_segments.sections = SecondaryEndpoint('help_center/user_segments/%(id)s/sections.json')
    help_centre.user_segments.topics = SecondaryEndpoint('help_center/user_segments/%(id)s/topics.json')

    def __new__(cls, endpoint_name):
        return getattr(cls, endpoint_name)
github facetoe / zenpy / zenpy / lib / endpoint.py View on Github external
help_centre.topics.access_policies = SecondaryEndpoint('community/topics/%(id)s/access_policy.json')

    help_centre.posts = PrimaryEndpoint('community/posts')
    help_centre.posts.subscriptions = SecondaryEndpoint('community/posts/%(id)s/subscriptions.json')
    help_centre.posts.subscriptions_delete = MultipleIDEndpoint('community/posts/{}/subscriptions/{}.json')

    help_centre.posts.comments = SecondaryEndpoint('community/posts/%(id)s/comments.json')
    help_centre.posts.comments.delete = MultipleIDEndpoint('community/posts/{}/comments/{}.json')
    help_centre.posts.comments.update = MultipleIDEndpoint('community/posts/{}/comments/{}.json')

    help_centre.posts.votes = SecondaryEndpoint('community/posts/%(id)s/votes.json')
    help_centre.posts.votes.up = SecondaryEndpoint('community/posts/%(id)s/up.json')
    help_centre.posts.votes.down = SecondaryEndpoint('community/posts/%(id)s/down.json')
    help_centre.posts.comments.comment_votes = MultipleIDEndpoint('community/posts/{}/comments/{}/votes.json')
    help_centre.posts.comments.comment_votes.up = MultipleIDEndpoint('community/posts/{}/comments/{}/up.json')
    help_centre.posts.comments.comment_votes.down = MultipleIDEndpoint('community/posts/{}/comments/{}/down.json')

    help_centre.user_segments = PrimaryEndpoint('help_center/user_segments')
    help_centre.user_segments.applicable = PrimaryEndpoint('help_center/user_segments/applicable')
    help_centre.user_segments.sections = SecondaryEndpoint('help_center/user_segments/%(id)s/sections.json')
    help_centre.user_segments.topics = SecondaryEndpoint('help_center/user_segments/%(id)s/topics.json')

    def __new__(cls, endpoint_name):
        return getattr(cls, endpoint_name)
github facetoe / zenpy / zenpy / lib / endpoint.py View on Github external
users.groups = SecondaryEndpoint('users/%(id)s/groups.json')
    users.incremental = IncrementalEndpoint('incremental/users.json')
    users.me = PrimaryEndpoint('users/me')
    users.merge = SecondaryEndpoint('users/%(id)s/merge.json')
    users.organization_memberships = SecondaryEndpoint('users/%(id)s/organization_memberships.json')
    users.organizations = SecondaryEndpoint('users/%(id)s/organizations.json')
    users.related = SecondaryEndpoint('users/%(id)s/related.json')
    users.requested = SecondaryEndpoint('users/%(id)s/tickets/requested.json')
    users.requests = SecondaryEndpoint('users/%(id)s/requests.json')
    users.tags = SecondaryEndpoint('users/%(id)s/tags.json')
    users.set_password = SecondaryEndpoint('users/%(id)s/password.json')
    users.identities = SecondaryEndpoint('users/%(id)s/identities.json')
    users.identities.show = MultipleIDEndpoint('users/{0}/identities/{1}.json')
    users.identities.update = MultipleIDEndpoint('users/{0}/identities/{1}.json')
    users.identities.make_primary = MultipleIDEndpoint('users/{0}/identities/{1}/make_primary')
    users.identities.verify = MultipleIDEndpoint('users/{0}/identities/{1}/verify')
    users.identities.request_verification = MultipleIDEndpoint('users/{0}/identities/{1}/request_verification.json')
    users.identities.delete = MultipleIDEndpoint('users/{0}/identities/{1}.json')
    users.skips = SecondaryEndpoint('users/%(id)s/skips.json')
    views = PrimaryEndpoint('views')
    views.active = PrimaryEndpoint('views/active')
    views.compact = PrimaryEndpoint('views/compact')
    views.count = SecondaryEndpoint('views/%(id)s/count.json')
    views.tickets = SecondaryEndpoint('views/%(id)s/tickets')
    views.execute = SecondaryEndpoint('views/%(id)s/execute.json')
    views.export = SecondaryEndpoint('views/%(id)s/export.json')
    views.search = ViewSearchEndpoint('views/search.json')
    recipient_addresses = PrimaryEndpoint('recipient_addresses')

    class Dummy(object): pass

    talk = Dummy()
github facetoe / zenpy / zenpy / lib / endpoint.py View on Github external
help_centre.sections.create = SecondaryEndpoint('help_center/categories/%(id)s/sections.json')
    help_centre.sections.articles = SecondaryEndpoint('help_center/sections/%(id)s/articles.json')
    help_centre.sections.translations = SecondaryEndpoint('help_center/sections/%(id)s/translations.json')
    help_centre.sections.create_translation = SecondaryEndpoint('help_center/sections/%(id)s/translations.json')
    help_centre.sections.missing_translations = SecondaryEndpoint(
        'help_center/sections/%(id)s/translations/missing.json')
    help_centre.sections.update_translation = MultipleIDEndpoint('help_center/sections/{}/translations/{}.json')
    help_centre.sections.delete_translation = SecondaryEndpoint('help_center/translations/%(id)s.json')
    help_centre.sections.subscriptions = SecondaryEndpoint('help_center/sections/%(id)s/subscriptions.json')
    help_centre.sections.subscriptions_delete = MultipleIDEndpoint('help_center/sections/{}/subscriptions/{}.json')
    help_centre.sections.access_policies = SecondaryEndpoint('help_center/sections/%(id)s/access_policy.json')

    help_centre.topics = PrimaryEndpoint("community/topics")
    help_centre.topics.posts = SecondaryEndpoint('community/topics/%(id)s/posts.json')
    help_centre.topics.subscriptions = SecondaryEndpoint('community/topics/%(id)s/subscriptions.json')
    help_centre.topics.subscriptions_delete = MultipleIDEndpoint('community/topics/{}/subscriptions/{}.json')
    help_centre.topics.access_policies = SecondaryEndpoint('community/topics/%(id)s/access_policy.json')

    help_centre.posts = PrimaryEndpoint('community/posts')
    help_centre.posts.subscriptions = SecondaryEndpoint('community/posts/%(id)s/subscriptions.json')
    help_centre.posts.subscriptions_delete = MultipleIDEndpoint('community/posts/{}/subscriptions/{}.json')

    help_centre.posts.comments = SecondaryEndpoint('community/posts/%(id)s/comments.json')
    help_centre.posts.comments.delete = MultipleIDEndpoint('community/posts/{}/comments/{}.json')
    help_centre.posts.comments.update = MultipleIDEndpoint('community/posts/{}/comments/{}.json')

    help_centre.posts.votes = SecondaryEndpoint('community/posts/%(id)s/votes.json')
    help_centre.posts.votes.up = SecondaryEndpoint('community/posts/%(id)s/up.json')
    help_centre.posts.votes.down = SecondaryEndpoint('community/posts/%(id)s/down.json')
    help_centre.posts.comments.comment_votes = MultipleIDEndpoint('community/posts/{}/comments/{}/votes.json')
    help_centre.posts.comments.comment_votes.up = MultipleIDEndpoint('community/posts/{}/comments/{}/up.json')
    help_centre.posts.comments.comment_votes.down = MultipleIDEndpoint('community/posts/{}/comments/{}/down.json')
github facetoe / zenpy / zenpy / lib / endpoint.py View on Github external
chats.search = ChatSearchEndpoint('chats/search')
    chats.stream = ChatSearchEndpoint('stream/chats')
    chats.incremental = ChatIncrementalEndpoint('incremental/chats')
    custom_agent_roles = PrimaryEndpoint('custom_roles')
    dynamic_contents = PrimaryEndpoint('dynamic_content/items')
    dynamic_contents.variants = SecondaryEndpoint('dynamic_content/items/%(id)s/variants.json')
    dynamic_contents.variants.show = MultipleIDEndpoint('dynamic_content/items/{}/variants/{}.json')
    dynamic_contents.variants.create = SecondaryEndpoint('dynamic_content/items/%(id)s/variants.json')
    dynamic_contents.variants.create_many = SecondaryEndpoint('dynamic_content/items/%(id)s/variants/create_many.json')
    dynamic_contents.variants.update = MultipleIDEndpoint('dynamic_content/items/{}/variants/{}.json')
    dynamic_contents.variants.update_many = SecondaryEndpoint('dynamic_content/items/%(id)s/variants/update_many.json')
    dynamic_contents.variants.delete = MultipleIDEndpoint('dynamic_content/items/{}/variants/{}.json')
    end_user = SecondaryEndpoint('end_users/%(id)s.json')
    group_memberships = PrimaryEndpoint('group_memberships')
    group_memberships.assignable = PrimaryEndpoint('group_memberships/assignable')
    group_memberships.make_default = MultipleIDEndpoint('users/{}/group_memberships/{}/make_default.json')
    groups = PrimaryEndpoint('groups')
    groups.memberships = SecondaryEndpoint('groups/%(id)s/memberships.json')
    groups.memberships_assignable = SecondaryEndpoint('groups/%(id)s/memberships/assignable.json')
    groups.users = SecondaryEndpoint('groups/%(id)s/users.json')
    job_statuses = PrimaryEndpoint('job_statuses')
    locales = PrimaryEndpoint('locales')
    links = PrimaryEndpoint('services/jira/links')
    macros = MacroEndpoint('macros')
    macros.apply = SecondaryEndpoint('macros/%(id)s/apply.json')

    nps = PrimaryEndpoint('nps')
    nps.recipients_incremental = IncrementalEndpoint('nps/incremental/recipients.json')
    nps.responses_incremental = IncrementalEndpoint('nps/incremental/responses.json')
    organization_memberships = PrimaryEndpoint('organization_memberships')
    organization_fields = PrimaryEndpoint('organization_fields')
    organization_fields.reorder = PrimaryEndpoint('organization_fields/reorder.json')
github facetoe / zenpy / zenpy / lib / endpoint.py View on Github external
chats.account = ChatEndpoint('account')
    chats.agents = ChatEndpoint('agents')
    chats.agents.me = ChatEndpoint("agents/me")
    chats.bans = ChatEndpoint('bans')
    chats.departments = ChatEndpoint('departments')
    chats.goals = ChatEndpoint('goals')
    chats.triggers = ChatEndpoint('triggers')
    chats.shortcuts = ChatEndpoint('shortcuts')
    chats.visitors = ChatEndpoint('visitors')
    chats.search = ChatSearchEndpoint('chats/search')
    chats.stream = ChatSearchEndpoint('stream/chats')
    chats.incremental = ChatIncrementalEndpoint('incremental/chats')
    custom_agent_roles = PrimaryEndpoint('custom_roles')
    dynamic_contents = PrimaryEndpoint('dynamic_content/items')
    dynamic_contents.variants = SecondaryEndpoint('dynamic_content/items/%(id)s/variants.json')
    dynamic_contents.variants.show = MultipleIDEndpoint('dynamic_content/items/{}/variants/{}.json')
    dynamic_contents.variants.create = SecondaryEndpoint('dynamic_content/items/%(id)s/variants.json')
    dynamic_contents.variants.create_many = SecondaryEndpoint('dynamic_content/items/%(id)s/variants/create_many.json')
    dynamic_contents.variants.update = MultipleIDEndpoint('dynamic_content/items/{}/variants/{}.json')
    dynamic_contents.variants.update_many = SecondaryEndpoint('dynamic_content/items/%(id)s/variants/update_many.json')
    dynamic_contents.variants.delete = MultipleIDEndpoint('dynamic_content/items/{}/variants/{}.json')
    end_user = SecondaryEndpoint('end_users/%(id)s.json')
    group_memberships = PrimaryEndpoint('group_memberships')
    group_memberships.assignable = PrimaryEndpoint('group_memberships/assignable')
    group_memberships.make_default = MultipleIDEndpoint('users/{}/group_memberships/{}/make_default.json')
    groups = PrimaryEndpoint('groups')
    groups.memberships = SecondaryEndpoint('groups/%(id)s/memberships.json')
    groups.memberships_assignable = SecondaryEndpoint('groups/%(id)s/memberships/assignable.json')
    groups.users = SecondaryEndpoint('groups/%(id)s/users.json')
    job_statuses = PrimaryEndpoint('job_statuses')
    locales = PrimaryEndpoint('locales')
    links = PrimaryEndpoint('services/jira/links')
github facetoe / zenpy / zenpy / lib / endpoint.py View on Github external
help_centre.categories.missing_translations = SecondaryEndpoint(
        'help_center/categories/%(id)s/translations/missing.json')
    help_centre.categories.update_translation = MultipleIDEndpoint('help_center/categories/{}/translations/{}.json')
    help_centre.categories.delete_translation = SecondaryEndpoint('help_center/translations/%(id)s.json')

    help_centre.sections = PrimaryEndpoint('help_center/sections')
    help_centre.sections.create = SecondaryEndpoint('help_center/categories/%(id)s/sections.json')
    help_centre.sections.articles = SecondaryEndpoint('help_center/sections/%(id)s/articles.json')
    help_centre.sections.translations = SecondaryEndpoint('help_center/sections/%(id)s/translations.json')
    help_centre.sections.create_translation = SecondaryEndpoint('help_center/sections/%(id)s/translations.json')
    help_centre.sections.missing_translations = SecondaryEndpoint(
        'help_center/sections/%(id)s/translations/missing.json')
    help_centre.sections.update_translation = MultipleIDEndpoint('help_center/sections/{}/translations/{}.json')
    help_centre.sections.delete_translation = SecondaryEndpoint('help_center/translations/%(id)s.json')
    help_centre.sections.subscriptions = SecondaryEndpoint('help_center/sections/%(id)s/subscriptions.json')
    help_centre.sections.subscriptions_delete = MultipleIDEndpoint('help_center/sections/{}/subscriptions/{}.json')
    help_centre.sections.access_policies = SecondaryEndpoint('help_center/sections/%(id)s/access_policy.json')

    help_centre.topics = PrimaryEndpoint("community/topics")
    help_centre.topics.posts = SecondaryEndpoint('community/topics/%(id)s/posts.json')
    help_centre.topics.subscriptions = SecondaryEndpoint('community/topics/%(id)s/subscriptions.json')
    help_centre.topics.subscriptions_delete = MultipleIDEndpoint('community/topics/{}/subscriptions/{}.json')
    help_centre.topics.access_policies = SecondaryEndpoint('community/topics/%(id)s/access_policy.json')

    help_centre.posts = PrimaryEndpoint('community/posts')
    help_centre.posts.subscriptions = SecondaryEndpoint('community/posts/%(id)s/subscriptions.json')
    help_centre.posts.subscriptions_delete = MultipleIDEndpoint('community/posts/{}/subscriptions/{}.json')

    help_centre.posts.comments = SecondaryEndpoint('community/posts/%(id)s/comments.json')
    help_centre.posts.comments.delete = MultipleIDEndpoint('community/posts/{}/comments/{}.json')
    help_centre.posts.comments.update = MultipleIDEndpoint('community/posts/{}/comments/{}.json')
github facetoe / zenpy / zenpy / lib / endpoint.py View on Github external
'help_center/sections/%(id)s/translations/missing.json')
    help_centre.sections.update_translation = MultipleIDEndpoint('help_center/sections/{}/translations/{}.json')
    help_centre.sections.delete_translation = SecondaryEndpoint('help_center/translations/%(id)s.json')
    help_centre.sections.subscriptions = SecondaryEndpoint('help_center/sections/%(id)s/subscriptions.json')
    help_centre.sections.subscriptions_delete = MultipleIDEndpoint('help_center/sections/{}/subscriptions/{}.json')
    help_centre.sections.access_policies = SecondaryEndpoint('help_center/sections/%(id)s/access_policy.json')

    help_centre.topics = PrimaryEndpoint("community/topics")
    help_centre.topics.posts = SecondaryEndpoint('community/topics/%(id)s/posts.json')
    help_centre.topics.subscriptions = SecondaryEndpoint('community/topics/%(id)s/subscriptions.json')
    help_centre.topics.subscriptions_delete = MultipleIDEndpoint('community/topics/{}/subscriptions/{}.json')
    help_centre.topics.access_policies = SecondaryEndpoint('community/topics/%(id)s/access_policy.json')

    help_centre.posts = PrimaryEndpoint('community/posts')
    help_centre.posts.subscriptions = SecondaryEndpoint('community/posts/%(id)s/subscriptions.json')
    help_centre.posts.subscriptions_delete = MultipleIDEndpoint('community/posts/{}/subscriptions/{}.json')

    help_centre.posts.comments = SecondaryEndpoint('community/posts/%(id)s/comments.json')
    help_centre.posts.comments.delete = MultipleIDEndpoint('community/posts/{}/comments/{}.json')
    help_centre.posts.comments.update = MultipleIDEndpoint('community/posts/{}/comments/{}.json')

    help_centre.posts.votes = SecondaryEndpoint('community/posts/%(id)s/votes.json')
    help_centre.posts.votes.up = SecondaryEndpoint('community/posts/%(id)s/up.json')
    help_centre.posts.votes.down = SecondaryEndpoint('community/posts/%(id)s/down.json')
    help_centre.posts.comments.comment_votes = MultipleIDEndpoint('community/posts/{}/comments/{}/votes.json')
    help_centre.posts.comments.comment_votes.up = MultipleIDEndpoint('community/posts/{}/comments/{}/up.json')
    help_centre.posts.comments.comment_votes.down = MultipleIDEndpoint('community/posts/{}/comments/{}/down.json')

    help_centre.user_segments = PrimaryEndpoint('help_center/user_segments')
    help_centre.user_segments.applicable = PrimaryEndpoint('help_center/user_segments/applicable')
    help_centre.user_segments.sections = SecondaryEndpoint('help_center/user_segments/%(id)s/sections.json')
    help_centre.user_segments.topics = SecondaryEndpoint('help_center/user_segments/%(id)s/topics.json')
github facetoe / zenpy / zenpy / lib / endpoint.py View on Github external
users.me = PrimaryEndpoint('users/me')
    users.merge = SecondaryEndpoint('users/%(id)s/merge.json')
    users.organization_memberships = SecondaryEndpoint('users/%(id)s/organization_memberships.json')
    users.organizations = SecondaryEndpoint('users/%(id)s/organizations.json')
    users.related = SecondaryEndpoint('users/%(id)s/related.json')
    users.requested = SecondaryEndpoint('users/%(id)s/tickets/requested.json')
    users.requests = SecondaryEndpoint('users/%(id)s/requests.json')
    users.tags = SecondaryEndpoint('users/%(id)s/tags.json')
    users.set_password = SecondaryEndpoint('users/%(id)s/password.json')
    users.identities = SecondaryEndpoint('users/%(id)s/identities.json')
    users.identities.show = MultipleIDEndpoint('users/{0}/identities/{1}.json')
    users.identities.update = MultipleIDEndpoint('users/{0}/identities/{1}.json')
    users.identities.make_primary = MultipleIDEndpoint('users/{0}/identities/{1}/make_primary')
    users.identities.verify = MultipleIDEndpoint('users/{0}/identities/{1}/verify')
    users.identities.request_verification = MultipleIDEndpoint('users/{0}/identities/{1}/request_verification.json')
    users.identities.delete = MultipleIDEndpoint('users/{0}/identities/{1}.json')
    users.skips = SecondaryEndpoint('users/%(id)s/skips.json')
    views = PrimaryEndpoint('views')
    views.active = PrimaryEndpoint('views/active')
    views.compact = PrimaryEndpoint('views/compact')
    views.count = SecondaryEndpoint('views/%(id)s/count.json')
    views.tickets = SecondaryEndpoint('views/%(id)s/tickets')
    views.execute = SecondaryEndpoint('views/%(id)s/execute.json')
    views.export = SecondaryEndpoint('views/%(id)s/export.json')
    views.search = ViewSearchEndpoint('views/search.json')
    recipient_addresses = PrimaryEndpoint('recipient_addresses')

    class Dummy(object): pass

    talk = Dummy()
    talk.current_queue_activity = PrimaryEndpoint('channels/voice/stats/current_queue_activity')
    talk.agents_activity = PrimaryEndpoint('channels/voice/stats/agents_activity')