Initial C# SDK structure and interfaces
This commit is contained in:
26
Core/ChateniumClient.cs
Normal file
26
Core/ChateniumClient.cs
Normal file
@@ -0,0 +1,26 @@
|
||||
using Chtn.CSharpSDK.Interfaces;
|
||||
using System.Net.Http;
|
||||
using System;
|
||||
|
||||
namespace Chtn.CSharpSDK.Core
|
||||
{
|
||||
public class ChateniumClient
|
||||
{
|
||||
private readonly IKeyringAPI _keyring;
|
||||
private readonly IDatabaseAPI _database;
|
||||
private readonly HttpClient _httpClient;
|
||||
|
||||
public ChateniumClient(IKeyringAPI keyring, IDatabaseAPI database)
|
||||
{
|
||||
_keyring = keyring ?? throw new ArgumentNullException(nameof(keyring));
|
||||
_database = database ?? throw new ArgumentNullException(nameof(database));
|
||||
|
||||
_httpClient = new HttpClient();
|
||||
_httpClient.BaseAddress = new Uri("https://api.chatenium.hu");
|
||||
}
|
||||
public void initialize()
|
||||
{
|
||||
_keyring.Set("keyring", "anyad");
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user