I am making an application in qt/c++ and I wanted to upload images to a specific folder.I tried to get list of all folders but it does not provide me names of folder.I wanted to get their names so that user can select a particular folder from list of folders and I could upload to that specific folder.My code:http://pastebin.com/dBGkpeEj In response from this code I get kind,etag,selflink and items array in which each item has foll. fields:kind=drive#childReference,id,selflink,childlink. I want to get name of all folders
I got it solved by myself.Here's code to get list of all folders and subfolders in qt:
void googled::tryFolderListing(QNetworkReply *reply){
am = new QNetworkAccessManager;
QByteArray d = reply->readAll();
QString x = getValue(d,"access_token");
x = "Bearer " + x;
QUrl url("https://www.googleapis.com/drive/v2/files");
url.addQueryItem(QString("q").toAscii(),QString("mimeType = 'application/vnd.google-apps.folder'").toAscii());
QNetworkRequest request;
request.setUrl(url);
request.setRawHeader(QString("Content-Type").toAscii(),QString("application/json").toAscii());
request.setRawHeader(QString("Authorization").toAscii(),x.toAscii());
QObject::connect(am, SIGNAL(finished(QNetworkReply *)),
this, SLOT(uploadfinishedSlot(QNetworkReply *)));
am->get(request);
}