-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #23 from Kicer86/generic_core_extraction
Extract generic part as a separate entity
- Loading branch information
Showing
36 changed files
with
1,184 additions
and
839 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
|
||
#include <iostream> | ||
|
||
#include <cpp_restapi/curl_connection.hpp> | ||
|
||
|
||
int main(int argc, char** argv) | ||
{ | ||
// Access The Star Wars API | ||
cpp_restapi::CurlBackend::Connection connection("https://swapi.dev/api", {}); | ||
|
||
std::cout << connection.get("people/1") << '\n'; | ||
std::cout << connection.get("starships/12/") << '\n'; | ||
|
||
return 0; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
|
||
#include <iostream> | ||
#include <QCoreApplication> | ||
#include <QNetworkAccessManager> | ||
|
||
#include <cpp_restapi/qt_connection.hpp> | ||
|
||
|
||
int main(int argc, char** argv) | ||
{ | ||
QCoreApplication qapp(argc, argv); | ||
QNetworkAccessManager manager; | ||
|
||
// Access The Star Wars API | ||
cpp_restapi::QtBackend::Connection connection(manager, "https://swapi.dev/api", {}); | ||
|
||
std::cout << connection.get("people/1") << '\n'; | ||
std::cout << connection.get("starships/12/") << '\n'; | ||
|
||
return 0; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
|
||
#include <iostream> | ||
|
||
#include <github_api/github_api_curl.hpp> | ||
#include <github_api/request.hpp> | ||
|
||
|
||
int main(int argc, char** argv) | ||
{ | ||
GitHub::CurlBackend::Api github; | ||
GitHub::Request request(github.connect()); | ||
|
||
std::cout << request.getRateLimit() << '\n'; | ||
std::cout << request.getUserInfo("Kicer86") << '\n'; | ||
|
||
return 0; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
|
||
#include <QCoreApplication> | ||
#include <QDebug> | ||
#include <QNetworkAccessManager> | ||
|
||
#include <github_api/github_api_qt.hpp> | ||
#include <github_api/request.hpp> | ||
|
||
|
||
int main(int argc, char** argv) | ||
{ | ||
QCoreApplication qapp(argc, argv); | ||
QNetworkAccessManager manager; | ||
|
||
GitHub::QtBackend::Api github(manager); | ||
GitHub::Request request(github.connect()); | ||
|
||
qInfo() << request.getRateLimit().c_str(); | ||
qInfo() << request.getUserInfo("Kicer86").c_str(); | ||
|
||
return 0; | ||
} |
Oops, something went wrong.