GitlabSource constructor

GitlabSource({
  1. required String groupId,
  2. required String token,
  3. required String apiUrl,
  4. required ApiClient apiClient,
})

Creates a new instance of GitlabSource.

  • groupId: The ID or URL-encoded path of the group.
  • token: Your GitLab private token.
  • apiUrl: The base URL of the GitLab API (e.g., 'https://gitlab.com/api/v4').
  • apiClient: An instance of ApiClient. If not provided, a new one will be created.

Implementation

GitlabSource({
  required this.groupId,
  required String token,
  required String apiUrl,
  required ApiClient apiClient,
}) : dio = apiClient.dio {
  dio.options.baseUrl = apiUrl;
  dio.options.headers['PRIVATE-TOKEN'] = token;
}