hubspot-net / HubSpot.NET

C# .NET Wrapper around the common HubSpot APIs.
MIT License
112 stars 137 forks source link

nuget package dependencies - RestSharp #81

Open arcbus opened 4 years ago

arcbus commented 4 years ago

This is mostly just feedback to make this api wrapper easier to use.

I.e. I followed the example under HubSpot.NET/HubSpot.NET.Examples/Deals.cs

and this code:

var deals = api.Deal.List(false,
       new ListRequestOptions(250) { PropertiesToInclude = new List<string> { "dealname", "amount" } });

Doesn't compile. Looks like it needs to this instead:

var deals = api.Deal.List<DealHubSpotModel>(false,
       new ListRequestOptions(250) { PropertiesToInclude = new List<string> { "dealname", "amount" } });

Also, would be nice if adding this nuget package would include all dependencies, but it doesn't. Worse still, i added the dependencies with latest stable versions, and it throws an obtuse error. Turns out RestSharp breaks something unless you are using the specific version in HubSpot.NET/HubSpot.NET/packages.config

TimFung93 commented 4 years ago

What dependencies did you add to the latest stable versions? I am getting the same error as well but this time is just when I call var api = new HubSpotApi(<API_KEY>);

arcbus commented 4 years ago

I gave up trying to use this package and reverted to using RestClient directly myself, essentially calling URL's, setting headers, posting request manually :(