-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #9 from EasyAbp/region
Use `Region` in `AbpTencentCloudCommonOptions`
- Loading branch information
Showing
17 changed files
with
117 additions
and
37 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,7 +6,7 @@ on: | |
- main | ||
jobs: | ||
publish: | ||
runs-on: windows-latest | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: NuGet/setup-nuget@v1 | ||
|
@@ -38,36 +38,37 @@ jobs: | |
# run: dotnet test -c Release --no-restore --no-build | ||
|
||
- name: dotnet pack | ||
run: dotnet pack -c Release --no-build -o dest | ||
run: dotnet pack -c Release --no-build --property PackageOutputPath=${{ github.workspace }}/nugetPackages/ | ||
|
||
- name: remove unused packages | ||
run: | | ||
cd dest | ||
del * -Exclude EasyAbp.* | ||
del * -Exclude *.${{ steps.getVersion.outputs.first_match }}.nupkg | ||
del *.Blazor.Host.* | ||
del *.Blazor.Server.Host.* | ||
del *.Host.Shared.* | ||
del *.HttpApi.Host.* | ||
del *.IdentityServer.* | ||
del *.AuthServer.* | ||
del *.Web.Host.* | ||
del *.Web.Unified.* | ||
del *.HttpApi.Client.ConsoleTestApp.* | ||
del *.Tests.* | ||
del *.TestBase.* | ||
dir -name | ||
cd ${{ github.workspace }}/nugetPackages | ||
shopt -s extglob | ||
rm -f !(EasyAbp.*) | ||
rm -f !(*.${{ steps.getVersion.outputs.first_match }}.nupkg) | ||
rm -f *.Blazor.Host.* | ||
rm -f *.Blazor.Server.Host.* | ||
rm -f *.Host.Shared.* | ||
rm -f *.HttpApi.Host.* | ||
rm -f *.IdentityServer.* | ||
rm -f *.AuthServer.* | ||
rm -f *.Web.Host.* | ||
rm -f *.Web.Unified.* | ||
rm -f *.HttpApi.Client.ConsoleTestApp.* | ||
rm -f *.Tests.* | ||
rm -f *.TestBase.* | ||
ls | ||
- name: dotnet nuget push to GitHub | ||
uses: tanaka-takayoshi/[email protected] | ||
with: | ||
nupkg-path: 'dest\*.nupkg' | ||
nupkg-path: '${{ github.workspace }}/nugetPackages/*.nupkg' | ||
repo-owner: 'EasyAbp' | ||
gh-user: 'EasyAbp' | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: dotnet nuget push to NuGet | ||
run: dotnet nuget push dest\*.nupkg -k ${{secrets.NUGET_API_KEY}} -s https://api.nuget.org/v3/index.json --skip-duplicate | ||
run: dotnet nuget push ${{ github.workspace }}/nugetPackages/*.nupkg -k ${{secrets.NUGET_API_KEY}} -s https://api.nuget.org/v3/index.json --skip-duplicate | ||
|
||
- name: determine if the tag exists | ||
uses: mukunku/[email protected] | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
25 changes: 25 additions & 0 deletions
25
src/EasyAbp.Abp.TencentCloud.Sms/SmsTemplates/DescribeSmsTemplateListRequest.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
using EasyAbp.Abp.TencentCloud.Common.Models; | ||
|
||
namespace EasyAbp.Abp.TencentCloud.Sms.SmsTemplates | ||
{ | ||
public class DescribeSmsTemplateListRequest : CommonRequest | ||
{ | ||
public DescribeSmsTemplateListRequest( | ||
bool international, | ||
int[] templateIdSet, | ||
int? limit = null, | ||
int? offset = null) | ||
{ | ||
SetAction("DescribeSmsTemplateList"); | ||
SetVersion("2021-01-11"); | ||
|
||
SetRequestBody(new | ||
{ | ||
International = international ? 1 : 0, | ||
TemplateIdSet = templateIdSet, | ||
Limit = limit, | ||
Offset = offset | ||
}); | ||
} | ||
} | ||
} |
27 changes: 27 additions & 0 deletions
27
src/EasyAbp.Abp.TencentCloud.Sms/SmsTemplates/DescribeSmsTemplateListResponse.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
using System.Collections.Generic; | ||
using EasyAbp.Abp.TencentCloud.Common.Models; | ||
|
||
namespace EasyAbp.Abp.TencentCloud.Sms.SmsTemplates | ||
{ | ||
public class DescribeSmsTemplateListResponse : CommonResponse | ||
{ | ||
public List<DescribeTemplateStatusSet> DescribeTemplateStatusSet { get; set; } | ||
} | ||
|
||
public class DescribeTemplateStatusSet | ||
{ | ||
public int TemplateId { get; set; } | ||
|
||
public int International { get; set; } | ||
|
||
public int StatusCode { get; set; } | ||
|
||
public string ReviewReply { get; set; } | ||
|
||
public string TemplateName { get; set; } | ||
|
||
public string CreateTime { get; set; } | ||
|
||
public string TemplateContent { get; set; } | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
31 changes: 31 additions & 0 deletions
31
test/EasyAbp.Abp.TencentCloud.Sms.Tests/DescribeSmsTemplateListTests.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
using System.Threading.Tasks; | ||
using EasyAbp.Abp.TencentCloud.Sms.SmsTemplates; | ||
using Shouldly; | ||
using Xunit; | ||
|
||
namespace EasyAbp.Abp.TencentCloud.Sms.Tests | ||
{ | ||
public class DescribeSmsTemplateListTests : AbpTencentCloudSmsTestBase | ||
{ | ||
[Fact] | ||
public async Task DescribeTemplateStatusSetTest() | ||
{ | ||
var result = await TencentCloudApiRequester.SendRequestAsync<DescribeSmsTemplateListResponse>( | ||
new DescribeSmsTemplateListRequest( | ||
false, | ||
new[] { 1039198, 686954 }), | ||
TencentCloudSmsOptions.EndPoint); | ||
|
||
result.ShouldNotBeNull(); | ||
result.Error.ShouldBeNull(); | ||
result.DescribeTemplateStatusSet.ShouldNotBeEmpty(); | ||
result.DescribeTemplateStatusSet.Count.ShouldBe(2); | ||
result.DescribeTemplateStatusSet.ShouldContain(x => | ||
x.TemplateId == 1039198 && x.StatusCode == 0 && x.TemplateName == "绑定手机验证码" && | ||
x.TemplateContent == "您正在进行绑定手机操作,{1} 为您的验证码,如非本人操作,请忽略本短信。"); | ||
result.DescribeTemplateStatusSet.ShouldContain(x => | ||
x.TemplateId == 686954 && x.StatusCode == 0 && x.TemplateName == "验证码" && | ||
x.TemplateContent == "验证码为:{1},您正在登录,若非本人操作,请勿泄露。"); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters