Google uses AI technology to translate content into your preferred language. AI translations can contain errors.
Geri bildirim gönderin
Notları ve ekleri al
Koleksiyonlar ile düzeninizi koruyun
İçeriği tercihlerinize göre kaydedin ve kategorilere ayırın.
Aşağıdaki örnekte, notun ve eklerinin nasıl alınacağı gösterilmektedir:
REST Ek indirme adıyla ve alt=media URL parametresiyle
media.download
işlevini çağırın.
alt=media URL parametresi, sunucuya içerik indirme isteğinde bulunulduğunu bildirir.
Eklerin adını almak için önce notu almanız gerekir.
Not: alt=media URL parametresi, tüm Google REST API'lerinde kullanılabilen bir sistem parametresidir . Google Keep API için bir istemci kitaplığı kullanıyorsanız bu parametreyi açıkça ayarlamanız gerekmez.
Java
/**
* Gets and downloads the attachment of a note.
*
* @param note The note whose attachment will be downloaded.
* @throws IOException
*/
private void getNoteAttachment ( Note note ) throws IOException {
// First call is to get the attachment resources on the note.
List<Attachment> attachments =
keepService . notes (). get ( note . getName ()). execute (). getAttachments ();
if ( ! attachments . isEmpty ()) {
Attachment attachment = attachments . get ( 0 );
String mimeType = attachment . getMimeType (). get ( 0 );
// Make a second call to download the attachment with the specified
// mimeType.
OutputStream outputStream =
new FileOutputStream ( "attachmentFile." + mimeType . split ( "/" ) [ 1 ] );
keepService
. media ()
. download ( attachment . getName ())
. setMimeType ( mimeType )
. executeMediaAndDownloadTo ( outputStream );
}
}
Geri bildirim gönderin
Aksi belirtilmediği sürece bu sayfanın içeriği Creative Commons Atıf 4.0 Lisansı altında ve kod örnekleri Apache 2.0 Lisansı altında lisanslanmıştır. Ayrıntılı bilgi için Google Developers Site Politikaları 'na göz atın. Java, Oracle ve/veya satış ortaklarının tescilli ticari markasıdır.
Son güncelleme tarihi: 2026-05-13 UTC.
Bize geri bildirimde bulunmak mı istiyorsunuz?
[[["Anlaması kolay","easyToUnderstand","thumb-up"],["Sorunumu çözdü","solvedMyProblem","thumb-up"],["Diğer","otherUp","thumb-up"]],[["İhtiyacım olan bilgiler yok","missingTheInformationINeed","thumb-down"],["Çok karmaşık / çok fazla adım var","tooComplicatedTooManySteps","thumb-down"],["Güncel değil","outOfDate","thumb-down"],["Çeviri sorunu","translationIssue","thumb-down"],["Örnek veya kod sorunu","samplesCodeIssue","thumb-down"],["Diğer","otherDown","thumb-down"]],["Son güncelleme tarihi: 2026-05-13 UTC."],[],[]]