diff options
author | Brion Vibber <brion@pobox.com> | 2010-09-21 23:19:36 -0700 |
---|---|---|
committer | Brion Vibber <brion@pobox.com> | 2010-09-28 07:44:22 -0700 |
commit | e6e8a16f1c22294770a653047f50aa0a126395c6 (patch) | |
tree | d0590995d748d4fd8bfa5a731421a8736de30599 /plugins/YammerImport/sn_yammerclient.php | |
parent | 6bc3f5aacbdefcd2bb2d46998bc439903ffa3a1d (diff) |
Fixes for Yammer groups import: pulling explicit list, fixed avatar fetch
Diffstat (limited to 'plugins/YammerImport/sn_yammerclient.php')
-rw-r--r-- | plugins/YammerImport/sn_yammerclient.php | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/plugins/YammerImport/sn_yammerclient.php b/plugins/YammerImport/sn_yammerclient.php index 0f244ced6..8f9f1d413 100644 --- a/plugins/YammerImport/sn_yammerclient.php +++ b/plugins/YammerImport/sn_yammerclient.php @@ -100,7 +100,7 @@ class SN_YammerClient * * @throws Exception for HTTP error or bad JSON return */ - protected function api($method, $params=array()) + public function api($method, $params=array()) { $body = $this->fetchApi("api/v1/$method.json", $params); $data = json_decode($body, true); @@ -217,4 +217,20 @@ class SN_YammerClient { return $this->api('users', $params); } + + /** + * High-level API hit: fetch all groups in the network (up to 20 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 groups($params=array()) + { + return $this->api('groups', $params); + } } |