public RestRequestRunner(GerritConfiguration gerritConfiguration) { _restClient = new RestClient(gerritConfiguration.GerritApiUrl) { Authenticator = new DigestAuthenticator(gerritConfiguration.UserName, gerritConfiguration.Password) }; }
static void Main() { var gerritConfiguration = new GerritConfiguration("username", "password", "gerrit url"); var changesEndPoint = new ChangesEndpoint(gerritConfiguration); foreach (var change in changesEndPoint.GetAll(new ChangeQueryParameters { NumberOfResults = 10 }, ChangeOptionalParameters.Empty)) { Console.WriteLine(change.Subject); } }
public ChangesEndpoint(GerritConfiguration gerritConfiguration) : this(new RestRequestRunner(gerritConfiguration)) { }