Skip to content

Latest commit

 

History

History
64 lines (44 loc) · 2.2 KB

File metadata and controls

64 lines (44 loc) · 2.2 KB

GitHub license GitHub issues GitHub stars GitHub forks GitHub forks

WifiPlug API

The .NET API client for the WIFIPLUG platform.

Get Started

NuGet Status

You can install the package using either the CLI:

dotnet add package WifiPlug.Api

or from the NuGet package manager:

Install-Package WifiPlug.Api

Example

An example of using the API asynchronously.

using System;
using System.Threading.Tasks;
using WifiPlug.Api;
using WifiPlug.Api.Entities;
using WifiPlug.Api.Authentication;

class Program
{
    static void Main(string[] args) => AsyncMain(args).Wait();

    static async Task AsyncMain(string[] args) {
        // create the client
        ApiClient client = new ApiClient("your api key", "your api secret");
		
	// You must also add some form of authentication. Session authorisation is
	// internal so you can define your own by inheriting ApiAuthentication.
	// client.Authentication = new SessionAuthentication("token");

        // request my user object
        UserEntity user = await client.Users.GetCurrentUserAsync();

        Console.WriteLine($"Hello {user.GivenName} {user.FamilyName}!");
    }
}

Contributing

We welcome any pull requests or bug reports, please try and keep to the existing style conventions and comment any additions. The issues section is only for problems related to the API client, other issues will be closed.