Swift Package Index

Telesign

https://github.com/vapor-community/telesign-provider.git

A Telesign provider for Vapor.


Compatibility

  • 2.0.4
    5.3
    5.2
    5.1
    5.0
    4.2
  • 3.0.0-beta.1.0.0 and master
    5.3
    5.2
    5.1
    5.0
    4.2
  • 2.0.4
    iOS
    macOS(Intel)
    macOS(ARM)
    Linux
    tvOS
    watchOS
  • 3.0.0-beta.1.0.0 and master
    iOS
    macOS(Intel)
    macOS(ARM)
    Linux
    tvOS
    watchOS

TelesignProvider

Swift Vapor

TelesignProvider is a Vapor wrapper around TelesignKit

Installation

In your Package.swift file, add the following

.package(url: "https://github.com/vapor-community/telesign-provider.git", from: "3.0.0-beta")

Register the provider to your Application in 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.

import Telesign

let telesignClient = app.make(TelesignClient.self)

telesignClient.messaging.send(message: "Hello Vapor!", to: "1234567", messageType: .ARN)