Spectre.Client

SaltEdge Spectre API Client

View the Project on GitHub jkirsteins/Spectre.Client

Spectre.Client

Build Status Nuget

A netstandard2.0 library for calling the SaltEdge Global Data Aggregation API.

Testing and Building

dotnet test
dotnet build

Installation

dotnet add <PROJECT> package Spectre.Client

Getting Started

The client uses Refit, so initialize the client by:

var client = RestService.For<ISaltEdgeClient>("https://www.saltedge.com/api/v5/");

If you’re using ASP.NET, you might want to add it as a service in ConfigureServices:

services.AddScoped(_ => RestService.For<ISaltEdgeClient>(
  new HttpClient(
    new SaltEdgeHttpClientHandler(
      Configuration["SaltEdge:AppId"],
      Configuration["SaltEdge:Secret"])
    )
    {
      BaseAddress = new Uri("https://www.saltedge.com/api/v5/"),
    }));

Implemented functionality


Licenced under an MIT licence. Maintainer: Jānis Kiršteins @jkirsteins

Copyright © 2019 Jānis Kiršteins