Skip to content

Example Use

SharpLogic edited this page Dec 17, 2013 · 3 revisions

There are three main namespaces

  • TogglApi - Contains the main API class, constants and extensions
  • TogglApi.Models - Contains models used in the API
  • TogglApi.Entities - Entity classes e.g. Users, Clients

Create an instance of Models.TogglAuthRequest

TogglAuthRequest auth = new TogglAuthRequest { ApiToken = "xxx" };

New instance of the API

TogglApi api = new TogglApi(auth);

Get current user details

var user = api.Users.GetCurrent();

Clone this wiki locally