Module twitch_api2::helix::search::search_categories
source · [−]Available on crate feature
helix
only.Expand description
Returns a list of games or categories that match the query via name either entirely or partially.
search-categories
Accessing the endpoint
Request: SearchCategoriesRequest
To use this endpoint, construct a SearchCategoriesRequest
with the SearchCategoriesRequest::builder()
method.
use twitch_api2::helix::search::search_categories;
let request = search_categories::SearchCategoriesRequest::builder()
.query("hello")
.build();
Response: Category
Send the request to receive the response with HelixClient::req_get()
.
use twitch_api2::helix::{self, search::search_categories};
let request = search_categories::SearchCategoriesRequest::builder()
.query("hello")
.build();
let response: Vec<search_categories::Category> = client.req_get(request, &token).await?.data;
You can also get the http::Request
with request.create_request(&token, &client_id)
and parse the http::Response
with SearchCategoriesRequest::parse_response(None, &request.get_uri(), response)
Structs
Query Parameters for Search Categories
Type Definitions
Return Values for Search Categories