Methods summary
public
|
#
__construct( NNV\OneSignal\OneSignal $oneSignal, string $appIDKey = null, string $restAPIKey = null )
Parameters
- $oneSignal
- OneSignal instance
- $appIDKey
- Application ID
- $restAPIKey
- API Key for REST JSON API
|
public
NNV\OneSignal\OneSignal::execute()
|
#
all( $limit = 10, $offset = 0 )
Get all devices in application
Get all devices in application
Returns
Var
int How many devices to return
int Result offset. Result are sorted by id
|
public
NNV\OneSignal\OneSignal::execute()
|
#
get( string $playerID )
View a device by Player id
View a device by Player id
Parameters
Returns
|
public
NNV\OneSignal\OneSignal::execute()
|
#
create( string $deviceType, array $playerData )
Create new device (Player)
Create new device (Player)
Parameters
- $deviceType
- Device type. See more on \NNV\OneSignal\Constants\DeviceTypes
- $playerData
- Device details
Returns
|
public
NNV\OneSignal\OneSignal::execute()
|
#
update( string $playerID, array $playerData )
Edit an existing device in OneSignal.
Edit an existing device in OneSignal.
Parameters
- $playerID
- Player ID to update
- $playerData
- Player data to update
Returns
|
public
NNV\OneSignal\OneSignal::execute()
|
#
onSession( string $playerID, array $sessionData )
Update a device's session information
Update a device's session information
Parameters
- $playerID
- PlayerID
- $sessionData
- New application session
Returns
|
public
NNV\OneSignal\OneSignal::execute()
|
#
onPurchase( string $playerID, array $purchaseData, boolean $isExisting = null )
Track a new purchase in your app
Track a new purchase in your app
Parameters
- $playerID
- Player (device) ID
- $purchaseData
- Purcharse data
- $isExisting
- Tracking the same purchases more than once if the user re-installs your app
Returns
|
public
NNV\OneSignal\OneSignal::execute()
|
#
onFocus( string $playerID, array $focusData )
Update a device's session length upon app resuming
Update a device's session length upon app resuming
Parameters
- $playerID
- Player (device) ID
- $focusData
- Focus data
Returns
|
public
object
|
#
csvExport( array $extraFields = [] )
Generate a compressed CSV export of all of your current user data
Generate a compressed CSV export of all of your current user data
Parameters
- $extraFields
- Additional fields that you wish to include. Currently supports location, country, and rooted
Returns
object Object contain path to download csv gzip file
|