mirror of
https://github.com/AskDavis/Casinotest.git
synced 2026-01-06 05:09:46 -08:00
Coin Information API integrated
This commit is contained in:
29
src/qt/CSCPublicAPI/jsoncoininfoparser.cpp
Normal file
29
src/qt/CSCPublicAPI/jsoncoininfoparser.cpp
Normal file
@@ -0,0 +1,29 @@
|
||||
#include "jsoncoininfoparser.h"
|
||||
#include <QDebug>
|
||||
|
||||
JsonCoinInfoParser::JsonCoinInfoParser()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
JsonCoinInfoParser::JsonCoinInfoParser( const QJsonObject& apiResult )
|
||||
: QJsonObject( apiResult )
|
||||
{
|
||||
qDebug() << "JsonCoinInfoParser: " << apiResult.begin().key();
|
||||
if ( apiResult.find( "Result" ).value().isObject() )
|
||||
{
|
||||
if ( apiResult.find( "Result" ).value().toObject().find( "CoinInfo" ).value().isObject() )
|
||||
{
|
||||
coinInfoObject = apiResult.find( "Result" ).value().toObject().find( "CoinInfo" ).value().toObject();
|
||||
}
|
||||
else
|
||||
{
|
||||
qDebug()<<"JsonCoinInfoParser first key: " << apiResult.find( "Result" ).value().toObject().begin().key();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
const QJsonObject& JsonCoinInfoParser::getCoinInfo() const
|
||||
{
|
||||
return coinInfoObject;
|
||||
}
|
||||
Reference in New Issue
Block a user