Enumerar notas
Organiza tus páginas con colecciones
Guarda y categoriza el contenido según tus preferencias.
En el siguiente ejemplo, se muestra cómo hacer una lista de notas:
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();
}
}
Salvo que se indique lo contrario, el contenido de esta página está sujeto a la licencia Atribución 4.0 de Creative Commons, y los ejemplos de código están sujetos a la licencia Apache 2.0. Para obtener más información, consulta las políticas del sitio de Google Developers. Java es una marca registrada de Oracle o sus afiliados.
Última actualización: 2025-03-11 (UTC)
[null,null,["Última actualización: 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 }"]]