Skip to content

Commit

Permalink
feat(wxapi): 新增微信就医助手通用消息推送接口
Browse files Browse the repository at this point in the history
  • Loading branch information
fudiwei committed Jan 15, 2024
1 parent c59bd6d commit 6123794
Show file tree
Hide file tree
Showing 5 changed files with 702 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,26 @@ public static class WechatApiClientExecuteCityServiceExtensions
return await client.SendRequestWithJsonAsync<Models.CityServiceSendMessageDataResponse>(flurlReq, data: request, cancellationToken: cancellationToken);
}

/// <summary>
/// <para>异步调用 [POST] /cityservice/sendchannelmsg 接口。</para>
/// <para>REF: https://docs.qq.com/doc/DQXRyQURVdHJsaGJy </para>
/// </summary>
/// <param name="client"></param>
/// <param name="request"></param>
/// <param name="cancellationToken"></param>
/// <returns></returns>
public static async Task<Models.CityServiceSendChannelMessageResponse> ExecuteCityServiceSendChannelMessageAsync(this WechatApiClient client, Models.CityServiceSendChannelMessageRequest request, CancellationToken cancellationToken = default)
{
if (client is null) throw new ArgumentNullException(nameof(client));
if (request is null) throw new ArgumentNullException(nameof(request));

IFlurlRequest flurlReq = client
.CreateRequest(request, HttpMethod.Post, "cityservice", "sendchannelmsg")
.SetQueryParam("access_token", request.AccessToken);

return await client.SendRequestWithJsonAsync<Models.CityServiceSendChannelMessageResponse>(flurlReq, data: request, cancellationToken: cancellationToken);
}

/// <summary>
/// <para>异步调用 [POST] /cityservice/getservicepath 接口。</para>
/// <para>REF: https://developers.weixin.qq.com/miniprogram/dev/platform-capabilities/cityservice/InterconnectionCapabilities/API/API.html </para>
Expand Down
Loading

0 comments on commit 6123794

Please sign in to comment.