Skip to content

2.0.0 #2

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 32 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
d0a2334
Implement setpassword
Alexr03 Jan 17, 2021
f9dbdb4
Comment test
Alexr03 Jan 17, 2021
e584137
Update publish.yml
Alexr03 Jan 17, 2021
8a6798e
Fix circular ref
Alexr03 Jan 17, 2021
ab221d6
Merge remote-tracking branch 'origin/dev-1.0.1' into dev-1.0.1
Alexr03 Jan 17, 2021
4e74f26
Implemented querying
Alexr03 Jan 18, 2021
c202d15
Interfaced query operations
Alexr03 Jan 18, 2021
e0fcbdc
Better querying
Alexr03 Jan 23, 2021
fc73cd8
Implemented Server
Alexr03 Jan 23, 2021
3483d63
Implemented Services search
Alexr03 Jan 23, 2021
f42cac5
Object relationships
Alexr03 Jan 23, 2021
d71ded8
Json Ignore new properties
Alexr03 Jan 23, 2021
a67ca9a
Implemented service suspend/unsuspend
Alexr03 Jan 23, 2021
eb6e4c9
Remove supression
Alexr03 Jan 23, 2021
c585669
Implemented settings
Alexr03 Jan 23, 2021
89db08e
Workflows update
Alexr03 Jan 23, 2021
6d999a3
Update release
Alexr03 Jan 23, 2021
2fe65c3
Asynchronous based.
Alexr03 Feb 5, 2021
a38cf1b
Remove blocker
Alexr03 Feb 5, 2021
b666f98
Update Publish - Dev.yml
Alexr03 Feb 5, 2021
478861a
Allow controller access statically
Alexr03 Feb 20, 2021
e3c7d42
Internal Logger
Alexr03 Feb 20, 2021
0237670
Improvements
Alexr03 Mar 1, 2021
f0df70b
Improvements
Alexr03 Mar 2, 2021
1da74e0
Custom field support
Alexr03 Sep 19, 2021
7e7a3e6
Fix get by user id
Alexr03 Sep 19, 2021
4198e6d
Build update
Alexr03 Sep 19, 2021
92363c9
Initial dev 2.0.0
Alexr03 Jun 30, 2022
d4823fc
Remove property
Alexr03 Jun 30, 2022
79203f3
Update
Alexr03 Jul 7, 2022
66fa58d
Include image
Alexr03 Jul 7, 2022
97834b8
Implement file manager delete
Alexr03 Jul 7, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 27 additions & 0 deletions .github/workflows/Publish - Dev.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: Dev - Build + Publish

on:
push:
branches: [ dev-*, dev/**, develop, develop/* ]

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Setup .NET
uses: actions/setup-dotnet@v1
with:
dotnet-version: 6.0.x

- name: Build Nuget Packages
run: "mkdir build && dotnet pack -p:IncludeSymbols=true -p:SymbolPackageFormat=snupkg --include-source -o build -p:VersionSuffix='nightly' -p:BuildNumber=0$((${{ github.run_number }} ))"

- name: Publish Nuget Packages
run: "dotnet nuget push \"build/*\" -k ${{ secrets.ALEX_NUGET_API_KEY }} -s https://api.nuget.org/v3/index.json"

- name: "Upload Nuget Packages To Github Actions"
uses: actions/upload-artifact@v3
with:
name: PR Nuget Packages
path: build/*
28 changes: 28 additions & 0 deletions .github/workflows/Publish - Release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Release - Build + Deploy

on:
push:
branches: [ master ]

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Setup .NET
uses: actions/setup-dotnet@v1
with:
dotnet-version: 5.0.100
- name: Restore dependencies
run: dotnet restore
- name: Build
run: dotnet build --no-restore
- name: Test
run: dotnet test --no-build --verbosity normal
- name: Deploy - Release
uses: alexr03/publish-nuget@master
with:
PROJECT_FILE_PATH: TCAdminApiSharp/TCAdminApiSharp.csproj
NUGET_KEY: ${{secrets.ALEX_NUGET_API_KEY}}
VERSION_REGEX: ^\s*<AssemblyVersion>(.*)<\/AssemblyVersion>\s*$
TAG_VERSION: release-v*-${{steps.datetime.outputs.date}}-${{github.run_number}}
41 changes: 0 additions & 41 deletions .github/workflows/publish.yml

This file was deleted.

2 changes: 1 addition & 1 deletion .idea/.idea.TCAdminApiSharp/.idea/indexLayout.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 0 additions & 14 deletions .idea/.idea.TCAdminApiSharp/.idea/riderModule.iml

This file was deleted.

31 changes: 15 additions & 16 deletions TCAdminApiSharp.Tests/ClientTests.cs
Original file line number Diff line number Diff line change
@@ -1,26 +1,25 @@
using System;
using NUnit.Framework;

namespace TCAdminApiSharp.Tests
namespace TCAdminApiSharp.Tests;

public class ClientTests
{
public class ClientTests
[Test]
public void CreateClientWithoutHost()
{
[Test]
public void CreateClientWithoutHost()
Assert.Catch<ArgumentException>(() =>
{
Assert.Catch<ArgumentException>(() =>
{
var _ = new TcaClient("", "-");
});
}
var _ = new TcaClient("", "-");
});
}

[Test]
public void CreateClientWithoutToken()
[Test]
public void CreateClientWithoutToken()
{
Assert.Catch<ArgumentException>(() =>
{
Assert.Catch<ArgumentException>(() =>
{
var _ = new TcaClient("https://4a815e4e-aaa8-4351-a948-5ca3f92e5c8b.mock.pstmn.io", "");
});
}
var _ = new TcaClient("https://4a815e4e-aaa8-4351-a948-5ca3f92e5c8b.mock.pstmn.io", "");
});
}
}
39 changes: 39 additions & 0 deletions TCAdminApiSharp.Tests/ServerTests.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
using System.Threading.Tasks;
using Microsoft.Extensions.Configuration;
using NUnit.Framework;

namespace TCAdminApiSharp.Tests;

public class ServerTests
{
private TcaClient _tcaClient;

[SetUp]
public void Setup()
{
var config = new ConfigurationBuilder().AddJsonFile("appsettings.json")
.AddJsonFile("appsettings.local.json", true)
.Build().GetSection("TCAdmin");
var activeProfile = config["ActiveProfile"];
var profileSection = config.GetSection("Profiles").GetSection(activeProfile);
var host = profileSection["Host"];
var key = profileSection["Key"];
_tcaClient = new TcaClient(host, key, TcaClientSettings.Debug);
}

[Test]
public async Task GetServerTest()
{
var server = await _tcaClient.ServersController.GetServer(1);
Assert.AreEqual("Master", server.Name);
}

// [Test]
// public async Task GetServersTest()
// {
// var server = await _tcaClient.ServersController.GetServers();
// Assert.IsTrue(server.Success);
// Assert.AreEqual(1, server.Result.Count);
// Assert.AreEqual("Master", server.Result[0].Name);
// }
}
Loading