{"id":14989981,"url":"https://github.com/dan-tan/riot-cpp","last_synced_at":"2025-04-12T02:01:58.345Z","repository":{"id":65044059,"uuid":"579439896","full_name":"Dan-Tan/riot-cpp","owner":"Dan-Tan","description":"Basic api client to query riot's api. Handles rate limiting, server errors and does basic logging.","archived":false,"fork":false,"pushed_at":"2024-06-30T06:46:13.000Z","size":6451,"stargazers_count":12,"open_issues_count":5,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-02-20T14:48:45.688Z","etag":null,"topics":["api-client","api-wrapper","catch2","cpp","libcurl","restful-api","riot-games-api"],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Dan-Tan.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"docs/Contributing/contributing.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-12-17T17:48:56.000Z","updated_at":"2024-06-30T06:46:00.000Z","dependencies_parsed_at":"2023-02-18T23:40:27.076Z","dependency_job_id":"2f9cf235-ee7a-402b-958d-f3faacdb3e49","html_url":"https://github.com/Dan-Tan/riot-cpp","commit_stats":{"total_commits":175,"total_committers":5,"mean_commits":35.0,"dds":0.0971428571428572,"last_synced_commit":"9420d3f6396f62bad544144ee0a85a8c3665c3e3"},"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Dan-Tan%2Friot-cpp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Dan-Tan%2Friot-cpp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Dan-Tan%2Friot-cpp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Dan-Tan%2Friot-cpp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Dan-Tan","download_url":"https://codeload.github.com/Dan-Tan/riot-cpp/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239862732,"owners_count":19709457,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["api-client","api-wrapper","catch2","cpp","libcurl","restful-api","riot-games-api"],"created_at":"2024-09-24T14:19:16.407Z","updated_at":"2025-02-20T15:30:50.001Z","avatar_url":"https://github.com/Dan-Tan.png","language":"C++","readme":"# Welcome to Riot-cpp\n**The documentation is wildly out of date. See endpoints.h or client_tests.cpp to view available endpoints.**\n\n\n[![ci](https://github.com/Dan-Tan/riot-cpp/workflows/ci/badge.svg)](https://github.com/Dan-Tan/riot-cpp/actions?query=workflow:\"ci\")\n[![build](https://github.com/Dan-Tan/riot-cpp/workflows/build/badge.svg)](https://github.com/Dan-Tan/riot-cpp/actions?query=workflow:\"build\")\n\nSimple Api client for the Riot Games Resful API implemented in C++ 20. \n\nThis library implements rate limiting to prevent api key blacklisting from exceeding Riot's rate limits. The library handles server response error's and will retry when a successful request is possible (429, 500, 503 errors). The client contains a logging class to help with debugging dependent code as well as providing information of the running of the client. Riot-cpp will adapt to the specific api key's rate limits after the first request and try to recover from errors.\n\nRiot-cpp uses [libcurl](https://curl.se/libcurl/) to send https get requests. The Json parser [simdjson](https://github.com/simdjson/simdjson) is used as a dependency for testing but NOT in the library. Parsing is done by the user.\n\nDocumentation is located at following page.\n\n[![view - Documentation](https://img.shields.io/badge/view-Documentation-blue?style=for-the-badge)](https://dan-tan.github.io/riot-cpp/)\n\n# Basic Usage\n\nBelow demonstrates a request to Match V5 endpoint using PUUID with optional arguements. All endpoints return a unique pointer to a vector of chars. Dependency on Jsoncpp or an individual Json library was remoed to allow the user to decide how they wanted to parse json, allows flexibility for users if performance is a key concern for large responses.\n\n```Cpp\n#include \"path/to/client.h\"\n\nusing json_ptr = std::unique_ptr\u003cstd::vector\u003cchar\u003e\u003e\n\nint main() {\n    \n    client::RiotApiClient example_client(\"\u003cpath/to/api/key\u003e\", \"\u003cpath/to/logging/file\u003e\", logging::LEVEL::\u003clevel\u003e, \u003cbool verbose\u003e);\n\n    json_ptr response = example_client.Match.by_puuid(\"routing\", \"puuid\", {\"startTime\", \u003cuser_arg\u003e}, {\"endTime\", \u003cuser_arg\u003e}, ...);\n}\n```\n\n## Including your API Key\n\nIt is highly recommended not to included api keys in source code as one may unintentionally share source coded publically with the api key exposed.\n\nRiot-cpp accepts a path to a json file to extract your api key. The file should be of the following format.\n\n```Json\n{\n    \"api-key\" : \"\u003cAPI KEY\u003e\"\n}\n```\nTechincally, as long as \"RGAPI-...\" is anywhere in the file the client will find it. \n\n## Installation\n\nCurrently the repository must be cloned or downloaded via the releases.\n\n```bash\ngit clone git+https://github.com/Dan-Tan/riot-cpp.git\n```\n\nGit submodules are highly recommended for use as a project dependency.\n\n```bash\ngit submodule add git+https://github.com/Dan-Tan/riot-cpp.git\n```\n### Option 1: CMake\n\nLinking to executable or library\n\n```cmake\nadd_subdirectory(\u003cpath/to/riot-cpp/src\u003e)\ntarget_include_directories(\u003cyour library or executable\u003e \u003cPRIVATE/PUBLIC\u003e \u003cpath/to/riot-cpp/src/riot-cpp\u003e)\ntarget_link_libraries(\u003cyour library or executable\u003e \u003cPRIVATE/PUBLIC\u003e riot-cpp)\n```\n\n### Option 2: Manually with libriot-cpp.\n\nThe shared object file is located as \"riot-cpp/build/src/riot-cpp/libriot-cpp.so\" and can be manually linked with your compiler of choice. You must include the following in your includes\n\n```cpp\n#include \"path/to/riot-cpp/src/client/client.h\"\n```\n\nSee options for linking with gcc, [Options for Linking](https://gcc.gnu.org/onlinedocs/gcc/Link-Options.html)\n\n## Disclaimer\n\nRiot-cpp is not developed by or affiliated with Riot Games. \n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdan-tan%2Friot-cpp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdan-tan%2Friot-cpp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdan-tan%2Friot-cpp/lists"}