/// <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); }
/// <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); }