10 defined(
'JPATH_PLATFORM') or die();
33 public function getEvent($event)
35 return $this->
get($event);
51 public function getFeed($event, $limit = 0, $offset = 0, $until = null, $since = null)
53 return $this->getConnection($event,
'feed',
'', $limit, $offset, $until, $since);
67 public function createLink($event, $link, $message = null)
71 $data[
'link'] = $link;
72 $data[
'message'] = $message;
74 return $this->createConnection($event,
'feed', $data);
86 public function deleteLink($link)
88 return $this->deleteConnection($link);
107 public function createPost($event, $message = null, $link = null, $picture = null, $name = null, $caption = null,
108 $description = null, $actions = null)
112 $data[
'message'] = $message;
113 $data[
'link'] = $link;
114 $data[
'name'] = $name;
115 $data[
'caption'] = $caption;
116 $data[
'description'] = $description;
117 $data[
'actions'] = $actions;
118 $data[
'picture'] = $picture;
120 return $this->createConnection($event,
'feed', $data);
133 public function deletePost($post)
135 return $this->deleteConnection($post);
148 public function createStatus($event, $message)
152 $data[
'message'] = $message;
154 return $this->createConnection($event,
'feed', $data);
167 public function deleteStatus($status)
169 return $this->deleteConnection($status);
183 public function getInvited($event, $limit = 0, $offset = 0)
185 return $this->getConnection($event,
'invited',
'', $limit, $offset);
198 public function isInvited($event, $user)
200 return $this->getConnection($event,
'invited/' . $user);
213 public function createInvite($event, $users)
217 $data[
'users'] = $users;
219 return $this->createConnection($event,
'invited', $data);
233 public function deleteInvite($event, $user)
235 return $this->deleteConnection($event,
'invited/' . $user);
249 public function getAttending($event, $limit = 0, $offset = 0)
251 return $this->getConnection($event,
'attending',
'', $limit, $offset);
264 public function isAttending($event, $user)
266 return $this->getConnection($event,
'attending/' . $user);
278 public function createAttending($event)
280 return $this->createConnection($event,
'attending');
294 public function getMaybe($event, $limit = 0, $offset = 0)
296 return $this->getConnection($event,
'maybe',
'', $limit, $offset);
309 public function isMaybe($event, $user)
311 return $this->getConnection($event,
'maybe/' . $user);
323 public function createMaybe($event)
325 return $this->createConnection($event,
'maybe');
339 public function getDeclined($event, $limit = 0, $offset = 0)
341 return $this->getConnection($event,
'declined',
'', $limit, $offset);
354 public function isDeclined($event, $user)
356 return $this->getConnection($event,
'declined/' . $user);
368 public function createDeclined($event)
370 return $this->createConnection($event,
'declined');
384 public function getNoreply($event, $limit = 0, $offset = 0)
386 return $this->getConnection($event,
'noreply',
'', $limit, $offset);
399 public function isNoreply($event, $user)
401 return $this->getConnection($event,
'noreply/' . $user);
415 public function getPicture($event, $redirect =
true, $type = null)
419 if ($redirect ==
false)
421 $extra_fields =
'?redirect=false';
426 $extra_fields .= (strpos($extra_fields,
'?') ===
false) ?
'?type=' . $type :
'&type=' . $type;
429 return $this->getConnection($event,
'picture', $extra_fields);
445 public function getPhotos($event, $limit = 0, $offset = 0, $until = null, $since = null)
447 return $this->getConnection($event,
'photos',
'', $limit, $offset, $until, $since);
461 public function createPhoto($event, $source, $message = null)
465 $data[basename($source)] =
'@' . realpath($source);
469 $data[
'message'] = $message;
472 return $this->createConnection($event,
'photos', $data, array(
'Content-Type' =>
'multipart/form-data'));
488 public function getVideos($event, $limit = 0, $offset = 0, $until = null, $since = null)
490 return $this->getConnection($event,
'videos',
'', $limit, $offset, $until, $since);
505 public function createVideo($event, $source, $title = null, $description = null)
509 $data[basename($source)] =
'@' . realpath($source);
513 $data[
'title'] = $title;
518 $data[
'description'] = $description;
521 return $this->createConnection($event,
'videos', $data, array(
'Content-Type' =>
'multipart/form-data'));