products_log 1.0.0
C++ client library for the Products REST API (usage statistics)
Loading...
Searching...
No Matches
products_log.h File Reference

Клиентская библиотека для REST API Products (статистика использования приложений). More...

#include <cstdint>
#include <functional>
#include <optional>
#include <string>

Go to the source code of this file.

Classes

struct  products_log::HttpRequest
 HTTP-запрос, описывающий обращение к Products API. More...
 
struct  products_log::HttpResponse
 Ответ на запрос. More...
 
class  products_log::ProductsLog
 

Namespaces

namespace  products_log
 

Typedefs

using products_log::Transport = std::function<HttpResponse(const HttpRequest &)>
 Транспорт HTTP — функция, выполняющая запрос. Заменяемая для тестов.
 

Detailed Description

Клиентская библиотека для REST API Products (статистика использования приложений).

Зеркалирует Java-библиотеку ru.gentoos.ProductsLog и Python e_lib.product_log. Читает переменные окружения PRODUCTS_HOST, PRODUCTS_USER, PRODUCTS_PASS; при отсутствии любой из них клиент отключается (методы становятся no-op, приложение не падает).

See also
https://gitea.gentoos.ru/e.anisimov/products_log

Definition in file products_log.h.