Implemented Artist HTTP endpoint functionality. #21 and #26

This commit is contained in:
amazing-username
2019-05-10 22:21:30 -04:00
parent 0c4a1612b1
commit a3c74b50bc
11 changed files with 224 additions and 102 deletions
+5 -3
View File
@@ -43,14 +43,15 @@ namespace Icarus.Controllers.Managers
var tokenRequest = RetrieveTokenRequest();
var tokenObject = JsonConvert.SerializeObject(tokenRequest);
request.AddParameter("application/json; charset=utf-8",
tokenObject, ParameterType.RequestBody);
tokenObject, ParameterType.RequestBody);
request.RequestFormat = DataFormat.Json;
IRestResponse response = client.Execute(request);
var tokenResult = JsonConvert
.DeserializeObject<Token>(response.Content);
.DeserializeObject<Token>(response.Content);
return new LoginResult
{
@@ -81,9 +82,9 @@ namespace Icarus.Controllers.Managers
_grantType = "client_credentials";
_url = $"https://{_config["Auth0:Domain"]}";
//PrintCredentials();
}
#region Testing Methods
// For testing purposes
private void PrintCredentials()
{
@@ -94,6 +95,7 @@ namespace Icarus.Controllers.Managers
Console.WriteLine($"Url: {_url}");
}
#endregion
#endregion
#region Classes