ApiIr.SDK 1.0.0

dotnet add package ApiIr.SDK --version 1.0.0
                    
NuGet\Install-Package ApiIr.SDK -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="ApiIr.SDK" Version="1.0.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="ApiIr.SDK" Version="1.0.0" />
                    
Directory.Packages.props
<PackageReference Include="ApiIr.SDK" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add ApiIr.SDK --version 1.0.0
                    
#r "nuget: ApiIr.SDK, 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.
#:package ApiIr.SDK@1.0.0
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=ApiIr.SDK&version=1.0.0
                    
Install as a Cake Addin
#tool nuget:?package=ApiIr.SDK&version=1.0.0
                    
Install as a Cake Tool

ApiIr.SDK

Official .NET SDK for interacting with API.IR services.

Developed and maintained by Ali Ramezani.


Badges

License NuGet Downloads .NET Build


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:

  1. Fork the repository
  2. Create a feature branch
  3. Commit your changes
  4. Push to your fork
  5. Open a Pull Request

License

This project is licensed under the MIT License.

See the LICENSE file for details.


Author

Ali Ramezani


Acknowledgements

  • API.IR
  • .NET Community
  • Open Source Contributors

Product 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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

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