-
Notifications
You must be signed in to change notification settings - Fork 7
/
FcmSharpClient.cs
31 lines (30 loc) · 939 Bytes
/
FcmSharpClient.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
using Newtonsoft.Json.Linq;
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Net;
using System.Text;
using System.Threading.Tasks;
using System.Web.Script.Serialization;
namespace FCMSharp
{
public class FcmSharpClient : IFcmSharpClient
{
private IFcmUtility _fcmUtility;
public FcmSharpClient(string appId,string senderID)
{
_fcmUtility = new FcmUtility(appId, senderID);
}
public async Task<FcmResponse> SendNotificationAsync(NotificationConfig config)
{
var response = await _fcmUtility.SendNotificationAsync(config);
return response;
}
public async Task<List<FcmResponse>> SendBatchNotificationsAsync(List<NotificationConfig> configs)
{
var response = await _fcmUtility.SendBatchNotificationsAsync(configs);
return response;
}
}
}