Swift Ruby
Switch branches/tags
Nothing to show
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
SKClient.xcodeproj
Sources
Supporting Files
.gitignore
.swiftlint.yml
Cartfile
LICENSE
Package.swift
Podfile
README.md
SKClient.podspec

README.md

SKClient: SlackKit Client Module

Swift Version Plaforms License MIT SwiftPM compatible Carthage compatible CocoaPods compatible

Create a custom SlackKit client.

Installation

CocoaPods

Add SKClient to your pod file:

use_frameworks!
pod 'SKClient'

and run

# Use CocoaPods version >= 1.1.0
pod install

Carthage

Add SKClient to your Cartfile:

github "SlackKit/SKClient"

and run

carthage bootstrap

Drag the built SKClient.framework into your Xcode project.

Swift Package Manager

Add SKClient to your Package.swift

import PackageDescription
  
let package = Package(
	dependencies: [
		.Package(url: "https://github.com/SlackKit/SKClient.git", majorVersion: 4)
	]
)

Run swift build on your application’s main directory.

To use the library in your project import it:

import SKClient

Usage

Subclass Client to create a custom SlackKit client.

class MyClient: Client {

    override func notificationForEvent(_ event: Event, type: EventType) {
    …
    }

	override func initialSetup(JSON: [String: Any]) {
	…
	}
}

Pass your custom client to SlackKit when adding an RTM bot:

let bot = SlackKit()
bot.addRTMBotWithAPIToken(“xoxb-SLACK_AUTH_TOKEN”, client: MyClient())