Fix type oh
FossilOrigin-Name: 636f7bf40191ca585a708a4fd0763b7b78b7315ee11e6d4f470880b7d326ee1b
This commit is contained in:
parent
98ddc0bcec
commit
3e64f416eb
2 changed files with 8 additions and 6 deletions
|
@ -49,9 +49,10 @@ struct mstdnt_search_results
|
|||
// TODO tags
|
||||
};
|
||||
|
||||
int mastodont_search(mastodont* data,
|
||||
int mastodont_search(mastodont_t* data,
|
||||
char* query,
|
||||
struct mstdnt_storage* storage,
|
||||
struct mstdnt_search_args* args,
|
||||
struct mstdnt_searcH_results* results);
|
||||
struct mstdnt_search_results* results);
|
||||
|
||||
#endif /* MASTODONT_SEARCH_H */
|
||||
|
|
|
@ -29,7 +29,7 @@ static const char* type_to_string(enum mstdnt_search_type type)
|
|||
}
|
||||
}
|
||||
|
||||
int mastodont_search(mastodont* data,
|
||||
int mastodont_search(mastodont_t* data,
|
||||
char* query,
|
||||
struct mstdnt_storage* storage,
|
||||
struct mstdnt_search_args* args,
|
||||
|
@ -39,7 +39,7 @@ int mastodont_search(mastodont* data,
|
|||
{ _MSTDNT_QUERY_STRING, "max_id", { .s = args->max_id } },
|
||||
{ _MSTDNT_QUERY_STRING, "min_id", { .s = args->min_id } },
|
||||
{ _MSTDNT_QUERY_STRING, "since_id", { .s = args->since_id } },
|
||||
{ _MSTDNT_QUERR_STRING, "q", { .s = query } },
|
||||
{ _MSTDNT_QUERY_STRING, "q", { .s = query } },
|
||||
{ _MSTDNT_QUERY_STRING, "max_id", { .s = args->max_id } },
|
||||
{ _MSTDNT_QUERY_STRING, "type", { .s = type_to_string(args->type) } },
|
||||
{ _MSTDNT_QUERY_INT, "resolve", { .i = args->resolve } },
|
||||
|
@ -52,11 +52,12 @@ int mastodont_search(mastodont* data,
|
|||
struct mastodont_request_args req_args = {
|
||||
storage,
|
||||
"api/v2/search",
|
||||
params, _mstdnt_arr_len(parma),
|
||||
params, _mstdnt_arr_len(params),
|
||||
NULL, 0,
|
||||
CURLOPT_HTTPGET,
|
||||
results,
|
||||
_mstdnt_search_result_callback,
|
||||
/* _mstdnt_search_result_callback, */
|
||||
NULL
|
||||
};
|
||||
|
||||
return mastodont_request(data, &req_args);
|
||||
|
|
Loading…
Reference in a new issue