GetItems() public method

Retrieve all items in a gallery, along with some other info (url and title).
public GetItems ( String cookieHeader, String galleryReaderId ) : void
cookieHeader String
galleryReaderId String The reader id (public) of the gallery.
return void
示例#1
0
        /// <summary>
        /// This method
        /// </summary>
        private static void TestGetItems()
        {
            // create the API
            MinusApi api = new MinusApi(API_KEY);

            // setup the success handler for GetItems operation
            api.GetItemsComplete += delegate(MinusApi sender, GetItemsResult result)
            {
                Console.WriteLine("Gallery items successfully retrieved!\n---");
                Console.WriteLine("Read-only URL: " + result.ReadonlyUrl);
                Console.WriteLine("Title: " + result.Title);
                Console.WriteLine("Items:");
                foreach (String item in result.Items)
                {
                    Console.WriteLine(" - " + item);
                }
            };

            // setup the failure handler for the GetItems operation
            api.GetItemsFailed += delegate(MinusApi sender, Exception e)
            {
                // don't do anything else...
                Console.WriteLine("Failed to get items from gallery...\n" + e.Message);
            };

            // trigger the GetItems operation - notice the extra "m" in there.
            // while the REAL reader id is "vgkRZC", the API requires you to put the extra "m" in there
            api.GetItems("mvgkRZC");
        }