public TogglClient(string APIToken) { _APIToken = APIToken; WorkspaceService = new WorkspaceService(_APIToken); ProjectService = new ProjectService(_APIToken); TimeEntryService = new TimeEntryService(_APIToken); TaskService = new TaskService(_APIToken); ApiService = new ApiService(_APIToken); ClientService = new ClientService(_APIToken); }
public Toggl(string key) { ApiService = new ApiService(key); Client = new ClientService(ApiService); Project = new ProjectService(ApiService); Tag = new TagService(ApiService); Task = new TaskService(ApiService); TimeEntry = new TimeEntryService(ApiService); User = new UserService(ApiService); Workspace = new WorkspaceService(ApiService); }
public void GetSessionByApiToken() { var t = new ApiService(Constants.ApiToken); var s = t.GetSession(); Assert.AreEqual(Constants.ApiToken, s.ApiToken); }