Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

A Zulip library written in Swift.

License

NotificationsYou must be signed in to change notification settings

zulip/swift-zulip-api

Repository files navigation

Travis CI build statusGitHub taglanguage badge

A library to access the Zulip API withSwift.

Installation

Swift Package Manager

swift-zulip-api can be installed with theSwift Package Manager.

In yourdependencies, addhttps://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 withCocoaPods.

In yourPodfile, addswift-zulip-api.

pod'swift-zulip-api'

Then runpod install from the terminal.

pod install

Usage

Set-up

import SwiftZulipAPI// Set up a Zulip configuration.letconfig=Config(    emailAddress:"email@example.com",    apiKey:"yourapikey",    realmURL:"https://example.com")// Create the Zulip client.letzulip=Zulip(config: config)

Functions

swift-zulip-api is split into a few different namespaces, each with their ownfunctions:

messages:

letmessages= zulip.messages()

See the fullmessages docs.

streams:

letstreams= zulip.streams()

See the fullstreams docs.

users:

letusers= zulip.users()

See the fullusers docs.

events:

letevents= zulip.events()

See the fullevents docs.

Examples

Each of the function docs has examples for how to use the functions. There isalso afull Swift example fileif 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. Eachbot will respond when it is mentioned in a message.

See the full bots docs.

About

A Zulip library written in Swift.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors2

  •  
  •  

[8]ページ先頭

©2009-2025 Movatter.jp