Exemplo n.º 1
0
        static void Main(string[] args)
        {
            var ms = new MoodStocksWrapper("api key", "secret key");

            //echo
            var echo = ms.Echo("test=1&hello=world");

            Console.WriteLine(echo);

            //upload an image
            using (var fs = File.OpenRead("[Path to Image you wish to upload]")) {
                var addimage = ms.AddImage("your id you wish to use", fs);
                Console.WriteLine(addimage);
            }

            //search for an image
            using (var fs = File.OpenRead("[Path to Image you wish to search]")) {
                var search = ms.Search(fs);
                Console.WriteLine(search);
            }

            //remove an image
            var remove = ms.RemoveImage("your id you wish to use");

            Console.WriteLine(remove);

            Console.WriteLine("Press any key to exit");
            Console.ReadLine();
        }
Exemplo n.º 2
0
        static void Main(string[] args)
        {
            var ms = new MoodStocksWrapper("api key", "secret key");

            //echo
            var echo = ms.Echo("test=1&hello=world");

            Console.WriteLine(echo);

            //upload an image
            using (var fs = File.OpenRead("[Path to Image you wish to upload]")) {
                var addimage = ms.AddImage("your id you wish to use", fs);
                Console.WriteLine(addimage);
            }

            //search for an image
            using (var fs = File.OpenRead("[Path to Image you wish to search]")) {
                var search = ms.Search(fs);
                Console.WriteLine(search);
            }

            //remove an image
            var remove = ms.RemoveImage("your id you wish to use");
            Console.WriteLine(remove);

            Console.WriteLine("Press any key to exit");
            Console.ReadLine();
        }