public static ITogglApi GetTogglAPI() { var apiToken = SharedStorage.instance.GetApiToken(); if (apiToken == null) { return(null); } var version = NSBundle.MainBundle.InfoDictionary["CFBundleShortVersionString"].ToString(); var userAgent = new UserAgent("Daneel", $"{version} SiriExtension"); var apiConfiguration = new ApiConfiguration(environment, Credentials.WithApiToken(apiToken), userAgent); return(TogglApiFactory.WithConfiguration(apiConfiguration)); }
public ITogglApi CreateApiWith(Credentials credentials) { var configuration = new ApiConfiguration(Environment, credentials, UserAgent); return(TogglApiFactory.WithConfiguration(configuration)); }