C# (.Net) client library

How to use the Image Search API with C# (.Net)

Use C#(.Net) client library to integrate Image API into your C#(.Net) application

public static void Test()
    //Replace the following string value with your valid X-RapidAPI-Key.
    string Your_X_RapidAPI_Key = "xxxxxxxxxxxxxxxxxxxxx";

    //The query parameters: (update according to your search query)
    string q = "Taylor%20Swift"; //the search query
    int pageNumber = 1; //the number of requested page
    int pageSize = 10; //the size of a page
    bool autoCorrect = true; //autoCorrectspelling
    bool safeSearch = false; //filter results for adult content

    //Perform the web request and get the response
    var response = Unirest.get(string.Format("https://contextualwebsearch-websearch-v1.p.rapidapi.com/api/Search/ImageSearchAPI?q={0}&;pageNumber={1}&;pageSize={2}&;autoCorrect={3}&safeSearch={4}", q, pageNumber, pageSize, autoCorrect, safeSearch))
    .header("X-RapidAPI-Key", Your_X_RapidAPI_Key)

     //Get the ResponseBody as a JSON
    dynamic jsonBody = JsonConvert.DeserializeObject(response.Body);

    //Get the number of items returned
    int totalCount = (int)jsonBody["totalCount"];

    //Go over each resulting item
    foreach (var image in jsonBody["value"])
        //Get the image
        string imageUrl = image["url"].ToString();
        int imageHeight = (int)image["height"];
        int imageWidth = (int)image["width"];

        //Get the image thumbail
        string thumbnail = image["thumbnail"].ToString();
        int thumbnailHeight = (int)image["thumbnailHeight"];
        int thumbnailWidth = (int)image["thumbnailWidth"];

        Console.WriteLine(string.Format("imageUrl: {0}. imageHeight: {1}. imageWidth: {2}",