GitWatcherBot
1.0.0
A Telegram Bot that notifies you when a new change is made in your repositories (issues, pull requests, stars, forks, and watches)
Main Page
Namespaces
Namespace List
Namespace Members
All
Typedefs
Classes
Class List
Class Index
Class Hierarchy
Class Members
All
a
b
c
d
f
g
i
l
o
p
r
s
t
u
w
~
Functions
a
b
f
g
i
l
o
r
t
u
~
Variables
a
c
d
f
i
l
o
p
s
t
u
w
Files
File List
File Members
All
Functions
Variables
Macros
•
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Macros
GitApi.hpp
Go to the documentation of this file.
1
#pragma once
2
#include <exception>
3
#include <regex>
4
#include <sstream>
5
#include <stdexcept>
6
#include <optional>
7
#include <string>
8
#include <nlohmann/json.hpp>
9
#include <cpr/cpr.h>
10
#include "
db/Database.hpp
"
11
#include "
log/Logger.hpp
"
12
namespace
nl = nlohmann;
13
15
17
struct
GitApiRateLimitExceededException
: std::runtime_error {
18
explicit
GitApiRateLimitExceededException
(
const
std::string& msg) : std::runtime_error(msg) {}
19
};
20
22
struct
GitApiRepositoryNotFoundException
: std::runtime_error {
23
explicit
GitApiRepositoryNotFoundException
(
const
std::string& msg) : std::runtime_error(msg) {}
24
};
25
26
class
GitApi
{
27
public
:
28
GitApi
() =
default
;
29
~GitApi
() =
default
;
30
32
models::Repository
getRepository
(
const
std::string& repositoryFullName =
"torvalds/linux"
);
33
34
};
Database.hpp
Logger.hpp
GitApi
Definition:
GitApi.hpp:26
GitApi::getRepository
models::Repository getRepository(const std::string &repositoryFullName="torvalds/linux")
Returns Repository information by fullname from GitHub Api.
GitApi::GitApi
GitApi()=default
GitApi::~GitApi
~GitApi()=default
GitApiRateLimitExceededException
<! must include Database with Logger for models::Log & Database::addLog
Definition:
GitApi.hpp:17
GitApiRateLimitExceededException::GitApiRateLimitExceededException
GitApiRateLimitExceededException(const std::string &msg)
Definition:
GitApi.hpp:18
GitApiRepositoryNotFoundException
Thrown when requested repository doesn't exist.
Definition:
GitApi.hpp:22
GitApiRepositoryNotFoundException::GitApiRepositoryNotFoundException
GitApiRepositoryNotFoundException(const std::string &msg)
Definition:
GitApi.hpp:23
models::Repository
Definition:
Repository.hpp:13
src
api
GitApi.hpp
Generated on Sat Jun 22 2024 16:34:05 for GitWatcherBot by
1.9.1