Horizon
github_client.hpp
1 #pragma once
2 #include "nlohmann/json_fwd.hpp"
3 #include "rest_client.hpp"
4 
5 namespace horizon {
6 using json = nlohmann::json;
7 class GitHubClient {
8 public:
9  GitHubClient();
10  json login(const std::string &user, const std::string &passwd);
11  json get_repo(const std::string &owner, const std::string &repo);
12  json create_fork(const std::string &owner, const std::string &repo);
13  json create_pull_request(const std::string &owner, const std::string &repo, const std::string &title,
14  const std::string &branch, const std::string &base, const std::string &body);
15  json get_pull_requests(const std::string &owner, const std::string &repo);
16 
17  REST::Client client;
18 
19 private:
20  std::string login_user;
21 };
22 } // namespace horizon
Definition: rest_client.hpp:9
a class to store JSON values
Definition: json.hpp:161
Definition: github_client.hpp:7
Definition: block.cpp:7
basic_json<> json
default JSON class
Definition: json_fwd.hpp:61