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++.
- Host: GitHub
- URL: https://github.com/tomlin7/pastemyst-cpp
- Owner: tomlin7
- License: mit
- Created: 2021-06-08T08:05:16.000Z (about 4 years ago)
- Default Branch: master
- Last Pushed: 2021-11-16T13:04:37.000Z (over 3 years ago)
- Last Synced: 2025-01-26T03:13:40.622Z (4 months ago)
- Topics: api, api-wrapper, cpp, pastemyst
- Language: C++
- Homepage:
- Size: 228 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
README
![]()
![]()
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).