You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
24 lines
633 B
24 lines
633 B
using Flurl;
|
|
|
|
namespace TrashLib.Config
|
|
{
|
|
internal class ServerInfo : IServerInfo
|
|
{
|
|
private readonly IConfigurationProvider _configProvider;
|
|
public string ApiKey => _configProvider.ActiveConfiguration.ApiKey;
|
|
public string BaseUrl => _configProvider.ActiveConfiguration.BaseUrl;
|
|
|
|
public ServerInfo(IConfigurationProvider configProvider)
|
|
{
|
|
_configProvider = configProvider;
|
|
}
|
|
|
|
public string BuildUrl()
|
|
{
|
|
return BaseUrl
|
|
.AppendPathSegment("api/v3")
|
|
.SetQueryParams(new {apikey = ApiKey});
|
|
}
|
|
}
|
|
}
|