diff --git a/include/mastodont_relationship.h b/include/mastodont_relationship.h index 3962b12..09a91c0 100644 --- a/include/mastodont_relationship.h +++ b/include/mastodont_relationship.h @@ -16,6 +16,7 @@ #ifndef MASTODONT_RELATIONSHIP_H #define MASTODONT_RELATIONSHIP_H #include +#include struct mstdnt_relationship { diff --git a/src/relationship.c b/src/relationship.c index 9b846be..ab64230 100644 --- a/src/relationship.c +++ b/src/relationship.c @@ -14,11 +14,10 @@ */ #include -#include struct _mstdnt_relationships_cb_args { - struct mstdnt_relationship* relationships; + struct mstdnt_relationship** relationships; size_t* size; }; @@ -34,8 +33,7 @@ int _mstdnt_relationships_result_callback(struct mstdnt_fetch_results* results, void* _args) { struct _mstdnt_relationships_cb_args* args = _args; - return mstdnt_relationships_result(storage, results, args->relationships, args->size); - // TODO here + return mstdnt_relationships_result(results, storage, args->relationships, args->size); } int mastodont_get_relationships(mastodont_t* data, @@ -54,7 +52,7 @@ int mastodont_get_relationships(mastodont_t* data, NULL, 0, NULL, 0, /* params, _mstdnt_arr_len(params), */ - CURLOPT_GET, + CURLOPT_HTTPGET, &cb_args, _mstdnt_relationships_result_callback, /* TODO populate the status back? * (not sure if the api returns it or not) */