Example Code

            
// C# Code Snippet -- AdGooroo Insights API Request Client
// Code utiilizes .NET 4.5
// The pattern of the base URL is always: https://industry.adgooroo.com/api/v3/
// Services documentation: https://industry.adgooroo.com/api/v3/Docs/DataServices

// Requesting
string baseURL = "https://industry.adgooroo.com/api/v3/Campaigns/12345";

// Any required/optional filters are passed in as URL parameters
// example: "?AdvertiserID=12345&StartDate=2014-01-01&EndDate=2014-03-30";
string parameterList = "";
            
//1. Create an HttpClient object
HttpClient client = new HttpClient();

//2. Assign its BaseAddress property to a new URI created from the baseURL
client.BaseAddress = new Uri(baseURL);

//3. Add 4 request header entries: 
//      ApiUser
//      Password
//      ApiKey
//      Accept (the desired format -- "application/json" or "application/xml")
client.DefaultRequestHeaders.Add("ApiUser", "--YOUR API USERNAME HERE--");
client.DefaultRequestHeaders.Add("Password", "--YOUR API PASSWORD HERE--");
client.DefaultRequestHeaders.Add("ApiKey", "--YOUR API KEY HERE--");
client.DefaultRequestHeaders.Accept.Add(
    new MediaTypeWithQualityHeaderValue("application/json"));

//4. Set up an HttpResponseMessage variable 
//   and assign it the Result of GetAsync(parameterList) 
HttpResponseMessage response = client.GetAsync(parameterList).Result;

Console.WriteLine(response.StatusCode);
Console.ReadLine();

//5. Check the response status
if (response.IsSuccessStatusCode)
{
    //Parse the results (in this case simply writing it out to the console)
    string result = response.Content.ReadAsStringAsync().Result;
    Console.WriteLine(result);
    Console.ReadLine();
}
else if (response.StatusCode == System.Net.HttpStatusCode.NotFound)
{
    //HTTP 404 - Not Found is returned if there was no data along with a message
    string errorMessage = response.ReasonPhrase;
    Console.WriteLine(errorMessage);
    Console.ReadLine();
}
        
            
Coming Soon...