TencentCloudSmsGateway class
Tencent Cloud SMS gateway.
- Implemented types
Constructors
- TencentCloudSmsGateway({required String appId, required String secretId, required String secretKey, String region = 'ap-guangzhou', TencentCloudSmsResponseLanguage language = TencentCloudSmsResponseLanguage.en})
-
const
Properties
Methods
-
generateAuthorization(
Map< String, String> headers, String payload, DateTime date) → String - Generate the authorization for the request.
-
generateCanonicalHeaders(
Map< String, String> headers) → String - Generate the canonical headers for the request.
-
generateCanonicalRequest(
Map< String, String> headers, String payload) → String - 按如下伪代码格式拼接规范请求串(CanonicalRequest):
-
generateCredentialScope(
DateTime date, String service) → String -
凭证范围,格式为
Date/service/tc3_request
, 包含日期、所请求的服务和终止字符串(tc3_request)。 -
generateDate(
DateTime date) → String -
Generate date string for the request.
Format:
yyyy-MM-DD
. Example:2019-02-25
. -
generateHashedRequestPayload(
String payload) → String - 请求正文(payload,即 body,此示例为
-
generateHeaders(
String payload) → Future< Map< String, String> > - Generate the headers for the request.
-
generateJsonBody(
Iterable< PhoneNumber> to, Message message) → Future<Map< String, dynamic> > - Generate the JSON body for the request.
-
generatePhoneNumber(
PhoneNumber phoneNumber) → String - Generate the phone number.
-
generateSecretDate(
DateTime date) → Digest -
Generate the secret date for the request.
SecretDate = HMAC_SHA256("TC3" + SecretKey, Date)
-
generateSecretSigning(
List< int> secretService) → Digest - Generate secret signing.
-
generateSignedHeaders(
Map< String, String> headers) → String - 参与签名的头部信息,说明此次请求有哪些头部参与了签名,和 CanonicalHeaders 包含的 头部内容是一一对应的。content-type 和 host 为必选头部。
-
generateStringToSign(
String canonicalRequest, DateTime date, String service) → String - 按如下格式拼接待签名字符串:
-
generateTimestamp(
DateTime date) → String - Generate the timestamp.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
send(
Iterable< PhoneNumber> to, Message message, Client client) → Future<Iterable< Response> > -
Convert a list of phone numbers and a message to a list of requests
override
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited