History

fixed getAssetList()

Elisa Lupin-Jimenez committed 8 years ago

Commit 34d8fe31 parent 8a9e5bc2 files · +3 −20Browse files

Showing the changes to interface/src/scripting/GooglePolyScriptingInterface.cpp (1 of 2 files). Show all

Unified · Split

interface/src/scripting/GooglePolyScriptingInterface.cpp+2−18
@@ -40,14 +40,13 @@ void GooglePolyScriptingInterface::setAPIKey(QString key) { · 39 unmodified lines
4040 authCode = key;
4141 }
4242
43−QByteArray GooglePolyScriptingInterface::getAssetList(QString keyword, QString category, QString format) {
43+QString GooglePolyScriptingInterface::getAssetList(QString keyword, QString category, QString format) {
4444 QUrl url = formatURLQuery(keyword, category, format);
4545 if (!url.isEmpty()) {
4646 //QJsonArray json = parseJSON(url, 0).toJsonArray();
4747 //qCDebug(scriptengine) << "first asset name: " << json.at(0).toObject().value("displayName");
4848 QByteArray json = parseJSON(url, 0).toJsonDocument().toJson();
49− qCDebug(scriptengine) << "asset list as string is: " << json;
50− return json;
49+ return (QString) json;
5150 } else {
5251 qCDebug(scriptengine) << "Invalid filters were specified.";
5352 //return QJsonArray();
@@ -55,21 +54,6 @@ QByteArray GooglePolyScriptingInterface::getAssetList(QString keyword, QString c · 1 unmodified line
5554 }
5655 }
5756
58−/*QJsonArray GooglePolyScriptingInterface::getAssetList(QString keyword, QString category, QString format) {
59− QUrl url = formatURLQuery(keyword, category, format);
60− if (!url.isEmpty()) {
61− //QJsonArray json = parseJSON(url, 0).toJsonArray();
62− //qCDebug(scriptengine) << "first asset name: " << json.at(0).toObject().value("displayName");
63− QJsonArray json = parseJSON(url, 0).toJsonArray();
64− qCDebug(scriptengine) << "asset list as array is: " << json;
65− return json;
66− } else {
67− qCDebug(scriptengine) << "Invalid filters were specified.";
68− return QJsonArray();
69− //return "";
70− }
71−}*/
72−
7357 QString GooglePolyScriptingInterface::getFBX(QString keyword, QString category) {
7458 QUrl url = formatURLQuery(keyword, category, "FBX");
7559 return getModelURL(url);