void QTweetAccountRateLimitStatus::parseJsonFinished(const QJsonDocument &jsonDoc)
{
    if (jsonDoc.isObject()) {
        QJsonObject respJsonObject = jsonDoc.object();

        int remainingHits = static_cast<int>(respJsonObject["remaining_hits"].toDouble());
        int resetTime = static_cast<int>(respJsonObject["reset_time_in_seconds"].toDouble());
        int hourlyLimit = static_cast<int>(respJsonObject["hourly_limit"].toDouble());

        emit rateLimitInfo(remainingHits, resetTime, hourlyLimit);
    }
}
void QTweetAccountRateLimitStatus::parsingJsonFinished(const QVariant &json, bool ok, const QString &errorMsg)
{
    if (ok) {
        QVariantMap respMap = json.toMap();

        int remainingHits = respMap["remaining_hits"].toInt();
        int resetTime = respMap["reset_time_in_seconds"].toInt();
        int hourlyLimit = respMap["hourly_limit"].toInt();

        emit rateLimitInfo(remainingHits, resetTime, hourlyLimit);
    } else {
        qDebug() << "QTweetAccountRateLimitStatus parser error: " << errorMsg;
        emit error(QTweetJsonError(errorMsg, json.toByteArray()));
    }
}