Swiftpack.co - laowudxf/VaporTencentApi as Swift Package

Swiftpack.co is a collection of thousands of indexed Swift packages. Search packages.
See all packages published by laowudxf.
laowudxf/VaporTencentApi 0.1.0
Tencent cloud api for Vapor
⭐️ 0
🕓 1 week ago
macOS
.package(url: "https://github.com/laowudxf/VaporTencentApi.git", from: "0.1.0")

VaporTencentApi

Tencent Api for Vapor.

simple usage:

  func getSts(req: Request) async throws -> JSON {
      let resp: ClientResponse = try await TencentClouldApi<STSPayload>(logger: req.logger)
          .sendReq(client:
                      req.client, apiRequst:
                      TencentClouldApi<STSPayload>.ApiRequest.init(payload: .init())
          )
      
      return try resp.content.decode(JSON.self)["Response"]
  }

There are some simple Api payload is implement:

  • CVMPayload
  • STSPayload
  • MailPayload

If you need some other ApiPayload, you should implement by yourself reference to 腾讯云api浏览器.

Need some variable in .env

#for stsPayload to get temp sts

TencentRoleArn

TencentSecretId

TencentSecretKey

GitHub

link
Stars: 0
Last commit: 1 week ago
jonrohan Something's broken? Yell at me @ptrpavlik. Praise and feedback (and money) is also welcome.

Swiftpack is being maintained by Petr Pavlik | @ptrpavlik | @swiftpackco | API | Analytics