g212gs
g212gs

Reputation: 849

Fetch all email from Gmail account

I can get the Information of user data and email address from google api with help from this link.

But my task is to get all user mails from a Gmail account, and display them in a table view.

I checked the Gmail API but can't get enough reference.

Is there any way to do it ?

Upvotes: 0

Views: 1002

Answers (1)

Stonz2
Stonz2

Reputation: 6396

You probably want to look into threads. While normally a programmer would probably think of background processes when talking about threads, Google refers to "groups" of messages as threads (how it groups an email and replies into a single message in the client). While the API Reference for threads has an example in Java, it shouldn't be too hard to translate it into Obj-C if you're already set up to make other calls to the Google API.

Specifically, look into the list method (linked above). Alternatively, you could use messages.list but they will be much less organized. Also know that I'm pretty sure you'll need to increase the maxResults as I believe the default max is 100.

Upvotes: 2

Related Questions