コード例 #1
0
ファイル: HubSpot.cs プロジェクト: verticalgmbh/hubspot-api
        /// <summary>
        /// creates a new <see cref="HubSpot"/>
        /// </summary>
        /// <param name="apikey">key used to access api</param>
        public HubSpot(string apikey)
        {
            ModelRegistry     registry   = new ModelRegistry();
            HubSpotRestClient restclient = new HubSpotRestClient(apikey, new Uri("https://api.hubapi.com/"));

            Companies = new CompanyApi(restclient, registry);
        }
コード例 #2
0
ファイル: HubSpot.cs プロジェクト: microknights/hubspot-api
        /// <summary>
        /// creates a new <see cref="HubSpot"/>
        /// </summary>
        /// <param name="restclient">rest client used to access hubspot</param>
        /// <param name="options">options for hubspot api</param>
        public HubSpot(HubSpotRestClient restclient, HubSpotOptions options = null)
        {
            options = options ?? new HubSpotOptions();
            ModelRegistry registry = new ModelRegistry();

            Contacts     = new ContactApi(options, restclient, registry);
            Companies    = new CompanyApi(restclient, registry);
            Associations = new AssociationApi(restclient);
            Deals        = new DealsApi(restclient, registry);
            Tickets      = new TicketsApi(restclient, registry);
            BlogPosts    = new BlogPostApi(restclient, registry);
            Engagements  = new EngagementsApi(options, restclient, registry);
        }