コード例 #1
0
        public string URLGetImage(string url, AlchemyAPI_ImageParams parameters)
        {
            CheckURL(url);
            parameters.setUrl(url);

            return(GET("URLGetImage", "url", parameters));
        }
コード例 #2
0
        public string HTMLGetImage(string html, string url, AlchemyAPI_ImageParams parameters)
        {
            CheckHTML(html, url);
            parameters.setHtml(html);
            parameters.setUrl(url);

            return(POST("HTMLGetImage", "html", parameters));
        }
コード例 #3
0
ファイル: image.cs プロジェクト: jorik041/alchemyapi_csharp
    public static void Main()
    {
        // Create an AlchemyAPI object.
        AlchemyAPI.AlchemyAPI alchemyObj = new AlchemyAPI.AlchemyAPI();

        // Load an API key from disk.
        alchemyObj.LoadAPIKey("api_key.txt");

        AlchemyAPI_ImageParams prms = new AlchemyAPI_ImageParams();
        prms.ImageMode = PageImageMode.AlwaysInfer;

        string xml = alchemyObj.URLGetImage("http://www.theguardian.com/world/2013/dec/01/ukraine-largest-street-protests-orange-revolution", prms);

        Console.WriteLine(xml);
    }
コード例 #4
0
        public string URLGetImage(string url, AlchemyAPI_ImageParams parameters)
        {
            CheckURL(url);
            parameters.setUrl(url);

            return GET ("URLGetImage", "url", parameters);
        }
コード例 #5
0
        public string HTMLGetImage(string html, string url, AlchemyAPI_ImageParams parameters)
        {
            CheckHTML(html, url);
            parameters.setHtml(html);
            parameters.setUrl(url);

            return POST ("HTMLGetImage", "html", parameters);
        }