File tree Expand file tree Collapse file tree 6 files changed +20
-55
lines changed Expand file tree Collapse file tree 6 files changed +20
-55
lines changed Original file line number Diff line number Diff line change @@ -6,14 +6,8 @@ namespace HubSpot.NET.Examples
6
6
{
7
7
public class Companies
8
8
{
9
- public static void Example ( )
9
+ public static void Example ( HubSpotApi api )
10
10
{
11
- /**
12
- * Initialize the API with your API Key
13
- * You can find or generate this under Integrations -> HubSpot API key
14
- */
15
- var api = new HubSpotApi ( "YOUR-API-KEY-HERE" ) ;
16
-
17
11
/**
18
12
* Create a company
19
13
*/
Original file line number Diff line number Diff line change 1
- using HubSpot . NET . Api . Company ;
2
- using HubSpot . NET . Api . Company . Dto ;
3
- using HubSpot . NET . Api . Properties . Dto ;
1
+ using HubSpot . NET . Api . Properties . Dto ;
4
2
using HubSpot . NET . Core ;
5
3
6
4
namespace HubSpot . NET . Examples
7
5
{
8
6
public class CompanyProperties
9
7
{
10
- public static void Example ( )
8
+ public static void Example ( HubSpotApi api )
11
9
{
12
- /**
13
- * Initialize the API with your API Key
14
- * You can find or generate this under Integrations -> HubSpot API key
15
- */
16
- var api = new HubSpotApi ( "YOUR-API-KEY-HERE" ) ;
17
-
18
- /**
10
+ /**
19
11
* Get all company properties
20
12
*/
21
13
var properties = api . CompanyProperties . GetAll ( ) ;
Original file line number Diff line number Diff line change @@ -10,14 +10,8 @@ namespace HubSpot.NET.Examples
10
10
{
11
11
public class Contacts
12
12
{
13
- public static void Example ( )
13
+ public static void Example ( HubSpotApi api )
14
14
{
15
- /**
16
- * Initialize the API with your API Key
17
- * You can find or generate this under Integrations -> HubSpot API key
18
- */
19
- var api = new HubSpotApi ( "YOUR-API-KEY-HERE" ) ;
20
-
21
15
/**
22
16
* Search for a contact
23
17
*/
Original file line number Diff line number Diff line change @@ -7,14 +7,8 @@ namespace HubSpot.NET.Examples
7
7
{
8
8
public class Deals
9
9
{
10
- public static void Example ( )
10
+ public static void Example ( HubSpotApi api )
11
11
{
12
- /**
13
- * Initialize the API with your API Key
14
- * You can find or generate this under Integrations -> HubSpot API key
15
- */
16
- var api = new HubSpotApi ( "YOUR API KEY HERE" ) ;
17
-
18
12
/**
19
13
* Create a deal
20
14
*/
Original file line number Diff line number Diff line change @@ -5,15 +5,9 @@ namespace HubSpot.NET.Examples
5
5
{
6
6
public class EmailSubscriptions
7
7
{
8
- public static void Example ( )
8
+ public static void Example ( HubSpotApi api )
9
9
{
10
- /**
11
- * Initialize the API with your API Key
12
- * You can find or generate this under Integrations -> HubSpot API key
13
- */
14
- var api = new HubSpotApi ( "YOUR-API-KEY-HERE" ) ;
15
-
16
- /**
10
+ /**
17
11
* Get the available subscription types
18
12
*/
19
13
var all = api . EmailSubscriptions . GetEmailSubscriptionTypes ( ) ;
Original file line number Diff line number Diff line change 1
- using System ;
2
- using System . Collections . Generic ;
3
- using System . IO ;
4
- using System . Linq ;
5
- using System . Text ;
6
- using System . Threading . Tasks ;
7
- using HubSpot . NET . Api . Contact . Dto ;
8
- using HubSpot . NET . Api . Engagement . Dto ;
9
- using HubSpot . NET . Api . Files . Dto ;
10
- using HubSpot . NET . Core ;
1
+ using HubSpot . NET . Core ;
11
2
12
3
namespace HubSpot . NET . Examples
13
4
{
14
5
public class Examples
15
6
{
16
7
static void Main ( string [ ] args )
17
8
{
18
- Deals . Example ( ) ;
9
+ /**
10
+ * Initialize the API with your API Key
11
+ * You can find or generate this under Integrations -> HubSpot API key
12
+ */
13
+ var api = new HubSpotApi ( "YOUR API KEY HERE" ) ;
19
14
20
- Companies . Example ( ) ;
15
+ Deals . Example ( api ) ;
21
16
22
- Contacts . Example ( ) ;
17
+ Companies . Example ( api ) ;
23
18
24
- CompanyProperties . Example ( ) ;
19
+ Contacts . Example ( api ) ;
25
20
26
- EmailSubscriptions . Example ( ) ;
21
+ CompanyProperties . Example ( api ) ;
22
+
23
+ EmailSubscriptions . Example ( api ) ;
27
24
}
28
25
}
29
26
}
You can’t perform that action at this time.
0 commit comments