Wilddog.SMS
1.0.2
dotnet add package Wilddog.SMS --version 1.0.2
NuGet\Install-Package Wilddog.SMS -Version 1.0.2
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="Wilddog.SMS" Version="1.0.2" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Wilddog.SMS --version 1.0.2
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: Wilddog.SMS, 1.0.2"
#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 Wilddog.SMS as a Cake Addin
#addin nuget:?package=Wilddog.SMS&version=1.0.2
// Install Wilddog.SMS as a Cake Tool
#tool nuget:?package=Wilddog.SMS&version=1.0.2
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
wilddog-sms
Wilddog SMS SDK for .Net platform
Getting started
环境依赖:
- .net > 4.6.0
- Newtonsoft.Json >= 10.0.3
安装:
PM> Install-Package Wilddog.SMS
OR
Visual Studio中通过nuget搜索Wilddog.SMS
初始化
using Wilddog.Sms;
using Wilddog.Sms.Http;
Client client = new Client("YOUR_APP_ID", "YOUR_SMS_KEY");
发送验证码短信
使用野狗生成验证码
SubmitResponse submitRsps = client.SendCode("PHONE_NUMBER", "TEMPLATE_ID");
if (submitRsps.Success)
{
Console.WriteLine(submitRsps.ToString());
}
else
{
Console.WriteLine(submitRsps.WilddogError.ToString());
}
使用自生成验证码
IList Params = new ArrayList();
Params.Add("123456");
SubmitResponse submitRsps = client.SendCode("PHONE_NUMBER", "TEMPLATE_ID", Params);
if (submitRsps.Success)
{
Console.WriteLine(submitRsps.ToString());
}
else
{
Console.WriteLine(submitRsps.WilddogError.ToString());
}
校验验证码
CheckCodeResponse checkCodeRsps = client.CheckCode("PHONE_NUMBER", code);
if (checkCodeRsps.Success)
{
Console.WriteLine(checkCodeRsps.ToString());
}
else
{
Console.WriteLine(checkCodeRsps.WilddogError.ToString());
}
发送通知短信
IList Params = new ArrayList();
Params.Add("PARAM1");
IList mobiles = new ArrayList();
mobiles.Add("PHONE_NUMBER");
SubmitResponse submitRsps = client.SendNotify(mobiles, "TEMPLATE_ID", Params);
if (submitRsps.Success)
{
Console.WriteLine(submitRsps.ToString());
}
else
{
Console.WriteLine(submitRsps.WilddogError.ToString());
}
查询发送状态
V1
StatusResponse statusRsps = client.QueryStatus(rrid);
if (statusRsps.Success)
{
Console.WriteLine(statusRsps.ToString());
}
else
{
Console.WriteLine(statusRsps.WilddogError.ToString());
}
V2
StatusResponse statusRsps = client.QueryStatus();
if (statusRsps.Success)
{
Console.WriteLine(statusRsps.ToString());
}
else
{
Console.WriteLine(statusRsps.WilddogError.ToString());
}
查询账户余额
BalanceResponse balanceResp = client.QueryBalance();
if (balanceResp.Success)
{
Console.WriteLine(balanceResp.ToString());
}
else
{
Console.WriteLine(balanceResp.WilddogError.ToString());
}
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET Framework | net46 is compatible. net461 was computed. net462 was computed. net463 was computed. net47 was computed. net471 was computed. net472 was computed. net48 was computed. net481 was computed. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
-
.NETFramework 4.6
- Newtonsoft.Json (>= 10.0.3)
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.0.2 | 1,092 | 12/1/2017 |