/
farado
/
farado-binara
Обзор
Документация
Войти
/
farado
/
farado-binara
Код
Запросы
0
Пакеты
0
Релизы
0
CI/CD
Аналитика
develop
src/common/api/client.h
78 строк
2 KB
Ostapenko Alexey
[common][datenaro][retejo][tests] Убраны лишние include, местами в пользу forward declaration.
13 янв 2024, 16:03
13 янв 2024, 16:03
f1e4442
Код
Авторство
О чём код?
#ifndef API_CLIENT_H #define API_CLIENT_H #include <memory> #include <string> #include <map> #include <unordered_map> #include <vector> #include "common/api/result.hpp" #include "common/api/changes.h" #include "common/elements/element.h" #include "common/elements/element_type.hpp" #include "common/more/uuid.h" namespace Api { class Client final { public: explicit Client(const std::string& datenaroPath); std::vector<unsigned> getIds( const Uuids::Uuid& sessionUuid, Elements::ElementType type, const std::string& filter = "" ) const; std::vector<std::shared_ptr<Elements::Element>> getElements( const Uuids::Uuid& sessionUuid, Elements::ElementType type, const std::vector<unsigned>& ids ) const; Api::Result addElement( const Uuids::Uuid& sessionUuid, std::shared_ptr<Elements::Element> element ) const; Api::Result setElement( const Uuids::Uuid& sessionUuid, std::shared_ptr<Elements::Element> element ) const; Api::Result delElement( const Uuids::Uuid& sessionUuid, Elements::ElementType type, unsigned id ) const; Api::Changes hasChanges( const Uuids::Uuid& sessionUuid ) const; Api::Result login( const std::string& user, const std::string& password ) const; Api::Result logout( const Uuids::Uuid& sessionUuid, const std::string& user ) const; private: std::string url(const std::string& path) const; private: const std::string m_datenaroPath; }; } // namespace Api #endif // API_CLIENT_H