Msh.ParsGreen.HttpService.Core.Api
1.0.0
dotnet add package Msh.ParsGreen.HttpService.Core.Api --version 1.0.0
NuGet\Install-Package Msh.ParsGreen.HttpService.Core.Api -Version 1.0.0
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="Msh.ParsGreen.HttpService.Core.Api" Version="1.0.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Msh.ParsGreen.HttpService.Core.Api --version 1.0.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: Msh.ParsGreen.HttpService.Core.Api, 1.0.0"
#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 Msh.ParsGreen.HttpService.Core.Api as a Cake Addin
#addin nuget:?package=Msh.ParsGreen.HttpService.Core.Api&version=1.0.0
// Install Msh.ParsGreen.HttpService.Core.Api as a Cake Tool
#tool nuget:?package=Msh.ParsGreen.HttpService.Core.Api&version=1.0.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
Msh.ParsGreen.Sms
A tiny library based on ParsGreen RestAPI to send SMS for .NET core web application.
Project on Github
Installation
Install via nuget
:
Install-Package Msh.ParsGreen.HttpService.Core.Api -Version 1.0.0
Usage
- Application
startup.cs
public void ConfigureServices(IServiceCollection services)
{
...
services.Configure<ParsGreenConfiguration>(opt => Configuration.GetSection("SmsConfig").Bind(opt));
services.AddParsGreen();
...
}
- Application settings
appsettings.json
"SmsConfig": {
"Token": "enter your token here",
"MaxLenght": 60,
"MciCoefficent": 44,
"IrancellCoefficent": 55,
"RightelCoefficent": 55,
"DefaultNumber": "enter your default number"
}
- Controller
yourController.cs
private readonly ISmsProvider _smsProvider;
public HomeController(ISmsProvider smsProvider)
{
_smsProvider = smsProvider;
}
public async Task<IActionResult> SendSms()
{
var t = await _smsProvider.InvokeSendSmsAsync(new SendSmsModel
{
Body = "My API",
ToNumber = "09017206191"
});
if (t.Succeeded)
{
//todo: some database jobs...
return View(t.Result)
};
return BadRequest(t.Errors);
}
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 | netcoreapp2.2 is compatible. netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
-
.NETCoreApp 2.2
- Microsoft.Extensions.DependencyInjection.Abstractions (>= 2.2.0)
- Microsoft.Extensions.Options (>= 2.2.0)
- Newtonsoft.Json (>= 12.0.2)
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.0 | 518 | 9/3/2019 |