Merge pull request #11 from vapor-community/vapor-4 Update to depend on Vapor 4 and TelesignKit.
Merge pull request #11 from vapor-community/vapor-4
Update to depend on Vapor 4 and TelesignKit.
In your Package.swift file, add the following
Package.swift
.package(url: "https://github.com/vapor-community/telesign-provider.git", from: "3.0.0-beta")
Register the provider to your Application in Configure.swift
Configure.swift
app.register(TelesignProvider(apiKey: "YOUR_API_KEY", customerId: "YOUR_CUSTOMER_ID"))
Now we can interact with the API via the TelesignClient that’s created on your behalf via the Provider we just registered.
TelesignClient
import Telesign let telesignClient = app.make(TelesignClient.self) telesignClient.messaging.send(message: "Hello Vapor!", to: "1234567", messageType: .ARN)
©Copyright 2023 CCF 开源发展委员会 Powered by Trustie& IntelliDE 京ICP备13000930号
TelesignProvider
TelesignProvider is a Vapor wrapper around TelesignKit
Installation
In your
Package.swift
file, add the followingRegister the provider to your Application in
Configure.swift
Now we can interact with the API via the
TelesignClient
that’s created on your behalf via the Provider we just registered.