Horizon
horizon-eda-1.3.0
src
util
github_client.hpp
1
#pragma once
2
#include "nlohmann/json_fwd.hpp"
3
#include "http_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
login_token(
const
std::string &token);
12
json
get_repo(
const
std::string &owner,
const
std::string &repo);
13
json
create_fork(
const
std::string &owner,
const
std::string &repo);
14
json
create_pull_request(
const
std::string &owner,
const
std::string &repo,
const
std::string &title,
15
const
std::string &branch,
const
std::string &base,
const
std::string &body);
16
json
get_pull_requests(
const
std::string &owner,
const
std::string &repo);
17
json
get_pull_request(
const
std::string &owner,
const
std::string &repo,
unsigned
int
pr);
18
19
json
add_issue_comment(
const
std::string &owner,
const
std::string &repo,
unsigned
int
id
,
const
std::string &body);
20
21
HTTP::RESTClient
client;
22
23
private
:
24
std::string login_user;
25
};
26
}
// namespace horizon
horizon::HTTP::RESTClient
Definition:
http_client.hpp:44
nlohmann::basic_json
a class to store JSON values
Definition:
json.hpp:166
nlohmann::json
basic_json<> json
default JSON class
Definition:
json_fwd.hpp:61
horizon::GitHubClient
Definition:
github_client.hpp:7
Generated by
1.8.20