diff options
author | Brion Vibber <brion@pobox.com> | 2010-09-21 18:15:32 -0700 |
---|---|---|
committer | Brion Vibber <brion@pobox.com> | 2010-09-28 07:44:22 -0700 |
commit | 1685c8a4fa0c5e2eab514b5eea23ddc963255cbb (patch) | |
tree | 1ce80838167dbf210e78c5308cb7773eca606b2d /plugins/YammerImport/sn_yammerclient.php | |
parent | 37c67c3f9ff7af942c3fa629724589e4de31f94e (diff) |
Fetch more user data in Yammer imports, including the primary email address (preconfirmed, so we can do stuff like tell people to reset their passwords and log in!) and some bio info.
Diffstat (limited to 'plugins/YammerImport/sn_yammerclient.php')
-rw-r--r-- | plugins/YammerImport/sn_yammerclient.php | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/plugins/YammerImport/sn_yammerclient.php b/plugins/YammerImport/sn_yammerclient.php index f7382abae..0f244ced6 100644 --- a/plugins/YammerImport/sn_yammerclient.php +++ b/plugins/YammerImport/sn_yammerclient.php @@ -185,8 +185,36 @@ class SN_YammerClient return $this->apiBase . '/oauth/authorize?oauth_token=' . urlencode($token); } + /** + * High-level API hit: fetch all messages in the network (up to 20 at a time). + * Return data is the full JSON array returned, including meta and references + * sections. + * + * The matching messages themselves will be in the 'messages' item within. + * + * @param array $options optional set of additional params for the request. + * @return array + * + * @throws Exception on low-level or HTTP error + */ public function messages($params=array()) { return $this->api('messages', $params); } + + /** + * High-level API hit: fetch all users in the network (up to 50 at a time). + * Return data is the full JSON array returned, listing user items. + * + * The matching messages themselves will be in the 'users' item within. + * + * @param array $options optional set of additional params for the request. + * @return array of JSON-sourced user data arrays + * + * @throws Exception on low-level or HTTP error + */ + public function users($params=array()) + { + return $this->api('users', $params); + } } |