Coder Social home page Coder Social logo

swift-zulip-api's Introduction

swift-zulip-api 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

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

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

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

CocoaPods

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 protected]",
    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:

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.

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

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.

See the full bots docs.

swift-zulip-api's People

Contributors

marco avatar andersk avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.