Scorum
advertising_api.hpp
Go to the documentation of this file.
1 #pragma once
3 #include <fc/api.hpp>
4 
5 #define ADVERTISING_API_NAME "advertising_api"
6 
7 namespace scorum {
8 namespace app {
9 
17 {
18 public:
19  advertising_api(const api_context& ctx);
21 
25 
29  fc::optional<account_api_obj> get_moderator() const;
30 
34  std::vector<budget_api_obj> get_user_budgets(const std::string& user) const;
35 
39  fc::optional<budget_api_obj> get_budget(uuid_type uuid, budget_type type) const;
40 
44  std::vector<budget_api_obj> get_current_winners(budget_type type) const;
45 
49  std::vector<percent_type> get_auction_coefficients(budget_type type) const;
50 
52 
53  void on_api_startup();
54 
55  class impl;
56 
57 private:
58  std::unique_ptr<impl> _impl;
59 };
60 }
61 }
62 
64  (get_moderator)(get_user_budgets)(get_budget)(get_current_winners)(get_auction_coefficients))
advertising_api(const api_context &ctx)
std::vector< budget_api_obj > get_current_winners(budget_type type) const
Get winners for particular budget type.
std::vector< budget_api_obj > get_user_budgets(const std::string &user) const
Get all advertising budgets which belong to provided user. Newer first.
fc::optional< budget_api_obj > get_budget(uuid_type uuid, budget_type type) const
Get advertising budget.
fc::optional< account_api_obj > get_moderator() const
Get Advertising budgets moderator if exists.
std::vector< percent_type > get_auction_coefficients(budget_type type) const
Get winners for particular budget type.
Definition: asset.cpp:15
boost::uuids::uuid uuid_type
Definition: types.hpp:53