How to Build the Flickr API for Silverlight

  1. Download the source code, or use SVN to check out the source tree using this URL: https://flickr4sl.svn.codeplex.com/svn/trunk
  2. Download the source for the WCF REST Extensions for Silverlight project
  3. Open the FlickrSL Solution
  4. Update to Path for the SilverlightRestServices project

How to Create & Use a Flickr Channel

    FlickrSecurity.ApiKey = "{YOUR API KEY HERE}";

    ChannelFactory<Flickr> factory = new ChannelFactory<Flickr>(new RestBinding(), new EndpointAddress("http://api.flickr.com/"));
    factory.Open();

    Flickr channel = factory.CreateChannel();

    channel.BeginTest_Echo(new EchoParameterCollection("foo", "bar", "bas", "42"),
        delegate(IAsyncResult result)
        {
            try
            {
                FlickrResponse<EchoResponse> response = channel.EndTest_Echo(result);

                Dispatcher.BeginInvoke(delegate { MessageBox.Show(response.Element.Members["foo"]); });
            }
            catch (Exception err)
            {
                Dispatcher.BeginInvoke(delegate { MessageBox.Show(err.Message); });
            }
        }, null);


See the FlickrSLTest project for more examples of invoking various methods.

How to Login & Make Authenticated Requests

TODO: I still need to write this section.

List of Implemented Methods

  • Authentication
    • CheckToken
    • GetFrob
    • GetToken
  • Photos
    • GetAllContexts
    • GetContext
    • GetExif
    • GetPhotoInfo
    • GetRecent
    • GetSizes
  • Photosets
    • GetList
    • GetPhotosetInfo
    • GetPhotos
  • Test
    • Echo
    • Login

Last edited Jul 30, 2010 at 7:45 PM by sflanker, version 2

Comments

No comments yet.