mastodonpp  0.0.0
Classes | Typedefs | Enumerations | Functions
mastodonpp Namespace Reference

C++ wrapper for the Mastodon API. More...

Classes

struct  answer_type
 Return type for Requests. More...
 
class  API
 Holds API endpoints. More...
 
class  Connection
 Represents a connection to an instance. Used for requests. More...
 
class  CURLException
 Exception for libcurl errors. More...
 
class  CURLWrapper
 Handles the details of network connections. More...
 
class  Instance
 Holds the access data of an instance. More...
 

Typedefs

using parametermap = map< string, variant< string, vector< string > >>
 std::map of parameters for API calls. More...
 

Enumerations

enum  http_method {
  GET, POST, PATCH, PUT,
  DELETE
}
 The HTTP method. More...
 

Functions

std::ostream & operator<< (std::ostream &out, const answer_type &answer)
 

Detailed Description

C++ wrapper for the Mastodon API.

All text input is expected to be UTF-8.

Since
0.1.0

Typedef Documentation

◆ parametermap

using mastodonpp::parametermap = typedef map<string, variant<string, vector<string> >>

std::map of parameters for API calls.

Example:

parametermap parameters
{
{"id", "12"},
{"poll[options]", vector<string>{"Yes", "No", "Maybe"}}
};
Since
0.1.0

Enumeration Type Documentation

◆ http_method

The HTTP method.

Since
0.1.0
45 {
46  GET,
47  POST,
48  PATCH,
49  PUT,
50  DELETE
51 };

Function Documentation

◆ operator<<()

std::ostream& mastodonpp::operator<< ( std::ostream &  out,
const answer_type answer 
)
Since
0.1.0
33 {
34  out << answer.body;
35  return out;
36 }
mastodonpp::parametermap
map< string, variant< string, vector< string > >> parametermap
std::map of parameters for API calls.
Definition: curl_wrapper.hpp:67