예제 #1
0
 /// <summary>
 /// Updates the name or configuration settings of an existing OneSignal app
 /// </summary>
 /// <param name="options">Parameters for updating the current app</param>
 /// <param name="appId">Optional app id if you want an app id different than what is defined in OneSignalConfiguration</param>
 /// <returns>Details of the updated app</returns>
 public AppResponse UpdateApp(CreateUpdateAppOptions options, string appId = null)
 {
     return(Put <AppResponse>($"apps/{appId ?? OneSignalConfiguration.GetAppId()}", options));
 }
예제 #2
0
 /// <summary>
 /// Creates a new OneSignal app. If you plan on making requests to the app after created be sure to call OneSignalConfiguration.SetAppId(newApp.Id)
 /// </summary>
 /// <param name="options">Parameters for creating a new app</param>
 /// <returns>Details of the newly created app</returns>
 public AppResponse CreateApp(CreateUpdateAppOptions options)
 {
     return(Post <AppResponse>("apps", options));
 }
예제 #3
0
 /// <summary>
 /// Updates the name or configuration settings of an existing OneSignal app
 /// </summary>
 /// <param name="options">Parameters for updating the current app</param>
 /// <param name="appId">Optional app id if you want an app id different than what is defined in OneSignalConfiguration</param>
 /// <returns>Details of the updated app</returns>
 public async Task <AppResponse> UpdateAppAsync(CreateUpdateAppOptions options, string appId = null)
 {
     return(await PutAsync <AppResponse>($"apps/{appId ?? OneSignalConfiguration.GetAppId()}", options));
 }
예제 #4
0
 /// <summary>
 /// Creates a new OneSignal app. If you plan on making requests to the app after created be sure to call OneSignalConfiguration.SetAppId(newApp.Id)
 /// </summary>
 /// <param name="options">Parameters for creating a new app</param>
 /// <returns>Details of the newly created app</returns>
 public async Task <AppResponse> CreateAppAsync(CreateUpdateAppOptions options)
 {
     return(await PostAsync <AppResponse>("apps", options));
 }