Google Documents List Data API リスト編

Retrieving a list of documents では, DocumentsService を使用してファイル一覧を取得していますが,後でファイルをダウンロードするときに使う DocumentsRequest.Download に Document を渡す必要があるため, DocumentsRequest を使用してフィードを取得します。

サンプルソースは以下のようになります。

GDataCredentials^ c = gcnew GDataCredentials(email, password);
RequestSettings^ r = gcnew RequestSettings("App", c);
DocumentsRequest^ dr = gcnew DocumentsRequest(r);
Feed^ feed = dr->GetEverything();
for each (Document^ doc in feed->Entries) {
    DocumentEntry^ entry = doc->DocumentEntry;
    entry->Title->Text; // タイトル
    entry->Updated;     // 更新時刻
}

コメント

コメントを残す

メールアドレスが公開されることはありません。 が付いている欄は必須項目です