buildWorkflowList method
List the workflows of an app
List the workflows that were triggered at any time for a given Bitrise app. Note that it might list workflows that are currently not defined in the app's bitrise.yml
configuration - and conversely, workflows that were never triggered will not be listed even if they are defined in the bitrise.yml
file.
Implementation
Future<Response<V0BuildWorkflowListResponseModel>> buildWorkflowList({
required String appSlug,
CancelToken? cancelToken,
Map<String, dynamic>? headers,
Map<String, dynamic>? extra,
ValidateStatus? validateStatus,
ProgressCallback? onSendProgress,
ProgressCallback? onReceiveProgress,
}) async {
final _path = r'/apps/{app-slug}/build-workflows'.replaceAll('{' r'app-slug' '}', appSlug.toString());
final _options = Options(
method: r'GET',
headers: <String, dynamic>{
...?headers,
},
extra: <String, dynamic>{
'secure': <Map<String, String>>[
{
'type': 'apiKey',
'name': 'AddonAuthToken',
'keyName': 'Bitrise-Addon-Auth-Token',
'where': 'header',
},{
'type': 'apiKey',
'name': 'PersonalAccessToken',
'keyName': 'Authorization',
'where': 'header',
},
],
...?extra,
},
contentType: [
'application/json',
].first,
validateStatus: validateStatus,
);
final _queryParameters = <String, dynamic>{
};
final _response = await _dio.request<Object>(
_path,
options: _options,
queryParameters: _queryParameters,
cancelToken: cancelToken,
onSendProgress: onSendProgress,
onReceiveProgress: onReceiveProgress,
);
V0BuildWorkflowListResponseModel _responseData;
try {
const _responseType = FullType(V0BuildWorkflowListResponseModel);
_responseData = _serializers.deserialize(
_response.data!,
specifiedType: _responseType,
) as V0BuildWorkflowListResponseModel;
} catch (error) {
throw DioError(
requestOptions: _response.requestOptions,
response: _response,
type: DioErrorType.other,
error: error,
);
}
return Response<V0BuildWorkflowListResponseModel>(
data: _responseData,
headers: _response.headers,
isRedirect: _response.isRedirect,
requestOptions: _response.requestOptions,
redirects: _response.redirects,
statusCode: _response.statusCode,
statusMessage: _response.statusMessage,
extra: _response.extra,
);
}