Status application info

FossilOrigin-Name: 3a9f6c4cefebb8f9fb29f05a80cf4ab3f0350eea79c2c78c534f9f19ce6bc810
This commit is contained in:
nekobit 2022-07-30 20:03:39 +00:00
parent ee32bdf4d0
commit 9a7b800cc1
3 changed files with 9 additions and 0 deletions

View file

@ -75,4 +75,6 @@ int mastodont_obtain_oauth_token(mastodont_t* data,
struct mstdnt_storage* storage,
struct mstdnt_oauth_token* app);
void _mstdnt_val_application_call(cJSON* v, void* _type);
#endif /* MASTODONT_ACCOUNT */

View file

@ -20,6 +20,12 @@
#include <mastodont_query.h>
#include <mastodont_request.h>
void _mstdnt_val_application_call(cJSON* v, void* _type)
{
struct mstdnt_app* type = _type;
mstdnt_app_json(type, v->child);
}
static int mstdnt_app_json(cJSON* json, struct mstdnt_app* app)
{
/* Zero out */

View file

@ -115,6 +115,7 @@ int mstdnt_status_json(struct mstdnt_status* status, cJSON* js)
{ "bookmarked", &(status->bookmarked), _mstdnt_val_bool_call },
{ "pinned", &(status->pinned), _mstdnt_val_bool_call },
{ "reblogs_count", &(status->reblogs_count), _mstdnt_val_uint_call },
{ "application", &(status->application), _mstdnt_val_application_call },
{ "favourites_count", &(status->favourites_count), _mstdnt_val_uint_call },
{ "replies_count", &(status->replies_count), _mstdnt_val_uint_call },
{ "media_attachments", &att_args, _mstdnt_val_attachments_call },