-
Notifications
You must be signed in to change notification settings - Fork 16
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 #61 from conductor-sdk/fix-readme
Fixed README to be up to date
- Loading branch information
Showing
6 changed files
with
72 additions
and
28 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
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,23 @@ | ||
using Conductor.Client.Authentication; | ||
|
||
namespace Conductor.Client | ||
{ | ||
public class OrkesApiClient | ||
{ | ||
private Configuration _configuration = null; | ||
|
||
public OrkesApiClient(Configuration configuration, OrkesAuthenticationSettings orkesAuthenticationSettings) | ||
{ | ||
_configuration = configuration; | ||
if (orkesAuthenticationSettings != null) | ||
{ | ||
configuration.AuthenticationSettings = orkesAuthenticationSettings; | ||
} | ||
} | ||
|
||
public T GetClient<T>() where T : IApiAccessor, new() | ||
{ | ||
return _configuration.GetClient<T>(); | ||
} | ||
} | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
using Conductor.Api; | ||
using Conductor.Client; | ||
using Tests.Util; | ||
using Xunit; | ||
|
||
namespace Tests.Client | ||
{ | ||
public class OrkesApiClientTest | ||
{ | ||
[Fact] | ||
public void TestOrkesApiClient() | ||
{ | ||
var configuration = ApiUtil.GetConfiguration(); | ||
var orkesApiClient = new OrkesApiClient(configuration, null); | ||
var workflowClient = orkesApiClient.GetClient<WorkflowResourceApi>(); | ||
var expectedWorkflowClient = configuration.GetClient<WorkflowResourceApi>(); | ||
var token = workflowClient.Configuration.AccessToken; | ||
var expectedToken = expectedWorkflowClient.Configuration.AccessToken; | ||
Assert.Equal(expectedToken, token); | ||
} | ||
} | ||
} |
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