Ejemplo n.º 1
0
        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);
        }
Ejemplo n.º 2
0
        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);
        }
Ejemplo n.º 3
0
 /// <summary>Constructs a new resource.</summary>
 public V2Resource(Google.Apis.Services.IClientService service)
 {
     this.service = service;
     me           = new MeResource(service);
 }
Ejemplo n.º 4
0
 public V2Resource(Oauth2Service service)
 {
     this.service = service;
     this._me     = new MeResource(service);
 }
Ejemplo n.º 5
0
 public V2Resource(Oauth2Service service, Google.Apis.Authentication.IAuthenticator _authenticator)
 {
     this.service        = service;
     this._authenticator = _authenticator;
     this._me            = new MeResource(service, _authenticator);
 }