Table of Contents

Interface IRestApi

Namespace
Geotab.Checkmate
Assembly
Geotab.Checkmate.ObjectModel.dll

Used to make Rest API calls against a MyGeotab web server.

public interface IRestApi

Properties

Database

Gets or sets the specific database on the server to which the API call is being made.

string Database { get; set; }

Property Value

string

A string database name.

LoginResult

Gets or sets the result of the login request.

LoginResult? LoginResult { get; set; }

Property Value

LoginResult

LoginResult

Password

Sets the user's password.

string Password { set; }

Property Value

string

string

Server

Gets or sets the name of the server that the API call is being made to.

string Server { get; set; }

Property Value

string

string

SessionId

Gets or sets the token generated from the authentication call which can be used to make the API call instead of the password.

string? SessionId { get; set; }

Property Value

string

string

Timeout

Gets or sets the timeout for the requests in milliseconds.

int Timeout { get; set; }

Property Value

int

int

UserName

Gets or sets the username (typically an email address) that identifies the user being authenticated.

string UserName { get; set; }

Property Value

string

string

Methods

AuthenticateAsync(CancellationToken)

Authenticate the user in an async call.

Task AuthenticateAsync(CancellationToken cancellationToken = default)

Parameters

cancellationToken CancellationToken

The CancellationToken.

Returns

Task

A Task which is a result of calling AuthenticateImplAsync.

GetAsync(string, CancellationToken)

Make a GET http request.

Task<HttpResponseMessage> GetAsync(string url, CancellationToken cancellationToken = default)

Parameters

url string

The url for the REST api.

cancellationToken CancellationToken

The CancellationToken.

Returns

Task<HttpResponseMessage>

The HttpResponseMessage which is the result of the api call.