var client = new CodeMashClient(apiKey, projectId);
var pushService = new CodeMashPushService(client);
var response = await pushService.UpdateDeviceUserRequest(
new UpdateDeviceUserRequest
{
Id = "{DEVICE_ID}",
UserId = Guid.Parse("{USER_ID}"),
}
);
class CodemashService
{
protected CodemashPushNotification $codemashPushNotification;
public function __construct()
{
$secretKey = '{YOUR_SECRET_KEY}';
$projectId = '{YOUR_PROJECT_ID}';
$client = new CodemashClient($secretKey, $projectId);
$codemashPushNotification = new CodemashPushNotification($client);
}
public function updateDeviceUser()
{
$responseData = $this->codemashPushNotification->updateDeviceUser([
'id' => '{DEVICE_ID}',
'userId' => '{USER_ID}',
]);
}
}
Name
Type
Description
Name
Type
Description
Name
Type
Description
Name
Type
Description
Name
Type
Description
Name
Type
Description
Name
Type
Description
Name
Type
Description
Name
Type
Description
Name
Type
Description
Name
Type
Description
Name
Type
Description
Name
Type
Description
Name
Type
Description
Name
Type
Description
Name
Type
Description
Name
Type
Description
Name
Type
Description
Name
Type
Description
Name
Type
Description
version
string
The version of the API endpoint. Current latest v1.
Authorization
string
Your project's secret key.
x-cm-projectid
string
Your project's ID. Can be passed as a query parameter.
userId
string
The ID of a user.
timeZone
string
The timezone of a device in a tz database format.
meta
object
Key-value pair (string: string) object for custom data.
version
string
The version of the API endpoint. Current latest v1.
Authorization
string
Your project's secret key.
x-cm-projectid
string
Your project's ID. Can be passed as a query parameter.
token
string
Token of a device provided by the Expo.
deviceId
string
The ID of a device. If not provided, a new device will be added.
userId
string
The ID of a user.
timeZone
string
The timezone of a device in a tz database format.
meta
object
Key-value pair (string: string) object for custom data.
version
string
The version of the API endpoint. Current latest v1.
id
string
The ID of a device to get.
Authorization
string
Your project's secret key.
x-cm-projectid
string
Your project's ID. Can be passed as a query parameter.
version
string
The version of the API endpoint. Current latest v1.
Authorization
string
Your project's secret key.
x-cm-projectid
string
Your project's ID. Can be passed as a query parameter.
version
string
The version of the API endpoint. Current latest v1.
id
string
The ID of a device to delete.
Authorization
string
Your project's secret key.
x-cm-projectid
string
Your project's ID. Can be passed as a query parameter.
version
string
The version of the API endpoint. Current latest v1.
id
string
The ID of a device.
Authorization
string
Your project's secret key.
x-cm-projectid
string
Your project's ID. Can be passed as a query parameter.
version
string
The version of the API endpoint. Current latest v1.
id
string
The ID of a device to update.
Authorization
string
Your project's secret key.
x-cm-projectid
string
Your project's ID. Can be passed as a query parameter.
meta
string
Key-value pair (string: string) object of custom data.
version
string
The version of the API endpoint. Current latest v1.
id
string
The ID of a device to update.
Authorization
string
Your project's secret key.
x-cm-projectid
string
Your project's ID. Can be passed as a query parameter.
timezone
string
The timezone of a device in a tz database format.
version
string
The version of the API endpoint. Current latest v1.
id
string
The ID of a device to update.
Authorization
string
Your project's secret key.
x-cm-projectid
string
Your project's ID. Can be passed as a query parameter.