PHP Class OneSignal\Notifications

Exibir arquivo Open project: norkunas/onesignal-php-api

Protected Properties

Property Type Description
$api

Public Methods

Method Description
__construct ( OneSignal $api )
add ( array $data ) : array Send new notification with provided data.
cancel ( string $id ) : array Cancel notification.
getAll ( integer $limit = self::NOTIFICATIONS_LIMIT, integer $offset ) : array Get information about all notifications.
getOne ( string $id ) : array Get information about notification with provided ID.
open ( string $id ) : array Open notification.

Protected Methods

Method Description
resolve ( array $data )

Method Details

__construct() public method

public __construct ( OneSignal $api )
$api OneSignal

add() public method

Application authentication key and ID must be set.
public add ( array $data ) : array
$data array
return array

cancel() public method

Application authentication key and ID must be set.
public cancel ( string $id ) : array
$id string Notification ID
return array

getAll() public method

Application authentication key and ID must be set.
public getAll ( integer $limit = self::NOTIFICATIONS_LIMIT, integer $offset ) : array
$limit integer How many notifications to return (max 50)
$offset integer Results offset (results are sorted by ID)
return array

getOne() public method

Application authentication key and ID must be set.
public getOne ( string $id ) : array
$id string Notification ID
return array

open() public method

Application authentication key and ID must be set.
public open ( string $id ) : array
$id string Notification ID
return array

resolve() protected method

protected resolve ( array $data )
$data array

Property Details

$api protected_oe property

protected $api