Skip to content

Commit e51c825

Browse files
authored
Merge pull request #40 from jpush/feature/20211208_addCallBackAndNotification3rd
Feature/20211208 add call back and notification3rd
2 parents 5b545c0 + 49dfee2 commit e51c825

File tree

3 files changed

+68
-0
lines changed

3 files changed

+68
-0
lines changed

Jiguang.JPush/Model/CallBack.cs

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
using Newtonsoft.Json;
2+
using System.Collections.Generic;
3+
4+
namespace Jiguang.JPush.Model
5+
{
6+
/// <summary>
7+
/// <see cref="https://docs.jiguang.cn/jpush/server/push/rest_api_v3_push/#callback"/>
8+
/// </summary>
9+
public class CallBack
10+
{
11+
[JsonProperty("url", NullValueHandling = NullValueHandling.Ignore)]
12+
public string Url { get; set; }
13+
14+
[JsonProperty("params", NullValueHandling = NullValueHandling.Ignore)]
15+
public Dictionary<string, object> Params { get; set; }
16+
17+
[JsonProperty("type", NullValueHandling = NullValueHandling.Ignore)]
18+
public int Type { get; set; }
19+
}
20+
}
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
using Newtonsoft.Json;
2+
using System.Collections.Generic;
3+
4+
namespace Jiguang.JPush.Model
5+
{
6+
/// <summary>
7+
/// <see cref="https://docs.jiguang.cn/jpush/server/push/rest_api_v3_push/#notification_3rd"/>
8+
/// </summary>
9+
public class Notification3rd
10+
{
11+
[JsonProperty("title", NullValueHandling = NullValueHandling.Ignore)]
12+
public string Url { get; set; }
13+
14+
/// <summary>
15+
/// 必填。
16+
/// </summary>
17+
[JsonProperty("content", NullValueHandling = NullValueHandling.Ignore)]
18+
public string Content { get; set; }
19+
20+
[JsonProperty("channel_id", NullValueHandling = NullValueHandling.Ignore)]
21+
public string ChannelId { get; set; }
22+
23+
[JsonProperty("uri_activity", NullValueHandling = NullValueHandling.Ignore)]
24+
public string UriActivity { get; set; }
25+
26+
[JsonProperty("uri_action", NullValueHandling = NullValueHandling.Ignore)]
27+
public string UriAction { get; set; }
28+
29+
[JsonProperty("badge_add_num", NullValueHandling = NullValueHandling.Ignore)]
30+
public string BadgeAddNum { get; set; }
31+
32+
[JsonProperty("badge_class", NullValueHandling = NullValueHandling.Ignore)]
33+
public string BadgeClass { get; set; }
34+
35+
[JsonProperty("sound", NullValueHandling = NullValueHandling.Ignore)]
36+
public string Sound { get; set; }
37+
38+
[JsonProperty("extras", NullValueHandling = NullValueHandling.Ignore)]
39+
public Dictionary<string, object> Extras { get; set; }
40+
}
41+
}

Jiguang.JPush/Model/PushPayload.cs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,13 @@ public class PushPayload
1111
/// <summary>
1212
/// 推送平台。可以为 "android" / "ios" / "all"。
1313
/// </summary>
14+
15+
[JsonProperty("callback", NullValueHandling = NullValueHandling.Ignore)]
16+
public CallBack CallBack { get; set; }
17+
18+
[JsonProperty("notification_3rd", NullValueHandling = NullValueHandling.Ignore)]
19+
public Notification3rd Notification3rd { get; set; }
20+
1421
[JsonProperty("platform", DefaultValueHandling = DefaultValueHandling.Include)]
1522
public object Platform { get; set; } = "all";
1623

0 commit comments

Comments
 (0)