So i´ve recently tried working with an api for the first time and i really don´t know what to do with the this api: https://skinbaron.de/misc/apidoc/ .I have already looked tutorials on how to call an api in c# but i still don´t really get what i have to do in my specific case. I´ve tried this: How do I make calls to a REST api using C#?
This question might seem stupid to people that know how to work with stuff like this but i have no expierence with api´s so far.
The exact code i´ve tried:
private const string URL = "https://api.skinbaron.de/";
private static string urlParameters = "?api_key=123"; // I have replaced the "123" with my apikey
static void Main(string[] args)
{
HttpClient client = new HttpClient();
client.BaseAddress = new Uri(URL);
client.DefaultRequestHeaders.Accept.Add(
new MediaTypeWithQualityHeaderValue("application/json"));
HttpResponseMessage response = client.GetAsync(urlParameters).Result;
if (response.IsSuccessStatusCode)
{
// do something
}
else
{
Console.WriteLine("{0} ({1})", (int)response.StatusCode, response.ReasonPhrase);
}
client.Dispose();
}