2

I am working on the app in which I fetch the contacts, Photo albums, use google map, calendar using GData. they all working perfectly but I am not able to fetch the tasks of the google. so can anyone help me for the Google tasks API.? Thank you in advance

user7388
  • 1,741
  • 2
  • 19
  • 25

1 Answers1

0

There is a generated interface for the Google Tasks API included in the objective c gdata library. Take a look at the TasksSample project included in the Examples directory of the repository. Make sure you have a relatively recent copy of the client library.

http://code.google.com/p/google-api-objectivec-client/source/browse/#svn%2Ftrunk%2FExamples%2FTasksSample

For example, here's how to query for a list:

GTLQueryTasks *query = [GTLQueryTasks queryForTasksListWithTasklist:someTasklistID];
query.showCompleted = someBool;
query.showHidden = anotherBool;
query.showDeleted = aThirdBool;

aTasksTicket =  [service executeQuery:query
                       completionHandler:^(GTLServiceTicket *ticket,
                                           id tasks, NSError *error) {
                         // callback
                         [self doSomethingWithTasks: tasks];
                       }];
Doug
  • 832
  • 7
  • 14
  • hey thank you Doug, Can I use this API for iPhone application? – user7388 Nov 27 '12 at 04:43
  • Yep, the objective c gdata library works perfectly on iOS, including iPhone. – Doug Nov 28 '12 at 03:18
  • I have GData API, in which there is no files for google tasks, then how can I use GData for Google tasks? I have another API GTL, in which I get files for Google tasks, but they are for MAC, so is it possible to use for iPhone app? If yes, then how? – user7388 Nov 28 '12 at 04:08