I have been secretly preparing in my evil laboratory, a Cocoa framework that makes it ridiculously easy to use the recently-released Digg API.
A little sneak preview of some of the stuff you can do with it:
- (DiggObject *)fetchStoryWithID:(int)ID; - (DiggObject *)fetchStoryWithTitle:(NSString *)name; - (DiggObject *)fetchStoryWithURL:(NSString *)url; - (NSMutableArray *)fetchStoriesForDomain:(NSString *)domain; - (NSMutableArray *)fetchStoriesForTopic:(NSString *)topic; - (NSMutableArray *)fetchStoriesForContainer:(NSString *)container; - (NSMutableArray *)fetchStoriesSubmittedBy:(NSString *)user; - (NSMutableArray *)fetchPopular; - (NSMutableArray *)fetchRecent; - (NSMutableArray *)fetchStories; - (NSMutableArray *)fetchUpcoming;
It’s also just as easy to set the options or parameters that you would like to call the query with:
-(void)setAppkey:(NSString *)newAppkey; -(NSString *)appkey; -(NSString *)proxy; -(void)setProxy:(NSString *)newProxy; -(BOOL)single; -(void)setSingle:(BOOL)newSingle; -(int)count; -(void)setCount:(int)newCount; -(int)offset; -(void)setOffset:(int)newOffset; -(int)total; -(NSString *)domain; -(void)setDomain:(NSString *)newDomain; -(NSString *)sortBy; -(void)setSortBy:(NSString *)newSort; -(NSString *)status; - (void)setStatus:(NSString *)newStatus; - (NSString *)minSubmitDate; - (void)setMinSubmitDate:(NSString *)newMinSubmitDate; - (NSString *)maxSubmitDate; - (void)setMaxSubmitDate:(NSString *)newMaxSubmitDate; - (NSString *)minPromoteDate; - (void)setMinPromoteDate:(NSString *)newMinPromoteDate; - (NSString *)maxPromoteDate; - (void)setMaxPromoteDate:(NSString *)newMaxPromoteDate;
Currently the focus is on fetching stories, but fetching information for users, events (Diggs and comments), topics and containers will be written in shortly.
The only major thing lacking now is people to use the framework!
If you’re interested, drop a comment below and I’ll provide you with the necessary ammunition to create, fetch, parse and utilize Digg API calls with the ease of regular Objective-C Cocoa methods.
The official release date will depend on the response from the initial testers, so what are you waiting for? Ask me for a copy!
20 Comments so far
Leave a commentCool!
I’d love to try it out.
divulged by David Paul Robinson on April 24, 2007 9:48 pm | Permalink
I’d also really like to give it a try !
reasonded by Xavier on April 25, 2007 4:18 am | Permalink
Nice, it will be interesting to see what people do with it.
I’d like to try it out as well.
composed by Carl Porth on April 25, 2007 4:22 am | Permalink
What’s with the use of ‘get’-prefixed methods that don’t return values by reference - the valid use of ‘get’ in Cocoa methods? Is this a case of the API name fighting Cocoa conventions?
reasonded by Jesper on April 25, 2007 6:37 am | Permalink
Emailed the framework to David, Xavier and Carl…
Jesper, I used the “get” prefix to indicate that a remote connection would be created. If that’s not the greatest thing to do, I’ll be happy to change it.
voiced by Ankur on April 25, 2007 11:31 am | Permalink
It makes sense that there’s such a notation somewhere, but the get prefix in Cocoa specifically means and has always meant to return a value by pointer.
Like, in NSData:
- (void)getBytes:(void *)bufferHow about using “fetch” instead of get? It doesn’t conflict with any standard prefix and to me it conveys that something’s going to be retrieved from somewhere far away.
stated by Jesper on April 28, 2007 6:00 pm | Permalink
Ok, improvements are coming. Threading, parameters, delegation, and maybe some documentation.
The get / fetch thing will be ‘fixed’ too.
Still taking requests if anyone else wants a copy.
revealed by Ankur on April 30, 2007 4:09 pm | Permalink
Would love a copy please
spoken by iSlayer on April 30, 2007 7:04 pm | Permalink
I’d love to mess around with that too!
recorded by Oriol on April 30, 2007 9:50 pm | Permalink
Emailed to iSlayer and Oriol.
Updated quite a few things, but no threading / delegation yet, but a host of improvements, fixes and additions.
posted by Ankur on April 30, 2007 10:41 pm | Permalink
would love to take a look at it. Just getting into tis sort of thing.
stated by Cawlin on May 8, 2007 7:18 pm | Permalink
Emailed!
determined by Ankur on May 8, 2007 8:23 pm | Permalink
I’d love to try out the your digg Api Cocoa Framework.
proclaimed by James on May 11, 2007 5:59 am | Permalink
Mailed. I’ll try to get CURLHandle in sometime soon so the proxy is not needed.
published by Ankur on May 12, 2007 2:14 pm | Permalink
I would likewise like to try it out.
proclaimed by EmptySet on May 24, 2007 6:52 pm | Permalink
Would love to try it out also!
proclaimed by Han Onno ten Hoor on May 29, 2007 2:37 am | Permalink
I found this page on Google and I’m really interested in trying out your framework. I gather it hasn’t been released yet; if so could you please mail me a copy? Thanks
determined by Leonardo Cassarani on March 21, 2008 5:36 pm | Permalink
I’m trying to make a digg iPhone app, and this sounds perfect. Is this still available, and if so could I have a copy please?
Thanks
reasonded by Adam on July 14, 2008 2:35 am | Permalink
Unfortunately, I deleted the source for this project after realising it could be written more efficiently (Yes, I should have kept a copy… sorry). I will write it again when I get time, but that won’t be until next year.
voiced by Ankur on July 14, 2008 1:47 pm | Permalink
Leave a comment