A General purpose REST Api Client written in C# language for the OneSignal API v3 that support Async
PM> Install-Package OneSignal.RestAPIv3.Client
OneSignal.RestApiv3.Client package targets both .NET standard 2.0 and .NET Framework 4.5.2.
var client = new OneSignalClient(""); // Use your Api Key
var options = new NotificationCreateOptions
{
AppId = new Guid(""), // Use your AppId
IncludePlayerIds = new List<string>()
{
"00000000-0000-0000-0000-000000000000" // Use your playerId
}
};
options.Headings.Add(LanguageCodes.English, "New Notification!");
options.Contents.Add(LanguageCodes.English, "This will push a real notification directly to your device.");
client.Notifications.Create(options);
OneSignal Server API Documentation
For additional support for .Net Core 1 or additionnal .Net framework platforms, feel free to fork this repository and submit a merge request!! :)
This is a fork of mundipagg OneSignal-CSharp-SDK repository.