Home > Projects > QDailymotion

QDailymotion

Contents

About

QDailymotion provides a series of request classes and data models enabling read/write access to Dailymotion Data API resources. The library also supports authentication and retrieval of video streams and subtitles. Each of the request classes and data models are available for use in QML via the QDailymotion import.

Example usage:

C++

using namespace QDailymotion;
...
request.get("/video/VIDEO_ID");
connect(&request, SIGNAL(finished()), this, SLOT(onRequestFinished()));
...
void MyClass::onRequestFinished() {
if (request.status() == ResourcesRequest::Ready) {
QMapIterator<QString, QVariant> iterator(request.result().toMap());
while (iterator.hasNext()) {
iterator.next();
qDebug() << iterator.key() << "=" << iterator.value();
}
}
else {
qDebug() << request.errorString();
}
}

QML

import QtQuick 1.0
import QDailymotion 1.0
id: request
onFinished: {
if (status == ResourcesRequest.Ready) {
for (var k in result) {
console.log(att + " = " + result[k]);
}
}
else {
console.log(errorString);
}
}
Component.onCompleted: get("/video/VIDEO_ID")
}

Documentation

Full documentation of QDailymotion is available here.

Source code

QDailymotion is licensed under GPLv3. The project is hosted at GitHub.