python-intercom icon indicating copy to clipboard operation
python-intercom copied to clipboard

Find Admin by Id

Open MrJaeger opened this issue 8 years ago • 2 comments
trafficstars

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)!

MrJaeger avatar Mar 20 '17 19:03 MrJaeger

@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.

jkeyes avatar Oct 24 '17 22:10 jkeyes

Any update on this?

angusprintify avatar Nov 29 '19 16:11 angusprintify