FlickrNet.Flickr.PhotosGetContext C# (CSharp) Method

PhotosGetContext() public method

Gets the context of the photo in the users photostream.
public PhotosGetContext ( string photoId ) : Context
photoId string The ID of the photo to return the context for.
return Context
        public Context PhotosGetContext(string photoId)
        {
            Hashtable parameters = new Hashtable();
            parameters.Add("method", "flickr.photos.getContext");
            parameters.Add("photo_id", photoId);

            FlickrNet.Response response = GetResponseCache(parameters);

            if( response.Status == ResponseStatus.OK )
            {
                Context c = new Context();
                c.Count = response.ContextCount.Count;
                c.NextPhoto = response.ContextNextPhoto;
                c.PreviousPhoto = response.ContextPrevPhoto;

                return c;
            }
            else
            {
                throw new FlickrException(response.Error);
            }
        }
Flickr