Files
moloapp/src/google/optimize/optimize_service.h
T

29 lines
893 B
C++

#pragma once
// Base of the optimize API classes: one invoke() that runs a CallSpec from
// the call table, validating path parameters, query names and body fields
// locally before any traffic.
#include <map>
#include <memory>
#include <string>
#include "google/optimize/calls.h"
#include "google/service.h"
namespace molo::google::optimize {
class OptimizeService : public Service {
public:
OptimizeService(std::shared_ptr<GoogleClient> client, ServiceEndpoint endpoint)
: Service(std::move(client), std::move(endpoint)) {}
protected:
clients::body::Json invoke(const CallSpec& spec,
const std::map<std::string, std::string>& path_params,
const std::map<std::string, std::string>& query = {},
const clients::body::Json* body = nullptr) const;
};
} // namespace molo::google::optimize