java - How to retrieve all results (more than 100) using batch on gmail -


I am using the Gmail API with the Java client library.
I want to bulk a bulk of questions to get a list. I have a test for a single question
snippet of code here.

  Gmail client = getClient (); Batchrextest batch = client.batch (); // Create Callback JsonBatchCallback & LT; ListMessagesResponse & gt; Callback = new JsonBatchCallback & LT; ListMessagesResponse & gt; () {Public Zero onSuccess (ListMessagesResponse listMessagesResponse, HttpHeaders responseHeaders) {println (listMessagesResponse.getMessages () Size ().); Println (listMessagesResponse.getNextPageToken ()); } @Override Public Zero onFailure (GoogleJsonError e, HttpHeaders responseHeaders) {println ("Error Message:" + e.getMessage ()); }}; ... Client.users () Message () list ("me@gmail.com") Queue (batch, callback); Batch.execute ();  

The problem is that it receives only 100 messages, I want to get the last token and do not use it again for the next question, it does not make a point since I batch Want to use
So how is it possible to bypass the posssible limit (100) in order to retrieve all the messages in a batch request?

Thanks


Comments