XgPush.SDK.Server
1.3.0.1
.NET Standard 1.3
This package targets .NET Standard 1.3. The package is compatible with this framework or higher.
.NET Framework 4.0
This package targets .NET Framework 4.0. The package is compatible with this framework or higher.
dotnet add package XgPush.SDK.Server --version 1.3.0.1
NuGet\Install-Package XgPush.SDK.Server -Version 1.3.0.1
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="XgPush.SDK.Server" Version="1.3.0.1" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add XgPush.SDK.Server --version 1.3.0.1
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: XgPush.SDK.Server, 1.3.0.1"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install XgPush.SDK.Server as a Cake Addin #addin nuget:?package=XgPush.SDK.Server&version=1.3.0.1 // Install XgPush.SDK.Server as a Cake Tool #tool nuget:?package=XgPush.SDK.Server&version=1.3.0.1
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
XgPush.SDK.Server
XgPush Server SDK third party (unofficial)
快速开始
- Package Manager
Install-Package XgPush.SDK.Server
- .NET CLI
dotnet add package XgPush.SDK.Server
初始化SDK
AspNetCore 1.x/2.x
public static void Main(string[] args){
+ XgPush.SDK.Server.XingePushClient.InitHttpClientCompatDefaultMagic();
}
AspNet
protected void Application_Start(){
+ XgPush.SDK.Server.XingePushClient.InitHttpClientCompatDefaultMagic();
}
支持的目标框架
- .NET Standard 1.3
- .NET Standard 2.0
- .NET Framework 4.0
- .NET Framework 4.5
示例
- Push API v3
- 全量推送
- 标签推送
- 单设备推送
- 设备列表推送
- 单账号推送
- 账号列表推送
- Rest API v2
- 全量推送
- 群推送
- 单推
- 查询消息状态
- 取消推送
- 批量新增标签
- 批量删除标签
- 查询全部标签
- 查询单个指定设备的标签
- 查询单个指定标签的Token总数
- 查询单个账号关联的设备
- 删除单个账号关联的单个设备Token
- 删除单个账号关联的全部设备Token
- 查询应用覆盖的设备Token总数
- 查询指定设备Token的注册状态
Push API v3
全量推送
var msg_android = new Message
{
Title = "your title",
Content = "your content",
};
var req_push_all = new PushRequest<Message>.All
{
Message = msg_android,
};
var rsp_push_all = await pushClient.v3.Push(req_push_all);
标签推送
var tags = new[] { "tag1", "tag2", "tag3" };
var req_push_tag = new PushRequest<Message>.Tag
{
Message = msg_android,
Value = new TagList(tags)
{
Operators = Operator.OR // Operator.AND
},
};
var rsp_push_tag = await pushClient.v3.Push(req_push_tag);
单设备推送
var req_push_token = new PushRequest<Message>.Token
{
Message = msg_android,
Value = "token1",
};
var rsp_push_token = await pushClient.v3.Push(req_push_token);
设备列表推送
var tokens = new[] { "token1", "token2", "token3" };
var req_push_tokens = new PushRequest<Message>.TokenList
{
Message = msg_android,
Values = tokens,
};
var rsp_push_tokens = await pushClient.v3.Push(req_push_tokens);
单账号推送
var req_push_account = new PushRequest<Message>.Account
{
Message = msg_android,
Value = "account1",
Type = 0, // 往单个账号的最新的device上推送信息
// AccountType = AccountType.PhoneNumber, // 账号类型(可选)
};
var rsp_push_account = await pushClient.v3.Push(req_push_account);
账号列表推送
var accounts = new[] { "account1", "account2", "account3" };
var req_push_accounts = new PushRequest<Message>.AccountList
{
Message = msg_android,
Values = accounts,
//PushId = "123",
};
var rsp_push_accounts = await pushClient.v3.Push(req_push_accounts);
Rest API v2
查询消息状态
var pushIds = new[] { "push_id_1", "push_id_2" };
var req_query_push_status = await pushClient.QueryPushStatus(pushIds);
取消推送
var req_cancel_push = await pushClient.CancelTimingPush("push_id_1");
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net5.0 was computed. net5.0-windows was computed. net6.0 was computed. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. |
.NET Core | netcoreapp1.0 was computed. netcoreapp1.1 was computed. netcoreapp2.0 was computed. netcoreapp2.1 was computed. netcoreapp2.2 was computed. netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
.NET Standard | netstandard1.3 is compatible. netstandard1.4 was computed. netstandard1.5 was computed. netstandard1.6 was computed. netstandard2.0 is compatible. netstandard2.1 was computed. |
.NET Framework | net40 is compatible. net403 was computed. net45 is compatible. net451 was computed. net452 was computed. net46 was computed. net461 was computed. net462 was computed. net463 was computed. net47 was computed. net471 was computed. net472 was computed. net48 was computed. net481 was computed. |
MonoAndroid | monoandroid was computed. |
MonoMac | monomac was computed. |
MonoTouch | monotouch was computed. |
Tizen | tizen30 was computed. tizen40 was computed. tizen60 was computed. |
Universal Windows Platform | uap was computed. uap10.0 was computed. |
Xamarin.iOS | xamarinios was computed. |
Xamarin.Mac | xamarinmac was computed. |
Xamarin.TVOS | xamarintvos was computed. |
Xamarin.WatchOS | xamarinwatchos was computed. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
-
.NETFramework 4.0
- Microsoft.Bcl.Async (>= 1.0.168)
- Microsoft.Net.Http (>= 2.2.29)
- Newtonsoft.Json (>= 12.0.1)
-
.NETFramework 4.5
- Newtonsoft.Json (>= 12.0.1)
-
.NETStandard 1.3
- NETStandard.Library (>= 1.6.1)
- Newtonsoft.Json (>= 12.0.1)
- System.Net.Requests (>= 4.3.0)
- System.Reflection.TypeExtensions (>= 4.5.1)
-
.NETStandard 2.0
- Newtonsoft.Json (>= 12.0.1)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
Version | Downloads | Last updated |
---|---|---|
1.3.0.1 | 1,304 | 2/14/2019 |