Esempio n. 1
0
        /// <summary>
        /// Update an existing device in one of your OneSignal apps
        /// </summary>
        /// <param name="deviceId">The id of the device you want to edit</param>
        /// <param name="options">Parameters for editing the device</param>
        /// <returns>The status and id of the edited device</returns>
        public async Task <GenericResponse> EditDeviceAsync(string deviceId, CreateUpdateDeviceOptions options)
        {
            var response = await PutAsync <GenericResponse>($"players/{deviceId}", options);

            response.Id = deviceId;
            return(response);
        }
Esempio n. 2
0
        /// <summary>
        /// Update an existing device in one of your OneSignal apps
        /// </summary>
        /// <param name="deviceId">The id of the device you want to edit</param>
        /// <param name="options">Parameters for editing the device</param>
        /// <returns>The status and id of the edited device</returns>
        public GenericResponse EditDevice(string deviceId, CreateUpdateDeviceOptions options)
        {
            var response = Put <GenericResponse>($"players/{deviceId}", options);

            response.Id = deviceId;
            return(response);
        }
Esempio n. 3
0
 /// <summary>
 /// Register a new device to one of your OneSignal apps
 /// </summary>
 /// <param name="options">Parameters for adding a device</param>
 /// <returns>The status and id of the new device</returns>
 public async Task <GenericResponse> AddDeviceAsync(CreateUpdateDeviceOptions options)
 {
     return(await PostAsync <GenericResponse>("players", options));
 }
Esempio n. 4
0
 /// <summary>
 /// Register a new device to one of your OneSignal apps
 /// </summary>
 /// <param name="options">Parameters for adding a device</param>
 /// <returns>The status and id of the new device</returns>
 public GenericResponse AddDevice(CreateUpdateDeviceOptions options)
 {
     return(Post <GenericResponse>("players", options));
 }