This is a function that can be used for most all endpoints of the API that return items that can be filtered with a query and typically need to be paginated. This reduces the amount of redundant code inside each unique function that pings the endpoints.
ig_generic_GET(relative_endpoint, query = NULL, item_accessor = NULL,
return_df = TRUE, paginate = FALSE, page_index = 1,
max_pages = 10, verbose = FALSE)