zulip-swift 0.1.2

zulip-swift 0.1.2

Maintained by Marco Burstein.



  • By
  • Marco Burstein

zulip-swift Swift logo Swift logo

Travis CI build status GitHub tag language badge

A library to access the Zulip API with Swift.

Installation

Swift Package Manager

zulip-swift can be installed with the Swift Package Manager.

In your dependencies, add https://github.com/skunkmb/zulip-swift.git:

dependencies: [
    .package(
        url: "https://github.com/skunkmb/zulip-swift.git",
        from: "0.1.1"
    )
]

CocoaPods

zulip-swift can also be installed with CocoaPods.

In your Podfile, add zulip-swift.

pod 'zulip-swift'

Then run pod install from the terminal.

pod install

Usage

Set-up

// Set up a Zulip configuration.
let config = Config(
    emailAddress: "[email protected]",
    apiKey: "yourapikey",
    realmURL: "https://example.com"
)

// Create the Zulip client.
let zulip = Zulip(config: config)

Functions

zulip-swift is split into a few different namespaces, each with their own functions:

messages:

let messages = zulip.messages()

See the full messages docs.

streams:

let streams = zulip.streams()

See the full streams docs.

users:

let users = zulip.users()

See the full users docs.

events:

let events = zulip.events()

See the full events docs.