Code Monkey home page Code Monkey logo

hubspot-dotnet-sdk's Introduction

EMG .NET SDK for HubSpot

This repository contains an SDK for .NET applications needing to integrate with HubSpot.

This SDK is composed of two packages:

  • EMG.HubSpot.Client,
  • EMG.HubSpot

You can find detailed information about how to use this library in the documentation site.

Versioning

This library follows Semantic Versioning 2.0.0 for the public releases (published to the nuget.org).

How to build

This project uses Cake as a build engine. You will also need the .NET Core SDK 3.1.401.

If you would like to build this project locally, just execute the build.cake script.

You can do it by using the .NET tool created by CAKE authors and use it to execute the build script.

dotnet tool restore
dotnet cake

hubspot-dotnet-sdk's People

Contributors

agnerh avatar annasandberg avatar diaconu96vi avatar elindanielsson avatar kralizek avatar mcdoit avatar simgu avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

hubspot-dotnet-sdk's Issues

Open source this repository

Few steps are needed before we can open source this repository

  • Create proper README file
  • Validate license
  • Make sure all dependencies are available on NuGet
  • EMG.Common.Framework.Clock
  • EMG.Testing.Framework.Clock
  • Add AUTHORS file
  • Add contributing guidelines

New package: HubSpot.NetCore.Setup

Using the HubSpot connectors and client require a lot of plumbing.

The intent of this package is to easy the job by providing extension methods to IServiceCollection to proper register all the components.

InnerHandler not available in DI container

When trying to use the library w/ the OAuth example project (and valid credentials), appears the OAuthHubSpotAuthenticator is trying to resolve HttpMessageHandler, while it looks like it's mocked in tests, it doesn't appear the inner handler is added to the DI container? I removed the handler from the constructor and it works fine, but I don't exactly know the implications behind that. Maybe someone could point me in the right direction? I am not entirely familiar with the pipeline. Thank you!

Unhandled exception. System.InvalidOperationException: Unable to resolve service for type 'System.Net.Http.HttpMessageHandle r' while attempting to activate 'HubSpot.Authentication.OAuthHubSpotAuthenticator'. at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteFactory.CreateArgumentCallSites(Type serviceType, Type implementationType, CallSiteChain callSiteChain, ParameterInfo[] parameters, Boolean throwIfCallSiteNotFound) at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteFactory.CreateConstructorCallSite(ResultCache lifetime, Type serviceType, Type implementationType, CallSiteChain callSiteChain) at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteFactory.TryCreateExact(ServiceDescriptor descriptor, Ty pe serviceType, CallSiteChain callSiteChain, Int32 slot) at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteFactory.TryCreateExact(Type serviceType, CallSiteChain callSiteChain) at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteFactory.CreateCallSite(Type serviceType, CallSiteChain callSiteChain) at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteFactory.<>c__DisplayClass7_0.<GetCallSite>b__0(Type typ e) at System.Collections.Concurrent.ConcurrentDictionary2.GetOrAdd(TKey key, Func2 valueFactory) at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteFactory.GetCallSite(Type serviceType, CallSiteChain cal lSiteChain) at Microsoft.Extensions.DependencyInjection.ServiceLookup.ServiceProviderEngine.CreateServiceAccessor(Type serviceType) at System.Collections.Concurrent.ConcurrentDictionary2.GetOrAdd(TKey key, Func2 valueFactory) at Microsoft.Extensions.DependencyInjection.ServiceLookup.ServiceProviderEngine.GetService(Type serviceType, ServiceProvi derEngineScope serviceProviderEngineScope) at Microsoft.Extensions.DependencyInjection.ServiceLookup.ServiceProviderEngineScope.GetService(Type serviceType) at Microsoft.Extensions.DependencyInjection.ServiceProviderServiceExtensions.GetRequiredService(IServiceProvider provider , Type serviceType) at Microsoft.Extensions.DependencyInjection.ServiceProviderServiceExtensions.GetRequiredService[T](IServiceProvider provi der) at Microsoft.Extensions.DependencyInjection.HttpClientBuilderExtensions.<>c__41.<AddHttpMessageHandler>b__4_1(HttpMessag eHandlerBuilder b) at Microsoft.Extensions.Http.DefaultHttpClientFactory.<>c__DisplayClass17_0.<CreateHandlerEntry>g__Configure|0(HttpMessag eHandlerBuilder b) at Microsoft.Extensions.Http.LoggingHttpMessageHandlerBuilderFilter.<>c__DisplayClass2_0.<Configure>b__0(HttpMessageHandl erBuilder builder) at Microsoft.Extensions.Http.DefaultHttpClientFactory.CreateHandlerEntry(String name) at Microsoft.Extensions.Http.DefaultHttpClientFactory.<>c__DisplayClass14_0.<.ctor>b__1() at System.Lazy1.ViaFactory(LazyThreadSafetyMode mode) at System.Lazy1.ExecutionAndPublication(LazyHelper executionAndPublication, Boolean useDefaultConstructor) at System.Lazy1.CreateValue() at System.Lazy1.get_Value() at Microsoft.Extensions.Http.DefaultHttpClientFactory.CreateHandler(String name) at Microsoft.Extensions.Http.DefaultHttpClientFactory.CreateClient(String name) at Kralizek.Extensions.Http.HttpRestClient.CreateClient() at Kralizek.Extensions.Http.HttpRestClient.SendAsync[TContent,TResult](HttpMethod method, String path, TContent content, IQueryString query) at HubSpot.HttpHubSpotClient.HubSpot.Model.Companies.IHubSpotCompanyClient.SearchAsync(String domain, IReadOnlyList1 pro perties, Int32 limit, Nullable1 companyOffset) in C:\Users\chris\RiderProjects\hubspot-dotnet-sdk\src\HubSpot.Client\HttpHu bSpotClient.Companies.cs:line 132 at RawOAuth.Program.Main() in C:\Users\chris\RiderProjects\hubspot-dotnet-sdk\samples\hubspot-client\OAuthAuthentication\ Program.cs:line 49 at RawOAuth.Program.<Main>()

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.