vapor-community / messagebird-kit

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

MessagebirdKit

Test

MessagebirdKit is a swift package used to communicate with the Messagebird API

Requirements

MessagebirdKit requires swift 5.5 and macOS 12 Monterey ans supports async await.

Installation

To start using MessagebirdKit, in your Package.swift, add the following

.package(url: "https://github.com/vapor-community/messagebird-kit.git", from: "1.0.0")

Usage

You'll need an HTTPClient and your access key to crerate a MessagebirdClient.

let httpClient = HTTPClient(...)
let messagebird = MessagebirdClient(client: httpClient, accessKey: "test_1234")

You now have access to using any associated API on the client.

let response = try await messagebird.sms.send(originator: "Swift",
                                              body: "Get ready for world domination!",
                                              recipients: ["12223334567"])

About

License:MIT License


Languages

Language:Swift 100.0%