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
66{
77 public class Companies
88 {
9- public static void Example ( )
9+ public static void Example ( HubSpotApi api )
1010 {
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-
1711 /**
1812 * Create a company
1913 */
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 ;
42using HubSpot . NET . Core ;
53
64namespace HubSpot . NET . Examples
75{
86 public class CompanyProperties
97 {
10- public static void Example ( )
8+ public static void Example ( HubSpotApi api )
119 {
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+ /**
1911 * Get all company properties
2012 */
2113 var properties = api . CompanyProperties . GetAll ( ) ;
Original file line number Diff line number Diff line change @@ -10,14 +10,8 @@ namespace HubSpot.NET.Examples
1010{
1111 public class Contacts
1212 {
13- public static void Example ( )
13+ public static void Example ( HubSpotApi api )
1414 {
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-
2115 /**
2216 * Search for a contact
2317 */
Original file line number Diff line number Diff line change @@ -7,14 +7,8 @@ namespace HubSpot.NET.Examples
77{
88 public class Deals
99 {
10- public static void Example ( )
10+ public static void Example ( HubSpotApi api )
1111 {
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-
1812 /**
1913 * Create a deal
2014 */
Original file line number Diff line number Diff line change @@ -5,15 +5,9 @@ namespace HubSpot.NET.Examples
55{
66 public class EmailSubscriptions
77 {
8- public static void Example ( )
8+ public static void Example ( HubSpotApi api )
99 {
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+ /**
1711 * Get the available subscription types
1812 */
1913 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 ;
112
123namespace HubSpot . NET . Examples
134{
145 public class Examples
156 {
167 static void Main ( string [ ] args )
178 {
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" ) ;
1914
20- Companies . Example ( ) ;
15+ Deals . Example ( api ) ;
2116
22- Contacts . Example ( ) ;
17+ Companies . Example ( api ) ;
2318
24- CompanyProperties . Example ( ) ;
19+ Contacts . Example ( api ) ;
2520
26- EmailSubscriptions . Example ( ) ;
21+ CompanyProperties . Example ( api ) ;
22+
23+ EmailSubscriptions . Example ( api ) ;
2724 }
2825 }
2926}
You can’t perform that action at this time.
0 commit comments