From 4032094bd2345d9f8f02899772c786fbdf253108 Mon Sep 17 00:00:00 2001 From: Kyriog Date: Wed, 1 Aug 2018 20:38:28 +0200 Subject: [PATCH] =?UTF-8?q?Adding=20API=20method=20for=20Get=C2=A0User=20e?= =?UTF-8?q?ndpoint=20(#103)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- disco/api/client.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/disco/api/client.py b/disco/api/client.py index 9fef7ef..2437ff4 100644 --- a/disco/api/client.py +++ b/disco/api/client.py @@ -493,6 +493,10 @@ class APIClient(LoggingClass): webhooks = Webhook.create_hash(self.client, 'id', data['webhooks']) return AuditLogEntry.create_map(self.client, r.json()['audit_log_entries'], users, webhooks, guild_id=guild) + def users_get(self, user): + r = self.http(Routes.USERS_GET, dict(user=user)) + return User.create(self.client, r.json()) + def users_me_get(self): return User.create(self.client, self.http(Routes.USERS_ME_GET).json())