hubspot-net / HubSpot.NET

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

Add Async API #96

Closed roycornelissen closed 2 years ago

roycornelissen commented 3 years ago

Description

This PR adds *Async equivalents to all API's. I made copies of all existing methods to keep existing methods intact. Probably we could do some code deduplication to tidy things up, but that would affect existing behavior.

I had to update RestSharp to be able to use their Async extension methods, though I think it would be better to refactor the internals to use plain HttpClient to be honest.

In order to get everything to compile, I took the liberty of updating the Examples project to new style csproj format, but kept it net461.

Purpose

Checklist

roycornelissen commented 3 years ago

Possible fix for #57

I am having some issues testing these changes though... The component seems to send empty entities to Hubspot. Creating a company for example results in a new company record in Hubspot but without any properties.

This happens in the latest master version too. Have you noticed anything like this?