Listar observações
Mantenha tudo organizado com as coleções
Salve e categorize o conteúdo com base nas suas preferências.
Confira no exemplo a seguir como listar anotações:
Java
/** 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();
}
}
Exceto em caso de indicação contrária, o conteúdo desta página é licenciado de acordo com a Licença de atribuição 4.0 do Creative Commons, e as amostras de código são licenciadas de acordo com a Licença Apache 2.0. Para mais detalhes, consulte as políticas do site do Google Developers. Java é uma marca registrada da Oracle e/ou afiliadas.
Última atualização 2025-03-11 UTC.
[null,null,["Última atualização 2025-03-11 UTC."],[],[],null,["# List notes\n\nThe following sample shows how to list notes: \n\n### REST\n\nCall [notes.list()](/workspace/keep/api/reference/rest/v1/notes/list).\n\n### Java\n\n /** Lists notes using different filtering and pagination options. */\n private void listNotes() throws IOException {\n // Lists 3 notes that were created after a specified timestamp and that are not trashed. Results\n // are ordered by most recently modified first.\n ListNotesResponse response =\n keepService\n .notes()\n .list()\n .setFilter(\"create_time \u003e \\\"2021-01-01T00:00:00Z\\\"\")\n .setFilter(\"-trashed\")\n .setPageSize(3)\n .execute();\n\n System.out.println(\"List notes response: \" + response);\n\n // Lists notes using a pagination token.\n ListNotesResponse firstPageResponse = keepService.notes().list().setPageSize(1).execute();\n String nextPageToken = firstPageResponse.getNextPageToken();\n\n for (int i = 0; i \u003c 5; i++) {\n // Uses the page token that was returned by the previous page's next page token.\n ListNotesResponse pagedResponse =\n keepService.notes().list().setPageSize(1).setPageToken(nextPageToken).execute();\n System.out.println(\"Listing note:\" + pagedResponse);\n nextPageToken = pagedResponse.getNextPageToken();\n }\n }"]]