ApiIr.SDK
1.0.0
dotnet add package ApiIr.SDK --version 1.0.0
NuGet\Install-Package ApiIr.SDK -Version 1.0.0
<PackageReference Include="ApiIr.SDK" Version="1.0.0" />
<PackageVersion Include="ApiIr.SDK" Version="1.0.0" />
<PackageReference Include="ApiIr.SDK" />
paket add ApiIr.SDK --version 1.0.0
#r "nuget: ApiIr.SDK, 1.0.0"
#:package ApiIr.SDK@1.0.0
#addin nuget:?package=ApiIr.SDK&version=1.0.0
#tool nuget:?package=ApiIr.SDK&version=1.0.0
ApiIr.SDK
Official .NET SDK for interacting with API.IR services.
Developed and maintained by Ali Ramezani.
Badges
Table of Contents
- Description
- Features
- Tech Stack
- Installation
- Quick Start
- Usage Example
- Configuration
- API Reference
- Folder Structure
- Deployment
- Roadmap
- Contributing
- License
- Author
- Acknowledgements
Description
ApiIr.SDK is the official .NET client library for working with API.IR services.
The SDK simplifies communication with API.IR endpoints by providing a strongly‑typed, developer‑friendly interface that integrates seamlessly with modern .NET dependency injection.
It helps developers quickly connect to API.IR services without manually handling HTTP requests, authentication, or serialization.
Features
- Official API.IR integration
- Fully compatible with modern .NET applications
- Built‑in Dependency Injection support
- Strongly‑typed request and response models
- Simple configuration
- Async API support
- Clean and minimal integration
Tech Stack
- .NET 6+
- C#
- HttpClient
- Dependency Injection
Installation
Install via NuGet Package Manager:
dotnet add package ApiIr.SDK
Or via NuGet UI in Visual Studio by searching for:
ApiIr.SDK
Quick Start
Register the SDK inside your application's service container.
builder.Services.AddApiIr(options =>
{
options.BaseUrl = "https://s.api.ir";
options.Token = "YOUR_API_TOKEN";
});
Usage Example
Example of calling the Shahkar API:
var response = await apiClient.ShahkarAsync(new ShahkarReq
{
nationalCode = "1234567890",
mobile = "09123456789"
});
Configuration
The SDK requires the following configuration options:
| Option | Description |
|---|---|
| BaseUrl | Base URL of the API.IR service |
| Token | Your API.IR access token |
Example:
options.BaseUrl = "https://s.api.ir";
options.Token = "YOUR_API_TOKEN";
API Reference
Example available endpoint:
Shahkar
Validates a mobile number and national code.
Request model:
ShahkarReq
{
string nationalCode
string mobile
}
Call example:
await apiClient.ShahkarAsync(request);
Folder Structure
Typical SDK structure:
ApiIr.SDK
├── Clients
├── Models
├── Requests
├── Responses
├── Extensions
└── ApiIrClient.cs
Screenshots
Add usage screenshots or API response examples here.
Deployment
After building the project, publish to NuGet:
dotnet pack
dotnet nuget push
Roadmap
Planned improvements:
- Additional API.IR endpoints
- Improved error handling
- Logging integration
- Advanced configuration support
- Expanded documentation
Contributing
Contributions are welcome.
Steps:
- Fork the repository
- Create a feature branch
- Commit your changes
- Push to your fork
- Open a Pull Request
License
This project is licensed under the MIT License.
See the LICENSE file for details.
Author
Ali Ramezani
- GitHub: https://github.com/aliram-ir/ApiIr
- Email: REPLACE_WITH_EMAIL
Acknowledgements
- API.IR
- .NET Community
- Open Source Contributors
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net8.0 is compatible. 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. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net8.0
- Microsoft.Extensions.Http (>= 10.0.8)
- Newtonsoft.Json (>= 13.0.4)
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 | 96 | 5/14/2026 |