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
⭐️ 2
🕓 2 years 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: 2
Last commit: 2 years ago
Advertisement: IndiePitcher.com - Cold Email Software for Startups

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