swift-zulip-api can also be installed with CocoaPods.
In your Podfile, add swift-zulip-api.
pod 'swift-zulip-api'
Then run pod install from the terminal.
pod install
Usage
Set-up
import SwiftZulipAPI
// Set up a Zulip configuration.
let config = Config(
emailAddress: "email@example.com",
apiKey: "yourapikey",
realmURL: "https://example.com"
)
// Create the Zulip client.
let zulip = Zulip(config: config)
Functions
swift-zulip-api is split into a few different namespaces, each with their own
functions:
Each of the function docs has examples for how to use the functions. There is
also a full Swift example file
if you want to see every function being used in an actual example program.
The example can be run by using
swift run SwiftZulipAPIExample
from the terminal.
Bots
swift-zulip-api supports writing Bots to automatically respond to users. Each
bot will respond when it is mentioned in a message.
swift-zulip-apiA library to access the Zulip API with Swift.
Installation
Swift Package Manager
swift-zulip-apican be installed with the Swift Package Manager.In your
dependencies, addhttps://github.com/zulip/swift-zulip-api.git:CocoaPods
swift-zulip-apican also be installed with CocoaPods.In your
Podfile, addswift-zulip-api.Then run
pod installfrom the terminal.Usage
Set-up
Functions
swift-zulip-apiis split into a few different namespaces, each with their own functions:messages:
See the full
messagesdocs.streams:
See the full
streamsdocs.users:
See the full
usersdocs.events:
See the full
eventsdocs.Examples
Each of the function docs has examples for how to use the functions. There is also a full Swift example file if you want to see every function being used in an actual example program. The example can be run by using
from the terminal.
Bots
swift-zulip-apisupports writing Bots to automatically respond to users. Each bot will respond when it is mentioned in a message.See the full bots docs.