Table of Contents

Class SURFSharekitApiClient

Namespace
SURFSharekit.Net
Assembly
SURFSharekit.Net.dll
public class SURFSharekitApiClient : ISURFSharekitApiClient
Inheritance
SURFSharekitApiClient
Implements
Inherited Members

Constructors

SURFSharekitApiClient(HttpClient)

Pass a configured HttpClient (with BaseAddress set) into the constructor. Example usage:

var httpClient = new HttpClient
{
    BaseAddress = new Uri("https://YOUR-API-ENDPOINT/")
};
var client = new SURFSharekitApiClient(httpClient);
public SURFSharekitApiClient(HttpClient httpClient)

Parameters

httpClient HttpClient

Methods

GetAllRepoItems()

Get all SURFSharekitRepoItems accessible to the token

public Task<List<SURFSharekitRepoItem>> GetAllRepoItems()

Returns

Task<List<SURFSharekitRepoItem>>

GetRepoItemById(string)

Get a specific SURFSharekitRepoItem

public Task<SURFSharekitRepoItem> GetRepoItemById(string id)

Parameters

id string

The repo

Returns

Task<SURFSharekitRepoItem>

SetBearerToken(string)

Sets the bearer token for all subsequent requests. Call this before calling other methods if authentication is required.

public void SetBearerToken(string bearerToken)

Parameters

bearerToken string