示例#1
0
 protected async Task GetPlayer()
 {
     UserProfile player = new UserProfile { IdentificationNumber = "5605d53f-9d13-4865-a23c-26dfd92d5c4a" };
     
     Push pushNotifier = new Push();
     Device result = await pushNotifier.GetDevice(player);
     string json = JsonUtil<Device>.ToJson(result);
     Console.WriteLine(json);
 }
示例#2
0
        protected async Task CreateNotification()
        {
            PushNotificationCreate push = new PushNotificationCreate();
            push.Headings = new Dictionary<string, string>();
            push.Headings.Add("en", "StationCAD - New Message");
            push.Contents = new Dictionary<string, string>();
            push.Contents.Add("en", "Server API Test Mesage");
            push.IncludeSegments = new List<string> { "All" };
            push.SendiOS = false;

            try
            {
                Push pushNotifier = new Push();
                string result = await pushNotifier.CreatNotification(push);
                Console.WriteLine(result);
            }
            catch (Exception ex)
            { Console.WriteLine(ex.ToString()); }
        }
示例#3
0
 protected async Task GetNotification()
 {
     Push pushNotifier = new Push();
     PushNotification result = await pushNotifier.GetNotification("bee2a35c-9f5d-425d-b4ff-6196e033efc0");
     string json = JsonUtil<PushNotification>.ToJson(result);
     Console.WriteLine(json);
 }
示例#4
0
 protected async Task GetNotifications()
 {
     Push pushNotifier = new Push();
     PushNotificationList result = await pushNotifier.GetNotifications();
     string json = JsonUtil<PushNotificationList>.ToJson(result);
     Console.WriteLine(json);
 }
示例#5
0
        protected async Task UpdatePlayer()
        {
            DeviceEdit device = new DeviceEdit();
            device.Id = "acc48677-5845-45b3-b9cc-e6544215f0c8";
            device.Tags = new Dictionary<string, string>();
            device.Tags.Add("OrgID", "CCPASTA47");

            try
            {
                Push pushNotifier = new Push();
                string result = await pushNotifier.UpdateDevice(device);
                Console.WriteLine(result);
            }
            catch (Exception ex)
            { Console.WriteLine(ex.ToString()); }
        }
示例#6
0
 protected async Task GetPlayers()
 {
     Push pushNotifier = new Push();
     DeviceList result = await pushNotifier.GetDevices();
     string json = JsonUtil<DeviceList>.ToJson(result);
     Console.WriteLine(json);
 }