intercom / python-intercom

Python wrapper for the Intercom API.
https://keyes.ie/things/python-intercom/
Other
234 stars 145 forks source link

Find Admin by Id #159

Open MrJaeger opened 7 years ago

MrJaeger commented 7 years ago

In a previous version of this client (2.1.1) the Admin class had the find method on it (see https://github.com/jkeyes/python-intercom/blob/467bb83b1fbc3e2f88ed21e14877b412e25e6c17/intercom/admin.py) so you could find a particular Intercom admin by their id. Would it be possible to add this functionality back in? I tested the functionality by doing:

from intercom.client import Client
from intercom.service.admin import Admin
from intercom.api_operations.find import Find

MyIntercomAdmin(Admin, Find):
    pass

client = Client(personal_access_token='MY TOKEN')
admins = MyIntercomAdmin(client)
admin = admins.find(id='id of admin I am searching for')

And the correct admin is returned. We really need this functionality for our purposes, will locally patch the issue for now but would love official support (/would be happy to write the PR to make find admin work)!

jkeyes commented 6 years ago

@MrJaeger I've merged a PR with this support just now. It will be in the next release. Thanks for raising the issue. I'll update here when the latest is released.

angusprintify commented 4 years ago

Any update on this?