{"id":20907378,"url":"https://github.com/tastytea/mastodonpp","last_synced_at":"2026-04-21T12:34:57.975Z","repository":{"id":128275280,"uuid":"231518738","full_name":"tastytea/mastodonpp","owner":"tastytea","description":"[mirror]  C++ wrapper for the Mastodon and Pleroma APIs.","archived":false,"fork":false,"pushed_at":"2022-11-13T05:24:59.000Z","size":1354,"stargazers_count":3,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-02-18T05:43:36.644Z","etag":null,"topics":["fediverse","mastodon","mastodon-api","pleroma","pleroma-api"],"latest_commit_sha":null,"homepage":"https://schlomp.space/tastytea/mastodonpp","language":"C++","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"agpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/tastytea.png","metadata":{"files":{"readme":"README.adoc","changelog":null,"contributing":"CONTRIBUTING.adoc","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.adoc","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2020-01-03T05:32:55.000Z","updated_at":"2024-05-31T01:57:27.000Z","dependencies_parsed_at":null,"dependency_job_id":"ebc7a66a-e030-4ff1-a1df-c224a9d53c4c","html_url":"https://github.com/tastytea/mastodonpp","commit_stats":{"total_commits":315,"total_committers":1,"mean_commits":315.0,"dds":0.0,"last_synced_commit":"c48f1dc3d0566cef2baf96df7b3a7c55490a3e91"},"previous_names":[],"tags_count":12,"template":false,"template_full_name":null,"purl":"pkg:github/tastytea/mastodonpp","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tastytea%2Fmastodonpp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tastytea%2Fmastodonpp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tastytea%2Fmastodonpp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tastytea%2Fmastodonpp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tastytea","download_url":"https://codeload.github.com/tastytea/mastodonpp/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tastytea%2Fmastodonpp/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32092003,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-21T11:25:29.218Z","status":"ssl_error","status_checked_at":"2026-04-21T11:25:28.499Z","response_time":128,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["fediverse","mastodon","mastodon-api","pleroma","pleroma-api"],"created_at":"2024-11-18T13:38:08.162Z","updated_at":"2026-04-21T12:34:57.940Z","avatar_url":"https://github.com/tastytea.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"= mastodonpp\n:toc: preamble\n:project: mastodonpp\n:uri-base: https://schlomp.space/tastytea/{project}\n:uri-branch-main: {uri-base}/src/branch/main\n:uri-wp-mastodon: https://en.wikipedia.org/wiki/Mastodon_(software)\n:uri-pleroma: https://pleroma.social/\n:uri-mastodon-cpp: https://schlomp.space/tastytea/mastodon-cpp\n:uri-reference: https://doc.schlomp.space/{project}/\n:uri-gcc: https://gcc.gnu.org/\n:uri-clang: https://clang.llvm.org/\n:uri-cmake: https://cmake.org/\n:uri-doxygen: http://www.doxygen.nl/\n:uri-catch: https://github.com/catchorg/Catch2\n:uri-dpkg: https://packages.qa.debian.org/dpkg\n:uri-rpm-build: http://www.rpm.org\n:uri-libcurl: https://curl.haxx.se/libcurl/\n:uri-nodeinfo: https://nodeinfo.diaspora.software/\n:uri-clang-tidy: https://clang.llvm.org/extra/clang-tidy/\n\n*{project}* is a C++ wrapper for the link:{uri-wp-mastodon}[Mastodon] and\nlink:{uri-pleroma}[Pleroma] APIs. It replaces\nlink:{uri-mastodon-cpp}[mastodon-cpp].\n\n[IMPORTANT]\nmastodonpp is in maintenance mode. I will continue to fix bugs, but won't add\nnew features. If you'd like to adopt this project, please get in touch.\n\nWe aim to create a library that is comfortable, yet minimal. All API endpoints\nfrom Mastodon and Pleroma are stored in ``enum class``es, to counteract typos\nand make your life easier. The network-facing code is built on\nlink:{uri-libcurl}[libcurl], a mature and stable library that is available on\nmost operating systems. The library does not parse the responses itself, but\nreturns to you the raw data, because we know everyone has their favorite JSON\nlibrary and we don't want to impose our choice on you!\n\n== Features\n\nHere is a rough overview of the features:\n\n* [x] `GET`, Streaming `GET`, `POST`, `PATCH`, `PUT` and `DELETE` requests.\n* [x] Comfortable access to pagination headers.\n* [x] Report maximum allowed character per post.\n* [x] Simple function to register a new “app” (get an access token).\n* [x] Report which mime types are allowed for posting statuses.\n* [x] Find and retrieve link:{uri-nodeinfo}[NodeInfo].\n* [x] Easy access to the libcurl handle for maximum configurability.\n* [x] Set proxy server, User-Agent and the path to the CA bundle.\n\n== Usage\n\nHave a look at the link:{uri-reference}[reference].\n\n=== Example\n\n[source,cpp]\n--------------------------------------------------------------------------------\n#include \u003cmastodonpp/mastodonpp.hpp\u003e\n#include \u003ciostream\u003e\n\nint main()\n{\n    mastodonpp::Instance instance{\"example.com\", \"123AccessToken123\"};\n    instance.set_proxy(\"socks4a://[::1]:9050\");\n    mastodonpp::Connection connection{instance};\n\n    const mastodonpp::parametermap parameters\n        {\n            {\"status\", \"How is the weather?\"},\n            {\"poll[options]\", vector\u003cstring_view\u003e{\"Nice\", \"not nice\"}},\n            {\"poll[expires_in]\", \"86400\"}\n        };\n    auto answer{connection.post(mastodonpp::API::v1::statuses, parameters)};\n\n    if (answer)\n    {\n        std::cout \u003c\u003c answer \u003c\u003c std::endl;\n    }\n}\n--------------------------------------------------------------------------------\n\nlink:{uri-reference}/examples.html[More examples] are included in the reference.\n\n== Install\n\n[alt=\"Packaging status\" link=https://repology.org/project/mastodonpp/versions]\nimage::https://repology.org/badge/vertical-allrepos/mastodonpp.svg[]\n\n=== Gentoo\n\n[source,shell]\n--------------------------------------------------------------------------------\neselect repository enable guru\necho 'dev-cpp/mastodonpp' \u003e\u003e /etc/portage/package.accept_keywords/mastodonpp\nemaint sync -r guru\nemerge -a dev-cpp/mastodonpp\n--------------------------------------------------------------------------------\n\n=== Arch\n\nThe git-version is available via the AUR:\n\u003chttps://aur.archlinux.org/packages/mastodonpp-git/\u003e.\n\n=== Debian and Ubuntu\n\nWe automatically generate packages for Debian buster (10) and Ubuntu bionic\n(18.04), but only for x86_64 (amd64). Download them at\nlink:{uri-base}/releases[schlomp.space].\n\n[source,shell]\n--------------------------------------------------------------------------------\napt install ./libmastodonpp*.deb\n--------------------------------------------------------------------------------\n\n=== CentOS\n\nWe automatically generate packages for CentOS 8, but only for x86_64\n(amd64). Download them at link:{uri-base}/releases[schlomp.space].\n\n[source,shell]\n--------------------------------------------------------------------------------\nyum install ./libmastodonpp*.rpm\n--------------------------------------------------------------------------------\n\n=== From source\n\n==== Dependencies\n\n* Tested OS: Linux\n* C\\++ compiler with C++17 support (tested: link:{uri-gcc}[GCC] 7/8/9,\n  link:{uri-clang}[clang] 6/7)\n* link:{uri-cmake}[CMake] (at least: 3.9)\n* link:{uri-libcurl}[libcurl] (at least: 7.56)\n* Optional\n  ** Documentation: link:{uri-doxygen}[Doxygen] (tested: 1.8)\n  ** Tests: link:{uri-catch}[Catch] (tested: 2.5 / 1.2)\n  ** DEB package: link:{uri-dpkg}[dpkg] (tested: 1.19)\n  ** RPM package: link:{uri-rpm-build}[rpm-build] (tested: 4.11)\n\n==== Get sourcecode\n\n===== Release\n\nDownload the current release at link:{uri-base}/releases[schlomp.space].\n\n===== Development version\n\n[source,shell]\n--------------------------------------------------------------------------------\ngit clone https://schlomp.space/tastytea/mastodonpp.git\n--------------------------------------------------------------------------------\n\n==== Compile\n\n[source,shell]\n--------------------------------------------------------------------------------\nmkdir -p build \u0026\u0026 cd build\ncmake ..\ncmake --build . -- -j$(nproc --ignore=1)\n--------------------------------------------------------------------------------\n\n.CMake options:\n* `-DCMAKE_BUILD_TYPE=Debug` for a debug build.\n* `-DWITH_TESTS=YES` if you want to compile the tests.\n* `-DWITH_EXAMPLES=YES` if you want to compile the examples.\n* `-DWITH_DOC=YES` if you want to generate the API documentation.\n* `-DWITH_CLANG-TIDY=YES` to check the sourcecode with\n  link:{uri-clang-tidy}[clang-tidy] while compiling.\n* One of:\n  ** `-DWITH_DEB=YES` if you want to be able to generate a deb-package.\n  ** `-DWITH_RPM=YES` if you want to be able to generate an rpm-package.\n\nTo create a deb or rpm package, run `make package` after compiling.\n\n===== Windows\n\nmastodonpp has been reported to compile with MinGW GCC, but\n`http_method::DELETE` has to be renamed, because Windows headers define a\n`DELETE` macro.\n\ninclude::{uri-base}/raw/branch/main/CONTRIBUTING.adoc[]\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftastytea%2Fmastodonpp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftastytea%2Fmastodonpp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftastytea%2Fmastodonpp/lists"}