Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Drop old name #39

Merged
merged 4 commits into from
Jan 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,6 @@ target_link_libraries(cpp_restapi

generate_export_header(cpp_restapi)

add_library(github_api ALIAS cpp_restapi)

if(NOT CppRestAPI_QtBackend AND NOT CppRestAPI_CurlBackend)
message(FATAL_ERROR "No backend was chosen. Set either CppRestAPI_QtBackend or CppRestAPI_CurlBackend variable to ON")
endif()
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -166,4 +166,4 @@ Also please look into 'examples' directory for details.

## Links

Code documentation available at https://kicer86.github.io/github_api/index.html
Code documentation available at https://kicer86.github.io/cpp_restapi/index.html
4 changes: 2 additions & 2 deletions examples/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ endif()
set(CppRestAPI_UseQt6 ${Qt6_FOUND})
set(CppRestAPI_QtBackend ON)
set(CppRestAPI_CurlBackend ON)
add_subdirectory(.. cpp_restapi_root) #include directory with github_api
add_subdirectory(.. cpp_restapi_root) #include directory with cpp_restapi

add_executable(qt_example qt_example.cpp)
add_executable(curl_example curl_example.cpp)
Expand All @@ -19,7 +19,7 @@ add_executable(bare_qt_connection_example bare_qt_connection_example.cpp)

target_link_libraries(qt_example
PRIVATE
github_api
cpp_restapi
Qt::Network
)

Expand Down
2 changes: 1 addition & 1 deletion src/curl_backend/connection.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ namespace cpp_restapi::CurlBackend
curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, write_callback);
curl_easy_setopt(curl, CURLOPT_WRITEDATA, &result);
curl_easy_setopt(curl, CURLOPT_HEADERDATA, &header_links);
curl_easy_setopt(curl, CURLOPT_USERAGENT, "github_api/1.0");
curl_easy_setopt(curl, CURLOPT_USERAGENT, "cpp_restapi/2.0");

const auto header_entries = getHeaderEntries();

Expand Down
2 changes: 1 addition & 1 deletion src/qt_backend/connection.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ namespace cpp_restapi::QtBackend
for(const auto& [k, v]: header_entries)
request.setRawHeader(k.c_str(), v.c_str());

request.setRawHeader("User-Agent", "github_api/1.0");
request.setRawHeader("User-Agent", "cpp_restapi/2.0");

return request;
}
Expand Down
2 changes: 1 addition & 1 deletion tests/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ target_link_libraries(api_tests
httpmockserver
microhttpd

github_api
cpp_restapi
)

target_include_directories(api_tests
Expand Down
8 changes: 4 additions & 4 deletions vcpkg.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@

{
"name": "github-api",
"version-string": "1.0.0",
"name": "cpp-restapi",
"version-string": "2.0.0",
"port-version": 1,
"homepage": "https://github.com/Kicer86/github_api",
"description": "This is a c++ library for accessing GitHub REST API v3.",
"homepage": "https://github.com/Kicer86/cpp_restapi",
"description": "A c++ Rest API library",
"dependencies": [
"jsoncpp"
]
Expand Down
Loading