Skip to content

alexl0gan/mbed-cloud-sdk-dotnet

 
 

Repository files navigation

Pelion Device Management SDK for .NET

License CircleCI Build status codecov

The Pelion Device Management SDK gives developers access to the full Pelion Device Management suite using .NET Standard 2.0.

Installation

  1. Download the .NET Core SDK from here. There are installers for Windows, Linux and Mac.
  2. Create a new console application
dotnet new console -o myApp
cd myApp
  1. Install the MbedCloudSDK in your project
dotnet add package Mbed.Cloud.SDK
dotnet build
  1. To use the SDK you'll need an Api Key, which you can get from the Pelion Device Management Portal.

Example Usage

The following sample lists the first ten devices in your Device Directory.

using System;
using Mbed.Cloud;
using Mbed.Cloud.Foundation;

public class HelloWorldSeparateSdk
{
    public static void Main()
    {
        // Create an instance of the Pelion Device Management SDK
        var sdk = new SDK();

        var options = new DeviceListOptions
        {
            MaxResults = 10     // Limit to ten devices
        };

        // List the first ten devices on your Pelion Device Management account
        foreach (var device in sdk.Foundation().DeviceRepository().List(options))
        {
            Console.WriteLine("Hello device " + device.Name);
        }
    }
}

Documentation

See full documentation and API reference here.

Contributing

Pelion Device Management SDK for .NET is open source and we would like your help; there is a brief guide on how to get started in CONTRIBUTING.md.

Licence

Pelion Device Management Cloud SDK for .NET is free-to-use and licensed under the Apache License 2.0. Please see LICENSE file for more information.

About

Pelion Device Management SDK for .NET

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • C# 99.7%
  • Other 0.3%