Classes | Public Types | Public Member Functions | List of all members
openfluid::utils::FluidHubAPIClient Class Reference

#include <utils/FluidHubAPIClient.hpp>

Classes

class  WareDetailedDescription
 

Public Types

typedef std::map< openfluid::ware::WareType, std::set< openfluid::ware::WareID_t > > WaresListByType_t
 
typedef std::map< openfluid::ware::WareID_t, WareDetailedDescriptionWaresDetailsByID_t
 

Public Member Functions

 FluidHubAPIClient ()
 
 ~FluidHubAPIClient ()
 
bool connect (const QString &URL, const RESTClient::SSLConfiguration &SSLConfig=RESTClient::SSLConfiguration())
 
void disconnect ()
 
bool isConnected () const
 
QString getHubURL () const
 
QString getHubAPIVersion () const
 
QString getHubStatus () const
 
QString getHubName () const
 
std::set< QString > getHubCapabilities () const
 
WaresListByType_t getAllAvailableWares () const
 
WaresDetailsByID_t getAvailableWaresWithDetails (openfluid::ware::WareType Type, const QString &Username="") const
 
QString getNews (const QString &Lang="") const
 

Member Typedef Documentation

Constructor & Destructor Documentation

openfluid::utils::FluidHubAPIClient::FluidHubAPIClient ( )
inline
openfluid::utils::FluidHubAPIClient::~FluidHubAPIClient ( )
inline

Member Function Documentation

bool openfluid::utils::FluidHubAPIClient::connect ( const QString &  URL,
const RESTClient::SSLConfiguration SSLConfig = RESTClient::SSLConfiguration() 
)

Connects to the FluidHub given by the URL

Parameters
[in]URLthe URL of the FluidHub to connect to
[in]SSLConfigthe SSL configuration for the connection (if needed)
Returns
true if the connection is OK, false otherwise
void openfluid::utils::FluidHubAPIClient::disconnect ( )

Disconnects from the connected FluidHub

WaresListByType_t openfluid::utils::FluidHubAPIClient::getAllAvailableWares ( ) const

Returns the list of all available wares in the current FluidHub

Returns
the list of wares categorized by ware type
WaresDetailsByID_t openfluid::utils::FluidHubAPIClient::getAvailableWaresWithDetails ( openfluid::ware::WareType  Type,
const QString &  Username = "" 
) const

Returns the detailed list of all available wares in the current FluidHub

Parameters
[in]Typethe type of wares to list
[in]UsernameOptional username used in returned git URL
Returns
the detailed list of wares of the give type
QString openfluid::utils::FluidHubAPIClient::getHubAPIVersion ( ) const
inline

Returns the API version of the current FluidHub

Returns
the FluidHub API version
std::set<QString> openfluid::utils::FluidHubAPIClient::getHubCapabilities ( ) const
inline

Returns the capabilities list of the current FluidHub ("news","wareshub", ...)

Returns
the FluidHub capabilities
QString openfluid::utils::FluidHubAPIClient::getHubName ( ) const
inline

Returns the name of the current FluidHub

Returns
the FluidHub name
QString openfluid::utils::FluidHubAPIClient::getHubStatus ( ) const
inline

Returns the status of the current FluidHub

Returns
the FluidHub status
QString openfluid::utils::FluidHubAPIClient::getHubURL ( ) const
inline

Returns the URL of the current FluidHub

Returns
the FluidHub URL
QString openfluid::utils::FluidHubAPIClient::getNews ( const QString &  Lang = "") const

Returns the news as an RSS string content

Parameters
[in]LangOptional lang for news content
Returns
the RSS content
bool openfluid::utils::FluidHubAPIClient::isConnected ( ) const
inline

Returns true if the client is currently connected

Returns
true if connected

The documentation for this class was generated from the following file: