An open API service indexing awesome lists of open source software.

https://github.com/tomlin7/pastemyst-cpp

A fast API wrapper for PasteMyst written in C++.
https://github.com/tomlin7/pastemyst-cpp

api api-wrapper cpp pastemyst

Last synced: 3 months ago
JSON representation

A fast API wrapper for PasteMyst written in C++.

Awesome Lists containing this project

README

        



Logo




Build status


GitHub issues


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:

```cpp
#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](https://github.com/billyeatcookies/pastemyst-cpp/tree/master/pastemyst.sample) for further usage instructions.

You can find a list of endpoints over on PasteMyst's [API docs](https://paste.myst.rs/api-docs/). Each of these endpoints has an equivalent wrapper method in the library.

## Requirements

- [vcpkg](https://github.com/microsoft/vcpkg)
- [cpr](https://github.com/whoshuu/cpr)
- [nlohmann/json](https://github.com/nlohmann/json)

```cmd
> 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) license.

## Acknowledgements

Thanks to [WaifuShork](https://github.com/WaifuShork) for helping me out on writing this, check [pastemystgo](https://github.com/WaifuShork/pastemystgo).