Skip to content

Commit b2e36d5

Browse files
author
Helperhaps
committed
release 1.2.3
1 parent b9d77ee commit b2e36d5

File tree

3 files changed

+47
-3
lines changed

3 files changed

+47
-3
lines changed

Jiguang.JPush/Jiguang.JPush.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
<Copyright>MIT</Copyright>
1313
<PackageLicenseUrl></PackageLicenseUrl>
1414
<PackageProjectUrl>https://github.com/jpush/jpush-api-csharp-client</PackageProjectUrl>
15-
<Version>1.2.2</Version>
15+
<Version>1.2.3</Version>
1616
</PropertyGroup>
1717

1818
<PropertyGroup Condition="'$(Configuration)|$(TargetFramework)|$(Platform)'=='Debug|netstandard1.1|AnyCPU'">

Jiguang.JPush/Model/Notification.cs

Lines changed: 20 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,13 @@ public class Android
5151
public Dictionary<string, object> Inbox { get; set; }
5252

5353
[JsonProperty("big_pic_path", NullValueHandling = NullValueHandling.Ignore)]
54-
public string BigPicturePath { get; set; }
54+
public string BigPicturePath { get; set; }
55+
56+
[JsonProperty("large_icon", NullValueHandling = NullValueHandling.Ignore)]
57+
public string LargeIcon { get; set; }
58+
59+
[JsonProperty("intent", NullValueHandling = NullValueHandling.Ignore)]
60+
public Dictionary<string, object> Indent { get; set; }
5561

5662
[JsonProperty("extras", NullValueHandling = NullValueHandling.Ignore)]
5763
public Dictionary<string, object> Extras { get; set; }
@@ -60,7 +66,19 @@ public class Android
6066
/// (VIP only)指定开发者想要打开的 Activity,值为 <activity> 节点的 "android:name" 属性值。
6167
/// </summary>
6268
[JsonProperty("uri_activity", NullValueHandling = NullValueHandling.Ignore)]
63-
public string URIActivity { get; set; }
69+
public string URIActivity { get; set; }
70+
71+
/// <summary>
72+
/// (VIP only)指定打开 Activity 的方式,值为 Intent.java 中预定义的 "access flags" 的取值范围。
73+
/// </summary>
74+
[JsonProperty("uri_flag", NullValueHandling = NullValueHandling.Ignore)]
75+
public string URIFlag { get; set; }
76+
77+
/// <summary>
78+
/// (VIP only)指定开发者想要打开的 Activity,值为 <activity> -> <intent-filter> -> <action> 节点中的 "android:name" 属性值。
79+
/// </summary>
80+
[JsonProperty("uri_action", NullValueHandling = NullValueHandling.Ignore)]
81+
public string URIAction { get; set; }
6482
}
6583

6684
public class IOS

Jiguang.JPush/ScheduleClient.cs

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -188,6 +188,32 @@ public HttpResponse GetScheduleTask(string scheduleId)
188188
return task.Result;
189189
}
190190

191+
192+
/// <summary>
193+
/// <see cref="GetScheduleTaskMsgId(string)"/>
194+
/// </summary>
195+
public async Task<HttpResponse> GetScheduleTaskMsgIdAsync(string scheduleId)
196+
{
197+
if (string.IsNullOrEmpty(scheduleId))
198+
throw new ArgumentNullException(nameof(scheduleId));
199+
200+
var url = BASE_URL + $"/{scheduleId}/msg_ids";
201+
HttpResponseMessage msg = await JPushClient.HttpClient.GetAsync(url).ConfigureAwait(false);
202+
string responseContent = await msg.Content.ReadAsStringAsync().ConfigureAwait(false);
203+
return new HttpResponse(msg.StatusCode, msg.Headers, responseContent);
204+
}
205+
206+
/// <summary>
207+
/// 获取定时任务对应的所有 msg_id。
208+
/// </summary>
209+
/// <param name="scheduleId">定时任务 ID。在创建定时任务时会返回。</param>
210+
public HttpResponse GetScheduleTaskMsgId(string scheduleId)
211+
{
212+
Task<HttpResponse> task = Task.Run(() => GetScheduleTaskMsgIdAsync(scheduleId));
213+
task.Wait();
214+
return task.Result;
215+
}
216+
191217
public async Task<HttpResponse> UpdateScheduleTaskAsync(string scheduleId, string json)
192218
{
193219
if (string.IsNullOrEmpty(scheduleId))

0 commit comments

Comments
 (0)