//---------------------------------------------------------------------------

#ifndef RestObjectFH
#define RestObjectFH
//---------------------------------------------------------------------------
#include <Classes.hpp>
#include <stdio.h>
#include <DBXJSON.hpp>
#include "ITSLibF.h"
#include "McJSON.hpp"
//---------------------------------------------------------------------------

class TRestData
{
public:
    TRestData();
    ~TRestData();

private:
    String FKey;
    String FData;
public:

};
//---------------------------------------------------------------------------

class TRestObject
{
public:
    TRestObject();
    ~TRestObject();

private:

public:

};
//---------------------------------------------------------------------------

class TRestObjectList
{
public:
    TRestObjectList();
    ~TRestObjectList();

private:
    TObject *FRestObject;

public:

};
//---------------------------------------------------------------------------

class TRestObjectManager
{
public:
    TRestObjectManager();
    ~TRestObjectManager();

public:
    TItsMap<String, TRestObject*> FLists;


    static String Get(String AApiUrl, TForm *AParent);
    static TStream* GetStream(String AApiUrl);
    static TMcJsonItem* ParseJsonString(String AJsonData);
    static TMcJsonItem* ParseJsonStream(TStream *AStream);
    static String GetValue(TMcJsonItem *AItem, String AKey);
};
//---------------------------------------------------------------------------

#endif
