Google Tasks API

45 views
Skip to first unread message

AK

unread,
May 11, 2011, 2:47:38 PM5/11/11
to Google Data APIs Objective-C Client Library Discussion
Since the new Google Tasks API is now in beta and released, is there
any timeframe in getting it into the Objective-C client? I need to
know if I need to just go ahead and implement my own or if the
timeframe is suitable for me to wait.

Thanks!

Greg Robbins

unread,
May 11, 2011, 3:04:48 PM5/11/11
to gdata-objec...@googlegroups.com
We're working on a brand new API library for JSON-based APIs such as Tasks. It's quite far along, but we don't yet have a release date to announce.

AK

unread,
May 11, 2011, 3:21:53 PM5/11/11
to Google Data APIs Objective-C Client Library Discussion
OK...that sort of helps, but it sounds like it means I should go ahead
and just write my own for the time being. Are we talking weeks?
Months? A year?

AK

unread,
May 11, 2011, 3:23:41 PM5/11/11
to Google Data APIs Objective-C Client Library Discussion
Also let me ask this.... can I use the GData authentication along with
my own REST code to Tasks? For example I'm already using Gdata for
events. So if I'm already logged in and getting calendars, events,
etc... can I use any of the GDataServiceGoogleCalendar* class such as
perhaps a token or something for my own code to call the new tasks
API? We already use JSON sync with everything else but GData.

On May 11, 2:04 pm, Greg Robbins <grobb...@google.com> wrote:

Greg Robbins

unread,
May 11, 2011, 3:34:01 PM5/11/11
to gdata-objec...@googlegroups.com
The new library should be available in a few months, at most, I hope. 

We do recommend using OAuth 2 with both GData APIs and new JSON APIs. <http://code.google.com/p/gtm-oauth2/>

But if the Tasks API works with the older ClientLogin (username/password) sign-in (I'm not sure if it does), you can create a NSURLRequest with the proper authentication header using a GData service object's -requestForURL:ETag:httpMethod: method.

AK

unread,
May 11, 2011, 3:44:01 PM5/11/11
to Google Data APIs Objective-C Client Library Discussion
I was about to switch the Calendar code to OAuth2 anyway. So I was
doing that now. If I switch our code to use OAuth2 with GData/
Calendar, I should still be able to to use
requestForURL:ETag:httpMethod: ?

If so, that sounds like how I'll go. Thanks!

Greg Robbins

unread,
May 11, 2011, 4:01:20 PM5/11/11
to gdata-objec...@googlegroups.com
requestForURL: cannot work with OAuth 2. requestForURL: is synchronous, and authorizing with OAuth 2 is asynchronous, since a fetch must sometimes be done to refresh the OAuth 2 token.

Instead, the OAuth 2 authorization object can either authorize a NSMutableURLRequest directly, or can be attached to a GTMHTTPFetcher object or to a GDataService object. That is described at


Reply all
Reply to author
Forward
0 new messages