Timeline args

FossilOrigin-Name: 801b2fb5ff2868522ef05e7eb50eb51c6411bb7f441530463abe933fd7a1dbda
This commit is contained in:
me@ow.nekobit.net 2022-03-03 15:51:31 +00:00
parent 1fa14898b0
commit c9c59ae4a2

View file

@ -21,7 +21,7 @@
int mastodont_timeline_list(mastodont_t* data,
char* list_id,
struct mstdnt_timeline_list_args* args,
struct mstdnt_args* args,
struct mstdnt_storage* storage,
struct mstdnt_status* statuses[],
size_t* size)
@ -32,15 +32,6 @@ int mastodont_timeline_list(mastodont_t* data,
snprintf(url, MSTDNT_URLSIZE, "api/v1/timelines/list/%s", list_id);
/* Default args */
struct mstdnt_timeline_list_args _args;
if (args == NULL)
{
_args.max_id = NULL;
_args.since_id = NULL;
_args.min_id = NULL;
_args.limit = 20;
args = &_args;
}
storage->needs_cleanup = 0;
union param_value u_local, u_remote, u_only_media,
@ -75,7 +66,7 @@ cleanup:
}
int mastodont_timeline_public(mastodont_t* data,
struct mstdnt_timeline_public_args* args,
struct mstdnt_args* args,
struct mstdnt_storage* storage,
struct mstdnt_status* statuses[],
size_t* size)
@ -84,18 +75,6 @@ int mastodont_timeline_public(mastodont_t* data,
struct mstdnt_fetch_results results = { 0 };
/* Default args */
struct mstdnt_timeline_public_args _args;
if (args == NULL)
{
_args.local = 0; /* Defaults to false */
_args.remote = 0;
_args.only_media = 0;
_args.max_id = NULL;
_args.since_id = NULL;
_args.min_id = NULL;
_args.limit = 20;
args = &_args;
}
storage->needs_cleanup = 0;
union param_value u_local, u_remote, u_only_media,