Module fetch_api

Module fetch_api 

Source
Expand description

Fetches time logs and related data from the GitLab API.

Re-exportsยง

pub use fetch_options::FetchOptions;

Modulesยง

api_model ๐Ÿ”’
Structs for deserializing the JSON response from the GitLab API
deserializer ๐Ÿ”’
Contains custom deserializer logic for the items from the GitLab API.
fetch_options ๐Ÿ”’
Data structure with settings for accessing the GitLab API.
http_requests ๐Ÿ”’
This module is an abstraction of the reqwest API so dependency injection can be used for unit and integration tests.

Enumsยง

QueryError
Errors that can occur during an API query.

Functionsยง

build_query_payload ๐Ÿ”’
Builds a GraphQL query with the given project path and optional cursor for pagination.
fetch_project_time_logs
Fetches the project time logs from the GitLab API. A valid access token is required for internal and private projects. To call the function, create a FetchOptions instance with FetchOptions::new().
fetch_project_time_logs_impl ๐Ÿ”’
Implementation of fetch_project_time_logs() that takes FetchOptions and an HTTP client as parameter.
run_query ๐Ÿ”’
Runs a query against the GitLab API and returns the response as a string. Parsing the response is up to the caller. If there is an error, the function returns a QueryError.