Skip to content

tomlin7/pastemyst-cpp

Repository files navigation

Logo

A fast API wrapper for PasteMyst written in C++.
Official pastemyst API docs found here.

All aspects of the v2 endpoint are currently implemented.


Usage

Clone this repository. Add reference to pastemyst in your project, and you are ready to go!

For example, information on a paste can be retrieved as such:

#include "pastemyst.h"

int main()
{
    Client client;

    std::string pasteID = "paste_id";
    if(client.PasteExists(pasteID))
    {
        auto paste = client.GetPaste(pasteID);
    }
}

Have a look at this complete sample project for further usage instructions.

You can find a list of endpoints over on PasteMyst's API docs. Each of these endpoints has an equivalent wrapper method in the library.

Requirements

> git clone https://github.com/microsoft/vcpkg
> .\vcpkg\bootstrap-vcpkg.bat
> .\vcpkg\vcpkg integrate install
> vcpkg install cpr nlohmann-json

License

This project is available under a MIT license.

Acknowledgements

Thanks to WaifuShork for helping me out on writing this, check pastemystgo.