Giter Club home page Giter Club logo

zenpy's People

Contributors

ahmedsabriz avatar andrewswait avatar bastianzim avatar blodter avatar cryptomail avatar deybhayden avatar dstarod avatar dym avatar facetoe avatar fmartingr avatar gizmo93 avatar guptaa3 avatar insspb avatar jgillmanjr avatar jwalterclark avatar kapoorabhish avatar makcyd avatar michaelcosby avatar mpata avatar northisup avatar onyb avatar oxmane avatar ptr314 avatar ravichandrasekaran avatar sapphire64 avatar shaakmiller avatar sleepysysadmin avatar thepumpinglemma avatar wontonst avatar ypperlig avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

zenpy's Issues

User's related information

Hi guys,

Is there a way to get user's related information based on his name or his id like:

zenpy.search("john doe", type='user', related_information=True)

?

I would like to get users infos and his number of requested tickets or opened tickets.

query on users

Hello,

How can I get a user thanks to his email ?
zenpy.users(email="theemailadress") doesnt work. I got a resultgenerator instead of an object.

Regards

HW

Mock over zenpy

Hi,

It's any way to make a mock to the tickets library?. For example, make a mock to zenpy.tickets.create function?

I make a mock, but the test not working, the call_count give me 0 value (i try with zenpy.lib.api.TicketApi.create, zenpy.lib.api.CRUDApi.create, with the same result).

Thanks

Add a comment to a ticket

I'm trying to facilitate the work of our agents by adding a private comment to each incoming ticket, where we specify a few additional details about the requester, specific to our service. However, I can't figure out if it's possible to create a comment, either public or private, for a given ticket. Is this implemented at all? If not, any chance it will be?

create_or_update_many returns 403

I think this is a bug in Zendesk as even their example returns a 403:

curl -v -u [email protected]/token:sometoken https://facetoe.zendesk.com/api/v2/users/create_or_update_many.json   -H "Content-Type: application/json" -X POST -d '{"users": [{"name": "Roger Wilco", "email": "[email protected]", "role": "agent"}, {"external_id": "account_54321", "name": "Woger Rilco", "email": "[email protected]", "role": "admin"}]}'
...

> POST /api/v2/users/create_or_update_many.json HTTP/1.1
> Host: facetoe.zendesk.com
> User-Agent: curl/7.47.1
> Accept: */*
> Content-Type: application/json
> Content-Length: 185
> 
* upload completely sent off: 185 out of 185 bytes
< HTTP/1.1 403 Forbidden

Is it time to cut a new release?

Hi facetoe,

Thank you for implementing my request with issue #36. I am hoping to use the latest changes in production very soon. Is the current state of master ready for version 1.0.3? ๐Ÿ˜„

SearchEndpoint improper query string generation

It seems that the if-elif conditions defined in SearchEndpoint don't properly handle cases when the value is a datetime object OR the value is of list type and key == ids. In order for those arguments to make it into the final query string, they can't be handled as elif conditions. They should probably be their own if conditions so that the code can fall through to assessment of the keys, and then modify renamed_kwargs.

zenpy hangs

Hi There

I have a problem where regularly my zenpy client just hangs without throwing an exception...

Here my code....

ZD_EXCEPTIONS = (
    ZenpyException,
    APIException,
    RecordNotFoundException,
    ZenpyCacheException
    )

try:
    usr = []
    for obj in zenpy.group_memberships(timeout=0.05):
        if obj.user.role == 'agent' and \
          obj.user.to_dict()['user_fields']['custom_name'] is not None:
            data = [
                obj.user.to_dict()['user_fields']['custom_name'].replace(
                    '.domain.com', '').replace('-', '_'),
                obj.user.id,
                obj.user.email,
                obj.user.organization.id,
                obj.user.organization.name,
                ]
            if data not in usr:
                usr.append(data)
except ZD_EXCEPTIONS as error:
    print('Problem connecting to Zendesk API. {}'.format(error))
    sys.exit(1)

I assume I am hitting rate limit or something but it is not caught by the timeout either. I found this article regarding best practices on rate limit. https://support.zendesk.com/hc/en-us/articles/203691336-Best-practices-for-avoiding-rate-limiting

Any suggestions what I can do?

Many Thanks
Christoph

"objects" directory was there? and now it's gone?

I installed zenpy from source about 2 weeks ago.
it included "/objects/" subdirectory.

Today I can't find the "objects" subdir (neither in pipy nor in github).
Where did it go?
Am I missing something?

Ticket update returning weird error from api_objects

So I'm trying out zenpy for editing tickets but when I'm trying update it I receive this weird error:

>>> ticket = zend.tickets.get_ticket(38884)
>>> ticket.tags.append(u'wrapper_testing')
>>> zend.tickets.update(ticket)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/xander-lubuntu/.virtualenvs/sabackend/local/lib/python2.7/site-packages/zenpy/lib/api_objects.py", line 25, in __repr__
return super().__str__()
TypeError: super() takes at least 1 argument (0 given)

It updates the ticket yes, but this is something I would not want to receive or see.
Can anyone shine a light on this thing?

Sort Example

Can you please update the readme to provide an example on how to query or search with a sort_by parameter?

Incremental Ticket Metrics Event support

Hi,
First of all let me say, great module! Really helped me out. I did though find the incremental ticket metrics missing.

I opened a branch and added it myself, but I do not have permissions to publish the branch and open a pull request.

I would love for this to be added (through my PR or not), as I don't want to maintain a fork for ZenPy only for this.

Thanks,
Uri

Issue creating a new 'User' object

Hi,

First and foremost, thanks for this zendesk api wrapper.

After reading through the zenpy documentation though, I am having trouble creating new users.

After logging in with my credentials:

zenpy = zenpy.Zenpy(**creds)

I can make zenpy queries on zenpy.users (etc.), but when I try to create a new user:

user = User(name='Jim', email='[email protected]')

I get the following error message:

Traceback (most recent call last):
  ...
    user = User(name='Jim', email='[email protected]')
NameError: name 'User' is not defined

This was the example given in the documentation.

I am hesitant because I'm afraid it is an issue on my end (am I missing something?), but would like to see if anyone else has this issue since I've exhausted a lot of different options.

Thanks,
Preston

Users endpoint not sideloading organizations, etc.

Hey!
The users endpoint does not seem to side load organizations.
https://github.com/facetoe/zenpy/blob/master/zenpy/lib/endpoint.py#L243

The http request does show the query parmater
https://test.zendesk.com/api/v2/users/1.json&include=organizations,abilities,roles,identities,groups

but I am unable to access organizations on the result, for example:

(Pdb) zendesk_user = zendesk.users(id=4727211738)
(Pdb) zendesk_user.organizations
*** AttributeError: 'User' object has no attribute 'organizations'

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.