diff --git a/include/mastodont_status.h b/include/mastodont_status.h index 4765411..11e1e2d 100644 --- a/include/mastodont_status.h +++ b/include/mastodont_status.h @@ -123,7 +123,14 @@ int mastodont_account_statuses(mastodont_t* data, struct mstdnt_storage* storage, struct mstdnt_status* statuses[], size_t* size); - +int mastodont_status_content(mastodont_t* data, + char* id, + struct mstdnt_storage* storage, + struct mstdnt_status* statuses_before[], + struct mstdnt_status* statuses_after[], + size_t* size_before, + size_t* size_after); + int mastodont_create_status(mastodont_t* data, struct mstdnt_create_status_args* args, struct mstdnt_storage* storage); diff --git a/src/application.c b/src/application.c index c480f56..5ad4b92 100644 --- a/src/application.c +++ b/src/application.c @@ -115,7 +115,7 @@ int mastodont_register_app(mastodont_t* data, curl_easy_setopt(data->curl, CURLOPT_POSTFIELDS, post); - if (mastodont_fetch_curl(data, "api/v1/apps", &results, CURLOPT_HTTPGET) != CURLE_OK) + if (mastodont_fetch_curl(data, "api/v1/apps", &results, CURLOPT_POST) != CURLE_OK) { res = 1; goto cleanup; @@ -183,7 +183,7 @@ int mastodont_obtain_oauth_token(mastodont_t* data, curl_easy_setopt(data->curl, CURLOPT_POSTFIELDS, post); - if (mastodont_fetch_curl(data, "oauth/token", &results, CURLOPT_HTTPGET) != CURLE_OK) + if (mastodont_fetch_curl(data, "oauth/token", &results, CURLOPT_POST) != CURLE_OK) { res = 1; goto cleanup;