Class ByteDanceMicroAppClientEventExtensions
- Namespace
- SKIT.FlurlHttpClient.ByteDance.MicroApp
- Assembly
- DH.SKIT.FlurlHttpClient.ByteDance.MicroApp.dll
为 ByteDanceMicroAppClient 提供回调通知事件的扩展方法。
public static class ByteDanceMicroAppClientEventExtensions
- Inheritance
-
ByteDanceMicroAppClientEventExtensions
- Inherited Members
Methods
DeserializeEventFromJson(ByteDanceMicroAppClient, string)
从 JSON 反序列化得到 ByteDanceMicroAppEvent 对象。
public static ByteDanceMicroAppEvent DeserializeEventFromJson(this ByteDanceMicroAppClient client, string callbackJson)
Parameters
client
ByteDanceMicroAppClientcallbackJson
string
Returns
DeserializeEventFromJson<TEvent>(ByteDanceMicroAppClient, string)
从 JSON 反序列化得到 ByteDanceMicroAppEvent 对象。
public static TEvent DeserializeEventFromJson<TEvent>(this ByteDanceMicroAppClient client, string callbackJson) where TEvent : ByteDanceMicroAppEvent, ByteDanceMicroAppEvent.Serialization.IJsonSerializable, new()
Parameters
client
ByteDanceMicroAppClientcallbackJson
string
Returns
- TEvent
Type Parameters
TEvent
DeserializeEventFromXml(ByteDanceMicroAppClient, string)
从 XML 反序列化得到 ByteDanceMicroAppEvent 对象。
public static ByteDanceMicroAppEvent DeserializeEventFromXml(this ByteDanceMicroAppClient client, string callbackXml)
Parameters
client
ByteDanceMicroAppClientcallbackXml
string
Returns
DeserializeEventFromXml<TEvent>(ByteDanceMicroAppClient, string)
从 XML 反序列化得到 ByteDanceMicroAppEvent 对象。
public static TEvent DeserializeEventFromXml<TEvent>(this ByteDanceMicroAppClient client, string callbackXml) where TEvent : ByteDanceMicroAppEvent, ByteDanceMicroAppEvent.Serialization.IXmlSerializable, new()
Parameters
client
ByteDanceMicroAppClientcallbackXml
string
Returns
- TEvent
Type Parameters
TEvent
VerifyEventSignatureForEcho(ByteDanceMicroAppClient, string, string, string, string)
验证回调通知事件签名。
REF: https://developer.open-douyin.com/docs/resource/zh-CN/mini-app/develop/component/message-push-customer-service
public static bool VerifyEventSignatureForEcho(this ByteDanceMicroAppClient client, string callbackTimestamp, string callbackNonce, string callbackMessage, string callbackSignature)
Parameters
client
ByteDanceMicroAppClientcallbackTimestamp
string头条回调通知中的 "timestamp" 查询参数。
callbackNonce
string头条回调通知中的 "nonce" 查询参数。
callbackMessage
string头条回调通知中的 "msg" 查询参数。
callbackSignature
string头条回调通知中的 "signature" 查询参数。
Returns
VerifyEventSignatureFromJson(ByteDanceMicroAppClient, string)
验证回调通知事件签名。
REF: https://developer.open-douyin.com/docs/resource/zh-CN/thirdparty/overview-guide/smallprogram/encryption
public static bool VerifyEventSignatureFromJson(this ByteDanceMicroAppClient client, string callbackJson)
Parameters
client
ByteDanceMicroAppClientcallbackJson
string
Returns
VerifyEventSignatureFromXml(ByteDanceMicroAppClient, string)
验证回调通知事件签名。
REF: https://developer.open-douyin.com/docs/resource/zh-CN/thirdparty/overview-guide/smallprogram/encryption
public static bool VerifyEventSignatureFromXml(this ByteDanceMicroAppClient client, string callbackXml)
Parameters
client
ByteDanceMicroAppClientcallbackXml
string