Skip to content

mburumaxwell/thingsmobile-dotnet

Repository files navigation

ThingsMobile

NuGet

Introduction

ThingsMobile makes it easy to maintain SIM cards and their data plans/usage all over the world. More about ThingsMobile on the website.

The ThingsMobile dotnet NuGet package makes it easier to use the ThingsMobile API from your dotnet projects (netstandard2.0+) projects without having to build your own API calls. You can get your free API token at https://www.thingsmobile.com/portal?step=api.

The documentation that this Client is built on is available for download on the ThingsMobile portal https://www.thingsmobile.com/portal?action=downloadApiDocument.

This library currently supports v1.42 (2023-08-03)

Installation

To install using Package Manager Console use:

Install-Package ThingsMobile

To install using dotnet cli use:

dotnet add ThingsMobile

Usage

var options = new ThingsMobileClientOptions
{
    Username = "your-username-here",
    Token = "your-token-here"
};
var client = new ThingsMobileClient(options);
var response = await client.ListSimCardsAsync();
var simcards = response.Resource;
if (simcards is not null && simcards.Sims is not null)
{
    foreach (var sim in simcards.Sims)
    {
        Console.WriteLine($"MSISDN: {sim.Msisdn}");
        Console.WriteLine($"Name: {sim.Name}");
        Console.WriteLine($"Tag: {sim.Tag}");
        Console.WriteLine($"Status: {sim.Status}");
        Console.WriteLine("=====================");
    }
}

See examples for more.

Issues & Comments

Please leave all comments, bugs, requests, and issues on the Issues page. We'll respond to your request ASAP!

License

The Library is licensed under the MIT license. Refer to the LICENSE file for more information.