Timeline updates
FossilOrigin-Name: 0fbfad08b9afe9e0286a9d8a5f053eb396cc5bdd21b03ad3d034e5c5e6dc730a
This commit is contained in:
parent
949876fc7f
commit
0908b2979a
2 changed files with 21 additions and 28 deletions
|
@ -146,7 +146,7 @@ int mstdnt_statuses_json_callback(cJSON* json, void** _args)
|
|||
{
|
||||
struct mstdnt_statuses* statuses = malloc(sizeof(struct mstdnt_statuses));
|
||||
*_args = statuses;
|
||||
return mstdnt_statuses_json(&(statuses->statuses), &(statuses->size), json);
|
||||
return mstdnt_statuses_json(&(statuses->statuses), &(statuses->len), json);
|
||||
}
|
||||
|
||||
int mstdnt_get_account_statuses(mastodont_t* data,
|
||||
|
|
|
@ -44,7 +44,6 @@ int mstdnt_timeline_list(mastodont_t* data,
|
|||
};
|
||||
|
||||
struct mstdnt_request_args req_args = {
|
||||
.storage = storage,
|
||||
.url = url,
|
||||
.params_query = params,
|
||||
.params_query_len = _mstdnt_arr_len(params),
|
||||
|
@ -86,7 +85,6 @@ int mstdnt_timeline_tag(mastodont_t* data,
|
|||
};
|
||||
|
||||
struct mstdnt_request_args req_args = {
|
||||
.storage = storage,
|
||||
.url = url,
|
||||
.params_query = params,
|
||||
.params_query_len = _mstdnt_arr_len(params),
|
||||
|
@ -119,10 +117,7 @@ int mstdnt_timeline_public(mastodont_t* data,
|
|||
struct mstdnt_args* m_args,
|
||||
mstdnt_request_cb_t cb_request,
|
||||
void* cb_args,
|
||||
struct mstdnt_timeline_args* args,
|
||||
struct mstdnt_storage* storage,
|
||||
struct mstdnt_status* statuses[],
|
||||
size_t* size)
|
||||
struct mstdnt_timeline_args* args)
|
||||
{
|
||||
struct _mstdnt_query_param params[] = {
|
||||
{ _MSTDNT_QUERY_BOOL, "local", { .b = args->local } },
|
||||
|
@ -139,7 +134,6 @@ int mstdnt_timeline_public(mastodont_t* data,
|
|||
};
|
||||
|
||||
struct mstdnt_request_args req_args = {
|
||||
.storage = storage,
|
||||
.url = "api/v1/timelines/public",
|
||||
.params_query = params,
|
||||
.params_query_len = _mstdnt_arr_len(params),
|
||||
|
@ -159,10 +153,7 @@ int mstdnt_timeline_direct(mastodont_t* data,
|
|||
struct mstdnt_args* m_args,
|
||||
mstdnt_request_cb_t cb_request,
|
||||
void* cb_args,
|
||||
struct mstdnt_timeline_args* args,
|
||||
struct mstdnt_storage* storage,
|
||||
struct mstdnt_status* statuses[],
|
||||
size_t* size)
|
||||
struct mstdnt_timeline_args* args)
|
||||
{
|
||||
struct _mstdnt_query_param params[] = {
|
||||
{ _MSTDNT_QUERY_STRING, "max_id", { .s = args->max_id } },
|
||||
|
@ -174,14 +165,15 @@ int mstdnt_timeline_direct(mastodont_t* data,
|
|||
};
|
||||
|
||||
struct mstdnt_request_args req_args = {
|
||||
storage,
|
||||
"api/v1/timelines/direct",
|
||||
params, _mstdnt_arr_len(params),
|
||||
NULL, 0,
|
||||
CURLOPT_HTTPGET,
|
||||
NULL,
|
||||
NULL,
|
||||
mstdnt_statuses_json_callback,
|
||||
.url = "api/v1/timelines/direct",
|
||||
.params_query = params,
|
||||
.params_query_len = _mstdnt_arr_len(params),
|
||||
.params_post = NULL,
|
||||
.params_post_len = 0,
|
||||
.request_type = CURLOPT_HTTPGET,
|
||||
.request_type_custom = NULL,
|
||||
.args = NULL,
|
||||
.callback = mstdnt_statuses_json_callback,
|
||||
};
|
||||
|
||||
return mstdnt_request(data, m_args, cb_request, cb_args, &req_args);
|
||||
|
@ -209,14 +201,15 @@ int mstdnt_timeline_home(mastodont_t* data,
|
|||
};
|
||||
|
||||
struct mstdnt_request_args req_args = {
|
||||
storage,
|
||||
"api/v1/timelines/home",
|
||||
params, _mstdnt_arr_len(params),
|
||||
NULL, 0,
|
||||
CURLOPT_HTTPGET,
|
||||
NULL,
|
||||
NULL,
|
||||
mstdnt_statuses_json_callback,
|
||||
.url = "api/v1/timelines/home",
|
||||
.params_query = params,
|
||||
.params_query_len = _mstdnt_arr_len(params),
|
||||
.params_post = NULL,
|
||||
.params_post_len = 0,
|
||||
.request_type = CURLOPT_HTTPGET,
|
||||
.request_type_custom = NULL,
|
||||
.args = NULL,
|
||||
.callback = mstdnt_statuses_json_callback,
|
||||
};
|
||||
|
||||
return mstdnt_request(data, m_args, cb_request, cb_args, &req_args);
|
||||
|
|
Loading…
Reference in a new issue