Authentication information passed as dependency to FlickrContext

Dec 26, 2009 at 11:19 PM

Hi, I just posted an update that allows one to use the FlickrContext to run queries without being tied to configuration.  The following is a statement that I'm able to run in LinqPad, without the benefit of App.config or anything of the like.

    var authenticationInformation = new AuthenticationInformation

        FlickrSettings = new FlickrSettings { ApiKey = "YOUR API KEY", SecretKey = "YOUR SECRET KEY" },
        AuthToken = new AuthToken()
            FullName = "Darren Cauthon",
            Id = "YOUR AUTH ID",
            Perm = "Write",
            UserId = "YOUR USER ID",

    var context = new FlickrContext(authenticationInformation);

    var query = (from photo in context.Photos
                 where photo.User == "darrencauthon"
                 select photo).Take(100).Skip(2);
    var count = query.Count();