/** Lists notes using different filtering and pagination options. */
private void listNotes() throws IOException {
// Lists 3 notes that were created after a specified timestamp and that are not trashed. Results
// are ordered by most recently modified first.
ListNotesResponse response =
keepService
.notes()
.list()
.setFilter("create_time > \"2021-01-01T00:00:00Z\"")
.setFilter("-trashed")
.setPageSize(3)
.execute();
System.out.println("List notes response: " + response);
// Lists notes using a pagination token.
ListNotesResponse firstPageResponse = keepService.notes().list().setPageSize(1).execute();
String nextPageToken = firstPageResponse.getNextPageToken();
for (int i = 0; i < 5; i++) {
// Uses the page token that was returned by the previous page's next page token.
ListNotesResponse pagedResponse =
keepService.notes().list().setPageSize(1).setPageToken(nextPageToken).execute();
System.out.println("Listing note:" + pagedResponse);
nextPageToken = pagedResponse.getNextPageToken();
}
}
Sauf indication contraire, le contenu de cette page est régi par une licence Creative Commons Attribution 4.0, et les échantillons de code sont régis par une licence Apache 2.0. Pour en savoir plus, consultez les Règles du site Google Developers. Java est une marque déposée d'Oracle et/ou de ses sociétés affiliées.
Dernière mise à jour le 2024/09/03 (UTC).
[{
"type": "thumb-down",
"id": "missingTheInformationINeed",
"label":"Il n'y a pas l'information dont j'ai besoin"
},{
"type": "thumb-down",
"id": "tooComplicatedTooManySteps",
"label":"Trop compliqué/Trop d'étapes"
},{
"type": "thumb-down",
"id": "outOfDate",
"label":"Obsolète"
},{
"type": "thumb-down",
"id": "translationIssue",
"label":"Problème de traduction"
},{
"type": "thumb-down",
"id": "samplesCodeIssue",
"label":"Mauvais exemple/Erreur de code"
},{
"type": "thumb-down",
"id": "otherDown",
"label":"Autre"
}]
[{
"type": "thumb-up",
"id": "easyToUnderstand",
"label":"Facile à comprendre"
},{
"type": "thumb-up",
"id": "solvedMyProblem",
"label":"J'ai pu résoudre mon problème"
},{
"type": "thumb-up",
"id": "otherUp",
"label":"Autre"
}]
{"lastModified": "Derni\u00e8re mise \u00e0 jour le 2024/09/03\u00a0(UTC)."}