public CrayonApiClient(HttpClient httpClient) { _httpClient = httpClient; _jsonSerializerSettings = new JsonSerializerSettings { MissingMemberHandling = MissingMemberHandling.Ignore, NullValueHandling = NullValueHandling.Include, DefaultValueHandling = DefaultValueHandling.Include, Formatting = Formatting.Indented }; _assemblyVersion = typeof(CrayonApiClient).GetTypeInfo().Assembly.GetName().Version.ToString(); Addresses = new AddressResource(this); AgreementProducts = new AgreementProductResource(this); Agreements = new AgreementResource(this); BillingStatements = new BillingStatementResource(this); BlogItems = new BlogItemResource(this); Clients = new ClientResource(this); CustomerTenants = new CustomerTenantResource(this); InvoiceProfiles = new InvoiceProfileResource(this); Me = new MeResource(this); OrganizationAccess = new OrganizationAccessResource(this); Organizations = new OrganizationResource(this); Publishers = new PublisherResource(this); Programs = new ProgramResource(this); Regions = new RegionResource(this); Secrets = new SecretResource(this); Subscriptions = new SubscriptionResource(this); Tokens = new TokenResource(this); UsageRecords = new UsageRecordResource(this); Users = new UserResource(this); }
public AgileZenClient(string apiKey, string apiUrl = "https://agilezen.com/api/v1/") { var client = new RestClient(apiUrl); client.AddDefaultHeader("X-Zen-ApiKey", apiKey); client.AddDefaultHeader("Content-Type", "application/json"); client.AddDefaultHeader("Accept", "application/json"); Me = new MeResource(client); Phases = new PhasesResource(client); Projects = new ProjectsResource(client); Stories = new StoriesResource(client); Tags = new TagsResource(client); }
/// <summary>Constructs a new resource.</summary> public V2Resource(Google.Apis.Services.IClientService service) { this.service = service; me = new MeResource(service); }
public V2Resource(Oauth2Service service) { this.service = service; this._me = new MeResource(service); }
public V2Resource(Oauth2Service service, Google.Apis.Authentication.IAuthenticator _authenticator) { this.service = service; this._authenticator = _authenticator; this._me = new MeResource(service, _authenticator); }