Documentation for OpenFLUID 2.2.0
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

bool connect (const std::string &URL, bool VerifyCertificate=true, bool AllowedRedirections=2)
 
void disconnect ()
 
void logout ()
 
bool isConnected () const
 
bool isV0ofAPI () const
 
std::string getHubURL () const
 
std::string getHubAPIVersion () const
 
std::string getHubStatus () const
 
std::string getHubName () const
 
std::set< std::string > getHubCapabilities () const
 
std::string getUserUnixname (const std::string &Email, const std::string &Password)
 
bool areCredentialsValid (const std::string &Unixname, const std::string &Password)
 
WaresListByType_t getAllAvailableWares () const
 
WaresDetailsByID_t getAvailableWaresWithDetails (openfluid::ware::WareType Type, const std::string &Username="") const
 
WaresDetailsByID_t getAvailableFragmentsWithDetails (const std::string &Username="") const
 
std::string getNews (const std::string &Lang="") const
 

Member Typedef Documentation

◆ WaresDetailsByID_t

◆ WaresListByType_t

Member Function Documentation

◆ areCredentialsValid()

bool openfluid::utils::FluidHubAPIClient::areCredentialsValid ( const std::string &  Unixname,
const std::string &  Password 
)

Returns true if login credentials are valid

Returns
True if login credentials are valid, false otherwise

◆ connect()

bool openfluid::utils::FluidHubAPIClient::connect ( const std::string &  URL,
bool  VerifyCertificate = true,
bool  AllowedRedirections = 2 
)

Connects to the FluidHub given by the URL

Parameters
[in]URLthe URL of the FluidHub to connect to
[in]VerifyCertificateenables/disables SSL certicate verification (default is true)
[in]AllowedRedirectionsmaximum redirections allowed, -1 for no redirection (default is 2)
Returns
true if the connection is OK, false otherwise

◆ disconnect()

void openfluid::utils::FluidHubAPIClient::disconnect ( )

Disconnects from the connected FluidHub

◆ getAllAvailableWares()

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

◆ getAvailableFragmentsWithDetails()

WaresDetailsByID_t openfluid::utils::FluidHubAPIClient::getAvailableFragmentsWithDetails ( const std::string &  Username = "") const

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

Parameters
[in]UsernameOptional username used in returned git URL
Returns
the detailed list of fragments

◆ getAvailableWaresWithDetails()

WaresDetailsByID_t openfluid::utils::FluidHubAPIClient::getAvailableWaresWithDetails ( openfluid::ware::WareType  Type,
const std::string &  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

◆ getHubAPIVersion()

std::string openfluid::utils::FluidHubAPIClient::getHubAPIVersion ( ) const
inline

Returns the API version of the current FluidHub

Returns
the FluidHub API version

◆ getHubCapabilities()

std::set<std::string> openfluid::utils::FluidHubAPIClient::getHubCapabilities ( ) const
inline

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

Returns
the FluidHub capabilities

◆ getHubName()

std::string openfluid::utils::FluidHubAPIClient::getHubName ( ) const
inline

Returns the name of the current FluidHub

Returns
the FluidHub name

◆ getHubStatus()

std::string openfluid::utils::FluidHubAPIClient::getHubStatus ( ) const
inline

Returns the status of the current FluidHub

Returns
the FluidHub status

◆ getHubURL()

std::string openfluid::utils::FluidHubAPIClient::getHubURL ( ) const
inline

Returns the URL of the current FluidHub

Returns
the FluidHub URL

◆ getNews()

std::string openfluid::utils::FluidHubAPIClient::getNews ( const std::string &  Lang = "") const

Returns the news as an RSS string content

Parameters
[in]LangOptional lang for news content
Returns
the RSS content

◆ getUserUnixname()

std::string openfluid::utils::FluidHubAPIClient::getUserUnixname ( const std::string &  Email,
const std::string &  Password 
)

Returns the corresponding user unixname if connected and not deprecated API

Returns
the connected user unixname

◆ isConnected()

bool openfluid::utils::FluidHubAPIClient::isConnected ( ) const
inline

Returns true if the client is currently connected

Returns
true if connected

◆ isV0ofAPI()

bool openfluid::utils::FluidHubAPIClient::isV0ofAPI ( ) const
inline

Returns true if the serveur uses the deprecated API (old wareshub)

Returns
true if connected

◆ logout()

void openfluid::utils::FluidHubAPIClient::logout ( )

Unsets the authentication informations


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