getCampaign method
Retrieves information about the status, configuration, and other settings for a campaign.
May throw BadRequestException. May throw InternalServerErrorException. May throw PayloadTooLargeException. May throw ForbiddenException. May throw NotFoundException. May throw MethodNotAllowedException. May throw TooManyRequestsException.
Parameter applicationId
:
The unique identifier for the application. This identifier is displayed as
the Project ID on the Amazon Pinpoint console.
Parameter campaignId
:
The unique identifier for the campaign.
Implementation
Future<GetCampaignResponse> getCampaign({
required String applicationId,
required String campaignId,
}) async {
ArgumentError.checkNotNull(applicationId, 'applicationId');
ArgumentError.checkNotNull(campaignId, 'campaignId');
final response = await _protocol.sendRaw(
payload: null,
method: 'GET',
requestUri:
'/v1/apps/${Uri.encodeComponent(applicationId)}/campaigns/${Uri.encodeComponent(campaignId)}',
exceptionFnMap: _exceptionFns,
);
final $json = await _s.jsonFromResponse(response);
return GetCampaignResponse(
campaignResponse: CampaignResponse.fromJson($json),
);
}