Hot.Web.Api.Sdk
0.1.3.1
dotnet add package Hot.Web.Api.Sdk --version 0.1.3.1
NuGet\Install-Package Hot.Web.Api.Sdk -Version 0.1.3.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="Hot.Web.Api.Sdk" Version="0.1.3.1" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Hot.Web.Api.Sdk --version 0.1.3.1
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: Hot.Web.Api.Sdk, 0.1.3.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 Hot.Web.Api.Sdk as a Cake Addin #addin nuget:?package=Hot.Web.Api.Sdk&version=0.1.3.1 // Install Hot.Web.Api.Sdk as a Cake Tool #tool nuget:?package=Hot.Web.Api.Sdk&version=0.1.3.1
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
Hot Recharge API SDK
Version 3 API
Hot Recharge is a Zimbabwean recharge platform for all networks and various utility services. The package allows for users to easily add the version 3.0 API to your c# applications.
Usage - With FactoryClient
- Add Package to Project
- Create client with credentials
IHotAPIClient client = HotApiClientFactory.Create("{username}", "{password}");
Usage - As Injected Service
- Add Package to project
- Register the SDK in service for DI
var Configuration = new ConfigurationBuilder()
.SetBasePath(Directory.GetParent(AppContext.BaseDirectory)?.FullName ?? "")
.AddJsonFile("appsettings.json", false)
.AddUserSecrets(Assembly.GetExecutingAssembly())
.AddEnvironmentVariables()
.Build();
var host = Host.CreateDefaultBuilder(args)
.ConfigureServices(services => {
services.AddHotApiSdk(Configuration);
})
.Build();
- Add credentials to configuration file
"HotAPI": {
"Username": "{AccessCode}",
"Password": "{Password}"
}
- Inject Service into application in constructor
public class App {
private readonly IHotAPIClient _client;
public App (IHotAPIClient client) {
_client = client;
}
...
}
Example Usage
// Account Balance Query
var response = await client.Account.BalancesAsync();
if (response.IsSuccessStatusCode)
{
result = JsonSerializer.Serialize(response.Content);
}
else
{
result = JsonSerializer.Serialize(response.Error.Content);
}
Console.WriteLine(result);
Implement it yourself
An API guide for Hot Recharge API is available here
Features
- Recharge Airtime for all mobile networks operators - Econet, Netone, Telecel
- ZETDC Token Purchases
- Utility Payments for Telone & Nyaradzo
- Custom SMS notification message for clients
- Easily query information for bundles & products available
License
MIT
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net7.0 is compatible. 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. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
-
net7.0
- Hot.Web.Api.Contracts (>= 0.1.3)
- Microsoft.Extensions.Configuration (>= 8.0.0)
- Microsoft.Extensions.Configuration.Binder (>= 8.0.2)
- Microsoft.Extensions.DependencyInjection (>= 8.0.0)
- Microsoft.Extensions.Logging.Abstractions (>= 8.0.1)
- Refit (>= 7.1.2)
- Refit.HttpClientFactory (>= 7.1.2)
- System.IdentityModel.Tokens.Jwt (>= 8.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.