started work on app registering

This commit is contained in:
tastytea 2018-02-05 14:56:16 +01:00
parent 26e06e42a1
commit 0a81597e3d
Signed by: tastytea
GPG Key ID: 59346E0EA35C67E5
3 changed files with 29 additions and 1 deletions

View File

@ -5,9 +5,12 @@ project (mastodon-cpp
VERSION 0.2.1
LANGUAGES CXX
)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++14 -fPIC")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fPIC")
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -Wall")
set(CMAKE_CXX_STANDARD 14)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
include_directories(${MY_SOURCE_DIR}/src)
include_directories(${PROJECT_BINARY_DIR})

View File

@ -157,3 +157,22 @@ const string API::maptoformdata(const parametermap &map)
ttdebug << "Form data: \n" << header << body;
return header + body;
}
// const string API::register_app(const std::string &instance,
// const std::string &client_name,
// const std::string &redirect_uris,
// const std::string &scopes,
// const std::string &website)
// {
// API::parametermap parameters =
// {
// { "client_name", { client_name } },
// { "redirect_uris", { redirect_uris } },
// { "scopes", { scopes } },
// { "website", { website } }
// };
// string answer;
// std::uint16_t ret = post(API::v1::apps, parameters, answer);
// }

View File

@ -169,6 +169,12 @@ public:
*/
const std::string urlencode(const std::string &str) const;
// const std::string register_app(const std::string &instance,
// const std::string &client_name,
// const std::string &redirect_uris,
// const std::string &scopes,
// const std::string &website = "");
/*!
* @brief Make a GET request which doesn't require an argument.
*