SquaredUp.HubSpot.NET
0.5.0
See the version list below for details.
dotnet add package SquaredUp.HubSpot.NET --version 0.5.0
NuGet\Install-Package SquaredUp.HubSpot.NET -Version 0.5.0
<PackageReference Include="SquaredUp.HubSpot.NET" Version="0.5.0" />
<PackageVersion Include="SquaredUp.HubSpot.NET" Version="0.5.0" />
<PackageReference Include="SquaredUp.HubSpot.NET" />
paket add SquaredUp.HubSpot.NET --version 0.5.0
#r "nuget: SquaredUp.HubSpot.NET, 0.5.0"
#addin nuget:?package=SquaredUp.HubSpot.NET&version=0.5.0
#tool nuget:?package=SquaredUp.HubSpot.NET&version=0.5.0
HubSpot.NET
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)
Getting Started
To get started, install the Nuget package and create a instance of HubSpotApi
passing your API Key as the only parameter.
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."
});
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 | Versions Compatible and additional computed target framework versions. |
---|---|
.NET Framework | net451 is compatible. net452 was computed. net46 is compatible. net461 was computed. net462 was computed. net463 was computed. net47 was computed. net471 was computed. net472 was computed. net48 was computed. net481 was computed. |
-
.NETFramework 4.5.1
- Flurl (>= 2.6.0)
- Newtonsoft.Json (>= 10.0.3)
- RestSharp (>= 105.2.3)
-
.NETFramework 4.6
- Flurl (>= 2.6.0)
- Newtonsoft.Json (>= 10.0.3)
- RestSharp (>= 105.2.3)
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.6.17 | 272,706 | 8/3/2018 |
0.6.16 | 1,916 | 7/31/2018 |
0.6.15 | 8,566 | 6/5/2018 |
0.6.14 | 2,246 | 5/2/2018 |
0.6.13 | 1,944 | 5/1/2018 |
0.6.10 | 1,895 | 5/1/2018 |
0.5.5 | 1,909 | 4/16/2018 |
0.5.4 | 2,252 | 3/9/2018 |
0.5.3 | 1,874 | 2/24/2018 |
0.5.1.8 | 1,804 | 2/23/2018 |
0.5.1 | 1,766 | 2/22/2018 |
0.5.0 | 1,915 | 2/22/2018 |
0.4.0 | 1,894 | 2/20/2018 |
0.3.0 | 1,929 | 2/13/2018 |
0.2.0 | 1,850 | 2/9/2018 |
0.1.0 | 1,941 | 2/2/2018 |
0.5