Skip to content

Commit fb80df5

Browse files
authored
Set up CI with Azure Pipelines (#62)
Set up CI with Azure Pipelines, updated some code from a PR targeting `EmailEvents` to fit the latest codebase
1 parent d3c5033 commit fb80df5

File tree

5 files changed

+50
-9
lines changed

5 files changed

+50
-9
lines changed

HubSpot.NET/Api/EmailEvents/HubSpotEmailEventsApi.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ public HubSpotEmailEventsApi(IHubSpotClient client)
3131
{
3232
var path = $"{(new T()).RouteBasePath}/{campaignId}"
3333
.SetQueryParam("appId", appId);
34-
var data = _client.Execute<T>(path, Method.GET, convertToPropertiesSchema: false);
34+
var data = _client.Execute<T>(path, Method.GET);
3535
return data;
3636
}
3737

@@ -56,7 +56,7 @@ public HubSpotEmailEventsApi(IHubSpotClient client)
5656
path = path.SetQueryParam("offset", opts.Offset);
5757
}
5858

59-
var data = _client.ExecuteList<EmailCampaignListHubSpotModel<T>>(path, opts, convertToPropertiesSchema: false);
59+
var data = _client.Execute<EmailCampaignListHubSpotModel<T>>(path);
6060

6161
return data;
6262
}
@@ -82,7 +82,7 @@ public HubSpotEmailEventsApi(IHubSpotClient client)
8282
path = path.SetQueryParam("offset", opts.Offset);
8383
}
8484

85-
var data = _client.ExecuteList<EmailCampaignListHubSpotModel<T>>(path, opts, convertToPropertiesSchema: false);
85+
var data = _client.Execute<EmailCampaignListHubSpotModel<T>>(path);
8686

8787
return data;
8888
}

HubSpot.NET/Api/Engagement/HubSpotEngagementApi.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ public EngagementHubSpotModel GetById(long engagementId)
5353
/// <returns>List of engagements, with additional metadata, e.g. total</returns>
5454
public EngagementListHubSpotModel<T> List<T>(EngagementListRequestOptions opts = null) where T: EngagementHubSpotModel
5555
{
56-
opts = opts ?? new EngagementListRequestOptions();
56+
opts = opts ?? new EngagementListRequestOptions();
5757

5858
var path = $"{GetRoute<T>("paged")}".SetQueryParam("limit", opts.Limit);
5959

@@ -70,7 +70,7 @@ public EngagementListHubSpotModel<T> List<T>(EngagementListRequestOptions opts =
7070
/// <returns>List of engagements, with additional metadata, e.g. total</returns>
7171
public EngagementListHubSpotModel<T> ListRecent<T>(EngagementListRequestOptions opts = null) where T : EngagementHubSpotModel
7272
{
73-
opts ??= new EngagementListRequestOptions();
73+
opts = opts ?? new EngagementListRequestOptions();
7474

7575
var path = $"{GetRoute<T>()}/engagements/recent/modified".SetQueryParam("count", opts.Limit);
7676

HubSpot.NET/Core/HubSpotApi.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
using HubSpot.NET.Api.Company;
44
using HubSpot.NET.Api.Contact;
55
using HubSpot.NET.Api.Deal;
6+
using HubSpot.NET.Api.EmailEvents;
67
using HubSpot.NET.Api.EmailSubscriptions;
78
using HubSpot.NET.Api.Engagement;
89
using HubSpot.NET.Api.Files;
@@ -27,7 +28,7 @@ public class HubSpotApi : IHubSpotApi
2728
public IHubSpotCosFileApi File { get; private set; }
2829
public IHubSpotOwnerApi Owner { get; private set; }
2930
public IHubSpotCompanyPropertiesApi CompanyProperties { get; private set; }
30-
31+
public IHubSpotEmailEventsApi EmailEvents { get; private set; }
3132
public IHubSpotEmailSubscriptionsApi EmailSubscriptions { get; private set; }
3233
public IHubSpotTimelineApi Timelines { get; private set; }
3334

HubSpot.NET/HubSpot.NET.csproj

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,18 +8,18 @@
88
<Company>HubSpot.NET</Company>
99
<Description>C# .NET client library targeting the HubSpot APIs.</Description>
1010
<Copyright>HubSpot.NET</Copyright>
11-
<PackageLicenseUrl>https://github.com/squaredup/HubSpot.NET/blob/master/LICENSE</PackageLicenseUrl>
11+
<PackageLicenseUrl>https://github.com/hubspot-net/HubSpot.NET/blob/master/LICENSE</PackageLicenseUrl>
1212
<PackageProjectUrl>https://github.com/hubspot-net/HubSpot.NET</PackageProjectUrl>
1313
<RepositoryUrl>https://github.com/hubspot-net/HubSpot.NET.git</RepositoryUrl>
1414
<PackageTags>hubspot api wrapper c# contact company deal engagement properties crm</PackageTags>
1515
<PackageReleaseNotes>0.8.13</PackageReleaseNotes>
1616
<PackageId>HubSpot.NET</PackageId>
1717
</PropertyGroup>
1818
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU'">
19-
<LangVersion>7.1</LangVersion>
19+
<LangVersion>7.3</LangVersion>
2020
</PropertyGroup>
2121
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
22-
<LangVersion>7.1</LangVersion>
22+
<LangVersion>7.3</LangVersion>
2323
</PropertyGroup>
2424
<ItemGroup>
2525
<PackageReference Include="Flurl" Version="2.8.0" />

azure-pipelines.yml

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
# ASP.NET Core (.NET Framework)
2+
# Build and test ASP.NET Core projects targeting the full .NET Framework.
3+
# Add steps that publish symbols, save build artifacts, and more:
4+
# https://docs.microsoft.com/azure/devops/pipelines/languages/dotnet-core
5+
6+
trigger:
7+
branches:
8+
include:
9+
- master
10+
- refs/tags/*
11+
12+
pr:
13+
- master
14+
15+
pool:
16+
vmImage: 'windows-latest'
17+
18+
variables:
19+
solution: '**/*.sln'
20+
buildPlatform: 'Any CPU'
21+
buildConfiguration: 'Release'
22+
23+
steps:
24+
- task: NuGetToolInstaller@1
25+
26+
- task: NuGetCommand@2
27+
inputs:
28+
restoreSolution: '$(solution)'
29+
30+
- task: VSBuild@1
31+
inputs:
32+
solution: '$(solution)'
33+
msbuildArgs: '/p:DeployOnBuild=true /p:WebPublishMethod=Package /p:PackageAsSingleFile=true /p:SkipInvalidConfigurations=true /p:DesktopBuildPackageLocation="$(build.artifactStagingDirectory)\WebApp.zip" /p:DeployIisAppPath="Default Web Site"'
34+
platform: '$(buildPlatform)'
35+
configuration: '$(buildConfiguration)'
36+
37+
- task: VSTest@2
38+
inputs:
39+
platform: '$(buildPlatform)'
40+
configuration: '$(buildConfiguration)'

0 commit comments

Comments
 (0)