Verify credentials function
FossilOrigin-Name: 09c19810f3b3fafb6cb07161587a0583b3481a02a0fd7d0c9b94ce4804eea0c4
This commit is contained in:
parent
ceb0cbfba7
commit
27cde5386b
2 changed files with 19 additions and 0 deletions
|
@ -86,6 +86,9 @@ MSTDNT_ACCOUNT_ACTION_DECL(unblock);
|
|||
MSTDNT_ACCOUNT_ACTION_DECL(subscribe);
|
||||
MSTDNT_ACCOUNT_ACTION_DECL(unsubscribe);
|
||||
|
||||
int mastodont_verify_credentials(mastodont_t* data,
|
||||
struct mstdnt_account* acct,
|
||||
struct mstdnt_storage* storage);
|
||||
int mastodont_get_account(mastodont_t* data,
|
||||
int lookup_type,
|
||||
char* id,
|
||||
|
|
|
@ -78,6 +78,22 @@ int mastodont_get_account(mastodont_t* data,
|
|||
return mastodont_request(data, &req_args);
|
||||
}
|
||||
|
||||
int mastodont_verify_credentials(mastodont_t* data,
|
||||
struct mstdnt_account* acct,
|
||||
struct mstdnt_storage* storage)
|
||||
{
|
||||
struct mastodont_request_args req_args = {
|
||||
storage,
|
||||
"api/v1/accounts/verify_credentials",
|
||||
NULL, 0,
|
||||
NULL, 0,
|
||||
CURLOPT_HTTPGET,
|
||||
acct, /* args */
|
||||
mstdnt_account_json_callback, /* callback */
|
||||
};
|
||||
|
||||
return mastodont_request(data, &req_args);
|
||||
}
|
||||
|
||||
int mstdnt_account_json(struct mstdnt_account* acct, cJSON* js)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue