getIntegrationsByProvider method
Returns ONE provider with this org's connection status — the same view list carries, for a single id.
Returns ONE provider with this org's connection status — the same view list carries, for a single id. An unknown id is 404, and so is a user-plane provider: the org surface never resolves one.
Parameters:
- String provider (required): Provider is the registry id of the connector — "slack", "github", "cloudflare". Unknown ids are 404, as are the user-plane (/v1/integrations/connectors) providers, which this surface never resolves.
Implementation
Future<ProviderView?> getIntegrationsByProvider(String provider,) async {
final response = await getIntegrationsByProviderWithHttpInfo(provider,);
if (response.statusCode >= HttpStatus.badRequest) {
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
}
// When a remote server returns no body with a status of 204, we shall not decode it.
// At the time of writing this, `dart:convert` will throw an "Unexpected end of input"
// FormatException when trying to decode an empty string.
if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) {
return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'ProviderView',) as ProviderView;
}
return null;
}