Skip to content

Commit

Permalink
Add Pushbullet::push($iden) method
Browse files Browse the repository at this point in the history
  • Loading branch information
ivkos committed May 22, 2016
1 parent 375a7c8 commit 3de4a17
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions src/Pushbullet/Pushbullet.php
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,22 @@ public function getPushes($modifiedAfter = 0, $cursor = null, $limit = null)
return $objPushes;
}

/**
* Returns a Push object with the specified iden.
*
* @param string $iden Iden of push notification.
* @return Push Push notification object.
*
* @throws Exceptions\ConnectionException
* @throws Exceptions\NotFoundException If there's no push notification with the specified iden
*/
public function push($iden)
{
$response = Connection::sendCurlRequest(Connection::URL_PUSHES . '/' . $iden, 'GET', null, false, $this->apiKey);

return new Push($response, $this->apiKey);
}

/**
* Get a list of available devices.
*
Expand Down

0 comments on commit 3de4a17

Please sign in to comment.