+ /**
+ * Create a group on this site.
+ *
+ * @param string $nickname
+ * @param array $options
+ * @return string: profile URL for the group
+ */
+ function createGroup($nickname, $options=array()) {
+ $this->log("Creating group as %s on %s: %s",
+ $this->username,
+ $this->basepath,
+ $nickname);
+
+ $data = $this->api('statusnet/groups/create', 'json',
+ array_merge(array('nickname' => $nickname), $options));
+ $url = $data['url'];
+
+ if ($url) {
+ $this->log(' created as %s', $url);
+ } else {
+ $this->log(' failed? %s', var_export($data, true));
+ }
+ return $url;
+ }
+
+ function groupInfo($nickname) {
+ $data = $this->api('statusnet/groups/show', 'json', array(
+ 'id' => $nickname
+ ));
+ }
+
+ /**
+ * Join a group.
+ *
+ * @param string $group nickname or URL
+ */
+ function joinGroup($group) {
+ $this->post('join ' . $group);
+ }
+
+ /**
+ * Leave a group.
+ *
+ * @param string $group nickname or URL
+ */
+ function leaveGroup($group) {
+ $this->post('drop ' . $group);
+ }
+
+ /**
+ *
+ * @param string $nickname
+ * @return
+ */
+ function inGroup($nickname) {
+ // @todo
+ }