changed api key variable name

This commit is contained in:
Elisa Lupin-Jimenez 2017-12-27 12:49:16 -08:00
parent a428eb5b75
commit 84933131c4
2 changed files with 4 additions and 4 deletions

View file

@ -37,7 +37,7 @@ GooglePolyScriptingInterface::GooglePolyScriptingInterface() {
} }
void GooglePolyScriptingInterface::setAPIKey(const QString& key) { void GooglePolyScriptingInterface::setAPIKey(const QString& key) {
authCode = key; _authCode = key;
} }
QString GooglePolyScriptingInterface::getAssetList(const QString& keyword, const QString& category, const QString& format) { QString GooglePolyScriptingInterface::getAssetList(const QString& keyword, const QString& category, const QString& format) {
@ -94,7 +94,7 @@ QString GooglePolyScriptingInterface::getModelInfo(const QString& input) {
} }
} }
QString urlString(GET_POLY_URL); QString urlString(GET_POLY_URL);
urlString = urlString.replace("model", name) + "key=" + authCode; urlString = urlString.replace("model", name) + "key=" + _authCode;
qCDebug(scriptengine) << "Google URL request: " << urlString; qCDebug(scriptengine) << "Google URL request: " << urlString;
QUrl url(urlString); QUrl url(urlString);
QString json = parseJSON(url, 2).toString(); QString json = parseJSON(url, 2).toString();
@ -123,7 +123,7 @@ QUrl GooglePolyScriptingInterface::formatURLQuery(const QString& keyword, const
if (!format.isEmpty()) { if (!format.isEmpty()) {
queries.append("&format=" + format); queries.append("&format=" + format);
} }
QString urlString(LIST_POLY_URL + "key=" + authCode + queries); QString urlString(LIST_POLY_URL + "key=" + _authCode + queries);
return QUrl(urlString); return QUrl(urlString);
} }
} }

View file

@ -34,7 +34,7 @@ public slots:
QString getModelInfo(const QString& input); QString getModelInfo(const QString& input);
private: private:
QString authCode; QString _authCode;
QUrl formatURLQuery(const QString& keyword, const QString& category, const QString& format); QUrl formatURLQuery(const QString& keyword, const QString& category, const QString& format);
QString getModelURL(const QUrl& url); QString getModelURL(const QUrl& url);