Skip to content

Commit

Permalink
update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
madsodgaard committed Nov 23, 2019
1 parent 4b110b0 commit 38847c5
Showing 1 changed file with 23 additions and 1 deletion.
24 changes: 23 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,25 @@
# GatewayAPIKit

A description of this package.
### GatewayAPIKit is a Swift package used to send text messages (SMS) with [GatewayAPI](https://gatewayapi.com/) for Server Side Swift.

## Installation
To use GatewayAPI, please add the following to your `Package.swift` file.

~~~~swift
.package(url: "https://github.com/madsodgaard/GatewayAPIKit.git", from: "0.1.0")
~~~~

## How to use
All you need to send a text message is to initialize a `GatewayAPIClient`:

~~~~swift
let elg = MultiThreadedEventLoopGroup(numberOfThreads: System.coreCount)
let client = GatewayAPIClient(eventLoopGroup: elg, apiKey: "apikey")
~~~~

Please store your API key in storage such as environment variables and not directly in code.

You can now send a simple text message:
~~~~swift
client.send("My text message", to: ["4510203040"], from: "Mads")
~~~~

0 comments on commit 38847c5

Please sign in to comment.