Athena (1.3)

Rating: No reviews yet
Downloads: 267
Released: May 5, 2008
Updated: Jul 28, 2008 by mehfuzh
Dev status: -not yet defined by owner-

Recommended Download

Source Code LINQ.Flickr-Src
source code, 484K, uploaded May 18, 2008 - 172 downloads

Other Available Downloads

Application LINQ.Flickr.Lib
application, 35K, uploaded May 18, 2008 - 95 downloads

Release Notes

The release stands on new features, code optimization and making the api Mock compatible.

Features

Query, add or delete comments for photo

Comment  comment = new Comment { PhotoId = "someId", Text="This is nice"};

_context.Photos.Comments.Add(comment);
_context.SubmitChanges();

var query = from cm in _context.Photos.Comments
                  where  cm .PhotoId == 'someId' && cm .Id == comment.Id
                  Select cm;

comment = query.Single();

_context.Photos.Comment.Remove(comment);
_context.SubmitChanges();



Find people either by username or nsid

var query = from people in _context.People
where people.Username == 'someusername'
or 
var query = from people in _context.People
where people.Id == 'nsId'



Query Popular tags by their score , order them by score, title or period duration

var query = from tag in _content.PopularTags
where tag.count == 30 order by tag.title
select tag;



Result : 30 most popular tags , ordered by title.

Search photo with tags using AND or Or selection

var query = from ph in _context.photos
where ph.SearchMode == SearchMode.TagOnly && ph.SearchText =='microsoft surface' && ph.TagMode == TagMode.AND


Result : return photos having both microsoft and surface tag in common.

Mock engine support

Refactored the codebase to support Mock engine (Typemock) to fake out the repository for Unit Test .

Tiny enhancement

var query = from ph in _context.Photos
                  where ph.Id == 'xxxx'
                  select ph;

This is a single mode query , behind the c it calls flickr.photos.getInfo, which has Tags and Owner element in response.

Therefore.
Photo photo = ph.Single();

photo.User = "Will have the username retued by getInfo";
photo.Tags  = "Will have the array of tags.";

While getting multiple photos, we might need to know page number, total photos, total pages and 
per page item count.These are stored under Photo.SharedProperty.




Error On_Error enhancement, as a part of LinqExtender.
_context.Photos.OnError += new LinqExtender.Query<Photo>.ErrorHandler(Photos_OnError);

/*Inside Photos_OnError*/


void Photos_OnError(ProviderException ex)
{
   string message =ex.Message;
   string stackTrace =ex.StackTrace;
}

/* All query object inherits the changes of LinqExtender */

_context.Photos.Comments.OnError
_context.Photos.Peoples

/*All have the OnError handler */



Misc

Optimized code where possible that eliminates any duplicate service call.

Note : To run the test project you will be needing Typmock isolator. You need to change the path in the Typemock.bat and run NUnit through it.

Updated on 12th May, 2008
Fixed unecessary calls to getFrob for public photos.

Updated on 18th May, 2008
OnError event changes.
Modfied the readme provided in LINQFlickr.Lib.

Reviews for this release

No reviews yet for this release.