Giter Club home page Giter Club logo

cpp-sdk's Introduction

Top.gg SDK for C++

The official open-source C++ wrapper for the Top.gg API.

This is a simple C++ SDK for interacting with the Top.gg API.

Features

  • Making authenticated requests to the Top.gg API using a bot token
  • Parsing Top.gg API responses into convenient C++ objects
  • Examples demonstrating how to use the SDK to implement a votebot and leaderboard

Getting Started

  1. Clone the repository:
git clone https://github.com/pneb/cpp-sdk.git
  1. Add the include and src directories to your project's include path and library path, respectively.

  2. Build the topgg library:

cd cpp-sdk
mkdir build
cd build
cmake ..
make
  1. Build the examples:
make example-votebot
make example-leaderboard
  1. Run the examples:
./example-votebot
./example-leaderboard

Note that the examples require you to have a Top.gg bot token set as an environment variable TOPGG_BOT_TOKEN.

Usage

Include the topgg/http/client.hpp header and create an instance of topgg::Api with your Top.gg bot token:

#include <string>
#include "topgg/topgg.hpp"

// Put your bot token here
const std::string BOT_TOKEN = "YOUR_BOT_TOKEN";

int main()
{
    topgg::Api api(BOT_TOKEN);

    // Use the api object to make requests to the Top.gg API
    return 0;
}

Refer to the Top.gg API documentation for information on the available endpoints and request structures.

Contributing

Pull requests are welcome! Please include unit tests for any added or modified functionality.

cpp-sdk's People

Contributors

pixxies avatar voltrexkeyva avatar null8626 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.