LudaSys.HubSpot.NET 0.8.14

There is a newer version of this package available.
See the version list below for details.
dotnet add package LudaSys.HubSpot.NET --version 0.8.14
NuGet\Install-Package LudaSys.HubSpot.NET -Version 0.8.14
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="LudaSys.HubSpot.NET" Version="0.8.14" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add LudaSys.HubSpot.NET --version 0.8.14
#r "nuget: LudaSys.HubSpot.NET, 0.8.14"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install LudaSys.HubSpot.NET as a Cake Addin
#addin nuget:?package=LudaSys.HubSpot.NET&version=0.8.14

// Install LudaSys.HubSpot.NET as a Cake Tool
#tool nuget:?package=LudaSys.HubSpot.NET&version=0.8.14

NuGet Build Status

<span>HubSpot.NET</span>

C# .NET Wrapper around the common HubSpot APIs:

  • Contact
  • Company
  • Deal
  • Engagement
  • Owners
  • COS Files API (adds the ability to upload files to use as attachments to engagements)
  • Email Subscriptions (currently GET & PUT)
  • Timeline API
    • Timeline EventTypes
    • Timeline Events

Authorization

<span>HubSpot.NET</span> supports authorization by API key or through HubSpot's OAuth workflow. As is noted in HubSpot's API documentation, it is recommended to use the OAuth form if your integration is going to be used commercially due to an increased level of security. However, we have made it optional to target OAuth or API key authentication so you can develop against the authentication provider that best suits your needs.

Getting Started

To get started, install the Nuget package and create a instance of HubSpotApi passing your API Key as the only parameter; or if using OAuth pass in the Client ID, Client Secret, and App ID.

API Key

  var api = new HubSpotApi("MY API KEY");
  
  // Create a contact
  var contact = api.Contact.Create(new ContactHubSpotModel()
  {
      Email = "john@squaredup.com",
      FirstName = "John",
      LastName = "Smith",
      Phone = "00000 000000",
      Company = "Squared Up Ltd."
  });
  

OAuth

  var api = new HubSpotApi("clientID", "clientSecret", "HubSpotAppID");
  
  // Create a contact
  var contact = api.Contact.Create(new ContactHubSpotModel()
  {
      Email = "john@squaredup.com",
      FirstName = "John",
      LastName = "Smith",
      Phone = "00000 000000",
      Company = "Squared Up Ltd."
  });
  

For more examples see the HubSpot.NET.Examples project.

Using your own models

As HubSpot lets you create and add custom properties to your contacts, companies and deals it's likely you'll want to implement your own models. This is straightforward, simply extend the models shipped with this library, e.g. ContactHubSpotModel and add your own properties. Use the DataMember attributes to indicate the internal name. For example

  public class Contact : ContactHubSpotModel
  {
      [DataMember(Name = "activities")]
      public string Activities { get; set; }

      [DataMember(Name = "type")]
      public string Type { get; set; }
  }

Using checkbox/radio properties

These properties should be of type string and set as a semicolon delimitered list of values, e.g. "value1;value2". This is required by HubSpot, see here for more details.

Contributing

Please read CONTRIBUTING.md for more information on how to contribute. PRs welcome!

Authors

  • Dave Clarke

License

This project is licensed under the MIT License - see the LICENSE file for details

Acknowledgements

  • Initial version based on dotnetcore-hubspot-client by skarpdev, expanded to additional APIs and heavily refactored to use RestSharp etc.
Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net6.0 was computed.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed. 
.NET Core netcoreapp2.0 was computed.  netcoreapp2.1 was computed.  netcoreapp2.2 was computed.  netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
.NET Standard netstandard2.0 is compatible.  netstandard2.1 was computed. 
.NET Framework net461 is compatible.  net462 was computed.  net463 was computed.  net47 was computed.  net471 was computed.  net472 was computed.  net48 was computed.  net481 was computed. 
MonoAndroid monoandroid was computed. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen tizen40 was computed.  tizen60 was computed. 
Xamarin.iOS xamarinios was computed. 
Xamarin.Mac xamarinmac was computed. 
Xamarin.TVOS xamarintvos was computed. 
Xamarin.WatchOS xamarinwatchos was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
0.8.15 716 4/16/2021
0.8.14 601 4/15/2021

0.8.14