private GitLabClient(string hostUrl, string apiToken, IHttpRequestorFactory httpRequestorFactory) { _api = new API(hostUrl, apiToken, httpRequestorFactory); Users = new UserClient(_api); Projects = new ProjectClient(_api); Issues = new IssueClient(_api); Groups = new NamespaceClient(_api); }
public API(string hostUrl, string apiToken, IHttpRequestorFactory httpRequestorFactory) { _hostUrl = hostUrl.EndsWith("/") ? hostUrl.Replace("/$", "") : hostUrl; APIToken = apiToken; _httpRequestorFactory = httpRequestorFactory; }
public static GitLabClient Connect(string hostUrl, string apiToken, IHttpRequestorFactory httpRequestorFactory) { return(new GitLabClient(hostUrl, apiToken, httpRequestorFactory)); }