Compare commits
33 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| c2f7632be4 | |||
| 245d709125 | |||
| 1ad14f016a | |||
| 03561eab36 | |||
| f2c98f9d86 | |||
| bde39be109 | |||
| 5d7ac480b2 | |||
| 3579579c80 | |||
| 47865cbcee | |||
| 054f8f2d87 | |||
| d7a02da74b | |||
| 1846597f04 | |||
| f94b3b247b | |||
| a96c17a3ad | |||
| 6276a09ced | |||
| ca92016ab9 | |||
| 21bca0e0e8 | |||
| dd02e9aecc | |||
| 77cc351bd6 | |||
| 6385afb34a | |||
| b880356dde | |||
| fdd2a5aa36 | |||
| 93f8da2f69 | |||
| a165f3e57f | |||
| d7f2221d77 | |||
| 02bda676a9 | |||
| e4bd44e939 | |||
| d83fbb1d7e | |||
| c2734a66c3 | |||
| 721f8964cf | |||
| 37ca701ae0 | |||
| c1a89eedda | |||
| 8aeb88cea3 |
@@ -0,0 +1,8 @@
|
||||
import XCTest
|
||||
|
||||
import SlackKitTests
|
||||
|
||||
var tests = [XCTestCaseEntry]()
|
||||
tests += SlackKitTests.__allTests()
|
||||
|
||||
XCTMain(tests)
|
||||
+4
-1
@@ -47,6 +47,9 @@ let SKWebAPI: Target = .target(name: "SKWebAPI",
|
||||
dependencies: ["SKCore"],
|
||||
path: "SKWebAPI/Sources")
|
||||
|
||||
let SlackKitTests: Target = .testTarget(name: "SlackKitTests",
|
||||
dependencies: ["SlackKit", "SKCore", "SKClient", "SKRTMAPI", "SKServer"],
|
||||
path: "SlackKitTests")
|
||||
// MARK: Package
|
||||
|
||||
let package = Package(
|
||||
@@ -60,7 +63,7 @@ let package = Package(
|
||||
.library(name: "SKWebAPI", targets: ["SKWebAPI"])
|
||||
],
|
||||
targets: [
|
||||
SlackKit, SKClient, SKCore, SKRTMAPI, SKServer, SKWebAPI
|
||||
SlackKit, SKClient, SKCore, SKRTMAPI, SKServer, SKWebAPI, SlackKitTests
|
||||
]
|
||||
)
|
||||
|
||||
|
||||
@@ -1,28 +0,0 @@
|
||||
use_frameworks!
|
||||
|
||||
target 'SlackKit macOS' do
|
||||
platform :osx, '10.11'
|
||||
pod 'SKCore', '~> 4.1.0'
|
||||
pod 'SKClient', '~> 4.1.0'
|
||||
pod 'SKWebAPI', '~> 4.1.0'
|
||||
pod 'SKRTMAPI', '~> 4.1.0'
|
||||
pod 'SKServer', '~> 4.1.0'
|
||||
end
|
||||
|
||||
target 'SlackKit iOS' do
|
||||
platform :ios, '9.0'
|
||||
pod 'SKCore', '~> 4.1.0'
|
||||
pod 'SKClient', '~> 4.1.0'
|
||||
pod 'SKWebAPI', '~> 4.1.0'
|
||||
pod 'SKRTMAPI', '~> 4.1.0'
|
||||
pod 'SKServer', '~> 4.1.0'
|
||||
end
|
||||
|
||||
target 'SlackKit tvOS' do
|
||||
platform :tvos, '9.0'
|
||||
pod 'SKCore', '~> 4.1.0'
|
||||
pod 'SKClient', '~> 4.1.0'
|
||||
pod 'SKWebAPI', '~> 4.1.0'
|
||||
pod 'SKRTMAPI', '~> 4.1.0'
|
||||
pod 'SKServer', '~> 4.1.0'
|
||||
end
|
||||
@@ -1,7 +1,9 @@
|
||||
<p align="center"><img src="https://cloud.githubusercontent.com/assets/8311605/24083714/e921a0d4-0cb2-11e7-8384-d42113ef5056.png" alt="SlackKit" width="500"/></p>
|
||||
|
||||
[](https://dev.azure.com/pzignego/SlackKit/_build/latest?definitionId=2&branchName=master)
|
||||
|
||||

|
||||

|
||||

|
||||

|
||||
[](https://github.com/apple/swift-package-manager)
|
||||
[](https://github.com/Carthage/Carthage)
|
||||
@@ -20,16 +22,20 @@ It's intended to expose all of the functionality of Slack's [Real Time Messaging
|
||||
|
||||
Add `SlackKit` to your `Package.swift`
|
||||
|
||||
```swift
|
||||
import PackageDescription
|
||||
|
||||
```swift
|
||||
let package = Package(
|
||||
dependencies: [
|
||||
.package(url: "https://github.com/SlackKit/SlackKit.git", .upToNextMinor(from: "4.2.0"))
|
||||
.package(url: "https://github.com/pvzig/SlackKit.git", .upToNextMinor(from: "4.2.0"))
|
||||
]
|
||||
)
|
||||
```
|
||||
|
||||
**When built using Swift Package Manager, SlackKit includes the [vapor websocket framework](https://github.com/vapor/websocket) by default which requires libressl.**
|
||||
|
||||
You can install it with [homebrew](https://brew.sh): `brew install libressl`
|
||||
|
||||
For additional details, see the [SKRTMAPI readme](https://github.com/pvzig/SlackKit/tree/master/SKRTMAPI#swift-package-manager).
|
||||
|
||||
#### Carthage
|
||||
|
||||
Add `SlackKit` to your `Cartfile`:
|
||||
@@ -46,6 +52,12 @@ pod 'SlackKit'
|
||||
```
|
||||
|
||||
### Usage
|
||||
To use the library in your project import it:
|
||||
|
||||
```swift
|
||||
import SlackKit
|
||||
```
|
||||
|
||||
#### The Basics
|
||||
Create a bot user with an API token:
|
||||
|
||||
@@ -124,75 +136,14 @@ Slack has [many different oauth scopes](https://api.slack.com/docs/oauth-scopes)
|
||||
If you authenticate using OAuth and the Add to Slack or Sign in with Slack buttons this is handled for you.
|
||||
|
||||
For local development of things like OAuth, slash commands, and message buttons, you may want to use a tool like [ngrok](https://ngrok.com).
|
||||
#### Advanced Usage
|
||||
Don’t need the whole banana? Want more control over the low-level implementation details? Use the extensible frameworks SlackKit is built on:
|
||||
|
||||
#### Web API Methods
|
||||
SlackKit currently supports the a subset of the Slack Web APIs that are available to bot users:
|
||||
|
||||
| Web APIs |
|
||||
| ------------- |
|
||||
| `api.test`|
|
||||
| `api.revoke`|
|
||||
| `auth.test`|
|
||||
| `channels.history`|
|
||||
| `channels.info`|
|
||||
| `channels.list`|
|
||||
| `channels.mark`|
|
||||
| `channels.setPurpose`|
|
||||
| `channels.setTopic`|
|
||||
| `chat.delete`|
|
||||
| `chat.meMessage`|
|
||||
| `chat.postMessage`|
|
||||
| `chat.update`|
|
||||
| `emoji.list`|
|
||||
| `files.comments.add`|
|
||||
| `files.comments.edit`|
|
||||
| `files.comments.delete`|
|
||||
| `files.delete`|
|
||||
| `files.info`|
|
||||
| `files.upload`|
|
||||
| `groups.close`|
|
||||
| `groups.history`|
|
||||
| `groups.info`|
|
||||
| `groups.list`|
|
||||
| `groups.mark`|
|
||||
| `groups.open`|
|
||||
| `groups.setPurpose`|
|
||||
| `groups.setTopic`|
|
||||
| `im.close`|
|
||||
| `im.history`|
|
||||
| `im.list`|
|
||||
| `im.mark`|
|
||||
| `im.open`|
|
||||
| `mpim.close`|
|
||||
| `mpim.history`|
|
||||
| `mpim.list`|
|
||||
| `mpim.mark`|
|
||||
| `mpim.open`|
|
||||
| `oauth.access`|
|
||||
| `pins.add`|
|
||||
| `pins.list`|
|
||||
| `pins.remove`|
|
||||
| `reactions.add`|
|
||||
| `reactions.get`|
|
||||
| `reactions.list`|
|
||||
| `reactions.remove`|
|
||||
| `rtm.start`|
|
||||
| `stars.add`|
|
||||
| `stars.remove`|
|
||||
| `team.info`|
|
||||
| `users.getPresence`|
|
||||
| `users.info`|
|
||||
| `users.list`|
|
||||
| `users.setActive`|
|
||||
| `users.setPresence`|
|
||||
|
||||
Don’t need the whole banana? Want more control over the low-level implementation details? Use the extensible modules SlackKit is built on:
|
||||
|
||||
| Module | Slack Service |
|
||||
| Framework | Description |
|
||||
| ------------- |------------- |
|
||||
| **[SKClient](https://github.com/pvzig/SlackKit/tree/master/SKClient)** | Write your own client implementation|
|
||||
| **[SKRTMAPI](https://github.com/pvzig/SlackKit/tree/master/SKRTMAPI)** | Connect to the Slack RTM API|
|
||||
| **[SKServer](https://github.com/pvzig/SlackKit/tree/master/SKServer)** | Spin up a server|
|
||||
| **[SKServer](https://github.com/pvzig/SlackKit/tree/master/SKServer)** | Spin up a server for a Slack app|
|
||||
| **[SKWebAPI](https://github.com/pvzig/SlackKit/tree/master/SKWebAPI)** | Access the Slack Web API|
|
||||
|
||||
### Examples
|
||||
|
||||
+49
-41
@@ -1,68 +1,76 @@
|
||||
# SKClient: SlackKit Client Module
|
||||

|
||||

|
||||

|
||||
[](https://github.com/apple/swift-package-manager)
|
||||
[](https://github.com/Carthage/Carthage)
|
||||
[](https://cocoapods.org)
|
||||
|
||||
# SKClient
|
||||
Create a custom SlackKit client.
|
||||
|
||||
## Installation
|
||||
|
||||
### CocoaPods
|
||||
<details>
|
||||
<summary><strong>Swift Package Manager</strong></summary>
|
||||
Add SlackKit as a dependency to your <code>Package.swift</code> and specify SKClient as a target dependency:
|
||||
|
||||
Add SKClient to your pod file:
|
||||
```swift
|
||||
import PackageDescription
|
||||
|
||||
let package = Package(
|
||||
name: "SampleApp",
|
||||
products: [
|
||||
.executable(
|
||||
name: "SampleApp",
|
||||
targets: ["SampleApp"]),
|
||||
],
|
||||
dependencies: [
|
||||
.package(url: "https://github.com/pvzig/SlackKit.git", .upToNextMinor(from: "4.2.0")),
|
||||
],
|
||||
targets: [
|
||||
.target(
|
||||
name: "SampleApp",
|
||||
dependencies: ["SKClient"])
|
||||
]
|
||||
)
|
||||
|
||||
```
|
||||
use_frameworks!
|
||||
pod 'SKClient'
|
||||
```
|
||||
and run
|
||||
</details>
|
||||
<details>
|
||||
<summary><strong>Carthage</strong></summary>
|
||||
Add SlackKit to your <code>Cartfile</code>:
|
||||
|
||||
```
|
||||
# Use CocoaPods version >= 1.4.0
|
||||
pod install
|
||||
github "pvzig/SlackKit"
|
||||
```
|
||||
|
||||
### Carthage
|
||||
|
||||
Add SKClient to your Cartfile:
|
||||
|
||||
```
|
||||
github "SlackKit/SKClient"
|
||||
```
|
||||
and run
|
||||
|
||||
```
|
||||
carthage bootstrap
|
||||
```
|
||||
|
||||
Drag the built `SKClient.framework` into your Xcode project.
|
||||
Drag the built <code>SKClient.framework</code> and it's dependency <code>SKCore.framework</code> into your Xcode project.
|
||||
</details>
|
||||
<details>
|
||||
<summary><strong>CocoaPods</strong></summary>
|
||||
Add SKClient to your <code>Podfile</code>:
|
||||
|
||||
### Swift Package Manager
|
||||
|
||||
Add SKClient to your Package.swift
|
||||
|
||||
```swift
|
||||
import PackageDescription
|
||||
|
||||
let package = Package(
|
||||
dependencies: [
|
||||
.package(url: "https://github.com/SlackKit/SKClient.git", .upToNextMinor(from: "4.1.0"))
|
||||
]
|
||||
)
|
||||
```
|
||||
use_frameworks!
|
||||
pod 'SlackKit/SKClient'
|
||||
```
|
||||
</details>
|
||||
|
||||
Run `swift build` on your application’s main directory.
|
||||
|
||||
## Usage
|
||||
To use the library in your project import it:
|
||||
|
||||
```
|
||||
#### Carthage & SPM
|
||||
|
||||
```swift
|
||||
import SKClient
|
||||
```
|
||||
|
||||
## Usage
|
||||
#### CocoaPods
|
||||
|
||||
```swift
|
||||
import SlackKit
|
||||
```
|
||||
|
||||
### The Basics
|
||||
Subclass `Client` to create a custom SlackKit client.
|
||||
|
||||
```
|
||||
@@ -78,7 +86,7 @@ class MyClient: Client {
|
||||
}
|
||||
```
|
||||
|
||||
Pass your custom client to [`SlackKit`](https://www.github.com/SlackKit/SlackKit) when adding an RTM bot:
|
||||
Pass your custom client to [`SlackKit`](https://www.github.com/pvzig/SlackKit) when adding an RTM bot:
|
||||
|
||||
```
|
||||
let bot = SlackKit()
|
||||
|
||||
@@ -25,7 +25,9 @@
|
||||
import Dispatch
|
||||
#endif
|
||||
import Foundation
|
||||
#if !COCOAPODS
|
||||
@_exported import SKCore
|
||||
#endif
|
||||
|
||||
open class Client {
|
||||
internal(set) public var authenticatedUser: User?
|
||||
@@ -113,6 +115,10 @@ open class Client {
|
||||
manualPresenceChange(event)
|
||||
case .prefChange:
|
||||
changePreference(event)
|
||||
case .memberJoinedChannel:
|
||||
memberJoinedChannel(event)
|
||||
case .memberLeftChannel:
|
||||
memberLeftChannel(event)
|
||||
case .userChange:
|
||||
userChange(event)
|
||||
case .teamJoin:
|
||||
@@ -358,6 +364,30 @@ extension Client {
|
||||
func channelHistoryChanged(_ event: Event) {
|
||||
|
||||
}
|
||||
|
||||
func memberJoinedChannel(_ event: Event) {
|
||||
guard
|
||||
let channel = event.channel?.id,
|
||||
let member = event.user?.id
|
||||
else {
|
||||
return
|
||||
}
|
||||
|
||||
channels[channel]?.members?.append(member)
|
||||
}
|
||||
|
||||
func memberLeftChannel(_ event: Event) {
|
||||
guard
|
||||
let channel = event.channel?.id,
|
||||
let member = event.user?.id
|
||||
else {
|
||||
return
|
||||
}
|
||||
|
||||
if let index = channels[channel]?.members?.index(of: member) {
|
||||
channels[channel]?.members?.remove(at: index)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// MARK: - Do Not Disturb
|
||||
@@ -397,76 +427,82 @@ extension Client {
|
||||
// MARK: - Files
|
||||
extension Client {
|
||||
func processFile(_ event: Event) {
|
||||
guard
|
||||
let file = event.file,
|
||||
let id = file.id
|
||||
else {
|
||||
return
|
||||
}
|
||||
if let comment = file.initialComment, let commentID = comment.id {
|
||||
if files[id]?.comments[commentID] == nil {
|
||||
files[id]?.comments[commentID] = comment
|
||||
for file in event.files {
|
||||
guard
|
||||
let id = file.id
|
||||
else {
|
||||
continue
|
||||
}
|
||||
if let comment = file.initialComment, let commentID = comment.id {
|
||||
if files[id]?.comments[commentID] == nil {
|
||||
files[id]?.comments[commentID] = comment
|
||||
}
|
||||
}
|
||||
files[id] = file
|
||||
}
|
||||
files[id] = file
|
||||
}
|
||||
|
||||
func filePrivate(_ event: Event) {
|
||||
guard
|
||||
let file = event.file,
|
||||
let id = file.id
|
||||
else {
|
||||
return
|
||||
for file in event.files {
|
||||
guard
|
||||
let id = file.id
|
||||
else {
|
||||
continue
|
||||
}
|
||||
files[id]?.isPublic = false
|
||||
}
|
||||
files[id]?.isPublic = false
|
||||
}
|
||||
|
||||
func deleteFile(_ event: Event) {
|
||||
guard
|
||||
let file = event.file,
|
||||
let id = file.id
|
||||
else {
|
||||
return
|
||||
}
|
||||
if files[id] != nil {
|
||||
files.removeValue(forKey: id)
|
||||
for file in event.files {
|
||||
guard
|
||||
let id = file.id
|
||||
else {
|
||||
continue
|
||||
}
|
||||
if files[id] != nil {
|
||||
files.removeValue(forKey: id)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
func fileCommentAdded(_ event: Event) {
|
||||
guard
|
||||
let file = event.file,
|
||||
let id = file.id,
|
||||
let comment = event.comment,
|
||||
let commentID = comment.id
|
||||
else {
|
||||
return
|
||||
for file in event.files {
|
||||
guard
|
||||
let id = file.id,
|
||||
let comment = event.comment,
|
||||
let commentID = comment.id
|
||||
else {
|
||||
continue
|
||||
}
|
||||
files[id]?.comments[commentID] = comment
|
||||
}
|
||||
files[id]?.comments[commentID] = comment
|
||||
}
|
||||
|
||||
func fileCommentEdited(_ event: Event) {
|
||||
guard
|
||||
let file = event.file,
|
||||
let id = file.id,
|
||||
let comment = event.comment,
|
||||
let commentID = comment.id
|
||||
else {
|
||||
return
|
||||
for file in event.files {
|
||||
guard
|
||||
let id = file.id,
|
||||
let comment = event.comment,
|
||||
let commentID = comment.id
|
||||
else {
|
||||
continue
|
||||
}
|
||||
files[id]?.comments[commentID]?.comment = comment.comment
|
||||
}
|
||||
files[id]?.comments[commentID]?.comment = comment.comment
|
||||
}
|
||||
|
||||
func fileCommentDeleted(_ event: Event) {
|
||||
guard
|
||||
let file = event.file,
|
||||
let id = file.id,
|
||||
let comment = event.comment,
|
||||
let commentID = comment.id
|
||||
else {
|
||||
return
|
||||
for file in event.files {
|
||||
guard
|
||||
let id = file.id,
|
||||
let comment = event.comment,
|
||||
let commentID = comment.id
|
||||
else {
|
||||
continue
|
||||
}
|
||||
_ = files[id]?.comments.removeValue(forKey: commentID)
|
||||
}
|
||||
_ = files[id]?.comments.removeValue(forKey: commentID)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+3
-8
@@ -1,9 +1,4 @@
|
||||
# SKCore: SlackKit Models
|
||||

|
||||

|
||||

|
||||
[](https://github.com/apple/swift-package-manager)
|
||||
[](https://github.com/Carthage/Carthage)
|
||||
[](https://cocoapods.org)
|
||||
# SKCore
|
||||
|
||||
The shared model objects used by [SlackKit](https://www.github.com/pvzig/SlackKit).
|
||||
|
||||
SKCore contains the shared model objects used by [SlackKit](https://www.github.com/SlackKit/SlackKit) and the other [SlackKit modules](https://www.github.com/SlackKit).
|
||||
|
||||
@@ -64,6 +64,8 @@ public enum EventType: String {
|
||||
case pinRemoved = "pin_removed"
|
||||
case pong = "pong"
|
||||
case presenceChange = "presence_change"
|
||||
case memberJoinedChannel = "member_joined_channel"
|
||||
case memberLeftChannel = "member_left_channel"
|
||||
case manualPresenceChange = "manual_presence_change"
|
||||
case prefChange = "pref_change"
|
||||
case userChange = "user_change"
|
||||
@@ -151,17 +153,20 @@ public class Event {
|
||||
public let edited: Edited?
|
||||
public let bot: Bot?
|
||||
public let channel: Channel?
|
||||
public let channelType: String?
|
||||
public let comment: Comment?
|
||||
public let user: User?
|
||||
public let file: File?
|
||||
public let files: [File]
|
||||
public let message: Message?
|
||||
public let nestedMessage: Message?
|
||||
public let itemUser: String?
|
||||
public let item: Item?
|
||||
public let teamID: String?
|
||||
public let dndStatus: DoNotDisturbStatus?
|
||||
public let subteam: UserGroup?
|
||||
public let subteamID: String?
|
||||
public var profile: CustomProfile?
|
||||
public let profile: CustomProfile?
|
||||
public let inviterID: String?
|
||||
|
||||
//swiftlint:disable function_body_length
|
||||
public init(_ event: [String: Any]) {
|
||||
@@ -197,7 +202,10 @@ public class Event {
|
||||
message = Message(dictionary: event)
|
||||
nestedMessage = Message(dictionary: event["message"] as? [String: Any])
|
||||
profile = CustomProfile(profile: event["profile"] as? [String: Any])
|
||||
file = File(id: event["file"] as? String)
|
||||
files = (event["files"] as? [Any])?.compactMap { File(file: $0 as? [String: Any]) } ?? []
|
||||
channelType = event["channel_type"] as? String
|
||||
teamID = event["team"] as? String
|
||||
inviterID = event["inviter"] as? String
|
||||
|
||||
// Comment, Channel, and User can come across as Strings or Dictionaries
|
||||
if let commentDictionary = event["comment"] as? [String: Any] {
|
||||
|
||||
@@ -47,7 +47,7 @@ public final class Message: Equatable {
|
||||
public var isStarred: Bool?
|
||||
public var pinnedTo: [String]?
|
||||
public let comment: Comment?
|
||||
public let file: File?
|
||||
public var files: [File]?
|
||||
public var reactions = [Reaction]()
|
||||
public var attachments: [Attachment]?
|
||||
public var responseType: MessageResponseType?
|
||||
@@ -79,7 +79,7 @@ public final class Message: Equatable {
|
||||
isStarred = dictionary?["is_starred"] as? Bool
|
||||
pinnedTo = dictionary?["pinned_to"] as? [String]
|
||||
comment = Comment(comment: dictionary?["comment"] as? [String: Any])
|
||||
file = File(file: dictionary?["file"] as? [String: Any])
|
||||
files = (dictionary?["files"] as? [[String: Any]])?.map { File(file: $0) }
|
||||
reactions = Reaction.reactionsFromArray(dictionary?["reactions"] as? [[String: Any]])
|
||||
attachments = (dictionary?["attachments"] as? [[String: Any]])?.map { Attachment(attachment: $0) }
|
||||
responseType = MessageResponseType(rawValue: dictionary?["response_type"] as? String ?? "")
|
||||
@@ -101,7 +101,6 @@ public final class Message: Equatable {
|
||||
upload = nil
|
||||
itemType = nil
|
||||
comment = nil
|
||||
file = nil
|
||||
}
|
||||
|
||||
public static func == (lhs: Message, rhs: Message) -> Bool {
|
||||
|
||||
@@ -34,6 +34,9 @@ public struct User {
|
||||
public var image72: String?
|
||||
public var image192: String?
|
||||
public var customProfile: CustomProfile?
|
||||
public var statusText: String?
|
||||
public var statusEmoji: String?
|
||||
public var statusExpiration: Int?
|
||||
|
||||
public init(profile: [String: Any]?) {
|
||||
firstName = profile?["first_name"] as? String
|
||||
@@ -47,6 +50,9 @@ public struct User {
|
||||
image72 = profile?["image_72"] as? String
|
||||
image192 = profile?["image_192"] as? String
|
||||
customProfile = CustomProfile(customFields: profile?["fields"] as? [String: Any])
|
||||
statusText = profile?["status_text"] as? String
|
||||
statusEmoji = profile?["status_emoji"] as? String
|
||||
statusExpiration = profile?["status_expiration"] as? Int
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+66
-39
@@ -1,68 +1,95 @@
|
||||
# SKRTMAPI: SlackKit RTM Module
|
||||

|
||||

|
||||

|
||||
[](https://github.com/apple/swift-package-manager)
|
||||
[](https://github.com/Carthage/Carthage)
|
||||
[](https://cocoapods.org)
|
||||
# SKRTMAPI
|
||||
|
||||
A module for connecting to the [Slack Real Time Messaging API](https://api.slack.com/rtm).
|
||||
Connect to the [Slack Real Time Messaging API](https://api.slack.com/rtm) in Swift.
|
||||
|
||||
## Installation
|
||||
<details>
|
||||
<summary><strong>Swift Package Manager</strong></summary>
|
||||
Add SlackKit as a dependency to your <code>Package.swift</code> and specify SKRTMAPI as a target dependency:
|
||||
|
||||
### CocoaPods
|
||||
|
||||
Add SKRTMAPI to your pod file:
|
||||
```swift
|
||||
import PackageDescription
|
||||
|
||||
let package = Package(
|
||||
name: "SampleApp",
|
||||
products: [
|
||||
.executable(
|
||||
name: "SampleApp",
|
||||
targets: ["SampleApp"]),
|
||||
],
|
||||
dependencies: [
|
||||
.package(url: "https://github.com/pvzig/SlackKit.git", .upToNextMinor(from: "4.2.0")),
|
||||
],
|
||||
targets: [
|
||||
.target(
|
||||
name: "SampleApp",
|
||||
dependencies: ["SKRTMAPI"])
|
||||
]
|
||||
)
|
||||
|
||||
```
|
||||
use_frameworks!
|
||||
pod 'SKRTMAPI'
|
||||
|
||||
**When built using Swift Package Manager, SKRTMAPI includes the [vapor websocket framework](https://github.com/vapor/websocket) by default which requires libressl.**
|
||||
|
||||
You can install it with [homebrew](https://brew.sh): `brew install libressl`
|
||||
|
||||
If you'd like to use SPM _without vapor websocket_, you can modify the [Package.swift](https://github.com/pvzig/SlackKit/blob/master/Package.swift#L18) file to exclude it:
|
||||
|
||||
```swift
|
||||
let SKRTMAPI: Target = .target(name: "SKRTMAPI",
|
||||
path: "SKRTMAPI/Sources",
|
||||
exclude: ["Conformers/VaporEngineRTM.swift"])
|
||||
|
||||
#if os(macOS)
|
||||
SKRTMAPI.dependencies = [
|
||||
"SKCore",
|
||||
"SKWebAPI",
|
||||
"Starscream"
|
||||
]
|
||||
```
|
||||
and run
|
||||
</details>
|
||||
<details>
|
||||
<summary><strong>Carthage</strong></summary>
|
||||
Add SlackKit to your <code>Cartfile</code>:
|
||||
|
||||
```
|
||||
# Use CocoaPods version >= 1.4.0
|
||||
pod install
|
||||
github "pvzig/SlackKit"
|
||||
```
|
||||
|
||||
### Carthage
|
||||
|
||||
Add SKRTMAPI to your Cartfile:
|
||||
|
||||
```
|
||||
github "SlackKit/SKRTMAPI"
|
||||
```
|
||||
and run
|
||||
|
||||
```
|
||||
carthage bootstrap
|
||||
```
|
||||
|
||||
Drag the built `SKRTMAPI.framework` into your Xcode project.
|
||||
Drag the built <code>SKRTMAPI.framework</code> and it's dependencies <code>SKCore.framework</code>, <code>SKWebAPI.framework</code>, and <code>Starscream.framework</code> into your Xcode project.
|
||||
</details>
|
||||
<details>
|
||||
<summary><strong>CocoaPods</strong></summary>
|
||||
Add SKRTMAPI to your <code>Podfile</code>:
|
||||
|
||||
### Swift Package Manager
|
||||
|
||||
Add SKRTMAPI to your Package.swift
|
||||
|
||||
```swift
|
||||
import PackageDescription
|
||||
|
||||
let package = Package(
|
||||
dependencies: [
|
||||
.package(url: "https://github.com/SlackKit/SKRTMAPI.git", .upToNextMinor(from: "4.1.0"))
|
||||
]
|
||||
)
|
||||
```
|
||||
use_frameworks!
|
||||
pod 'SlackKit/SKRTMAPI'
|
||||
```
|
||||
</details>
|
||||
|
||||
Run `swift build` on your application’s main directory.
|
||||
|
||||
## Usage
|
||||
To use the library in your project import it:
|
||||
|
||||
#### Carthage & SPM
|
||||
|
||||
```swift
|
||||
import SKRTMAPI
|
||||
```
|
||||
|
||||
## Usage
|
||||
#### CocoaPods
|
||||
|
||||
```swift
|
||||
import SlackKit
|
||||
```
|
||||
|
||||
### The Basics
|
||||
Initialize an instance of `SKRTMAPI` with a Slack auth token:
|
||||
|
||||
```swift
|
||||
|
||||
@@ -23,7 +23,9 @@
|
||||
|
||||
#if os(macOS) || os(iOS) || os(tvOS)
|
||||
import Foundation
|
||||
#if !COCOAPODS
|
||||
import SKCore
|
||||
#endif
|
||||
import Starscream
|
||||
|
||||
public class StarscreamRTM: RTMWebSocket, WebSocketDelegate {
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
// THE SOFTWARE.
|
||||
|
||||
#if os(Linux) || os(macOS)
|
||||
#if os(Linux) || os(macOS) && !COCOAPODS
|
||||
import Foundation
|
||||
import HTTP
|
||||
import WebSocket
|
||||
|
||||
@@ -25,8 +25,10 @@
|
||||
import Dispatch
|
||||
#endif
|
||||
import Foundation
|
||||
#if !COCOAPODS
|
||||
import SKWebAPI
|
||||
@_exported import SKCore
|
||||
#endif
|
||||
|
||||
public protocol RTMWebSocket {
|
||||
init()
|
||||
|
||||
+46
-41
@@ -1,68 +1,73 @@
|
||||
# SKServer: SlackKit Server Module
|
||||

|
||||

|
||||

|
||||
[](https://github.com/apple/swift-package-manager)
|
||||
[](https://github.com/Carthage/Carthage)
|
||||
[](https://cocoapods.org)
|
||||
|
||||
A server-side Swift module for creating Slack apps.
|
||||
# SKServer
|
||||
A server-side Swift framework for creating Slack apps.
|
||||
|
||||
## Installation
|
||||
<details>
|
||||
<summary><strong>Swift Package Manager</strong></summary>
|
||||
Add SlackKit as a dependency to your <code>Package.swift</code> and specify SKServer as a target dependency:
|
||||
|
||||
### CocoaPods
|
||||
|
||||
Add SKServer to your pod file:
|
||||
```swift
|
||||
import PackageDescription
|
||||
|
||||
let package = Package(
|
||||
name: "SampleApp",
|
||||
products: [
|
||||
.executable(
|
||||
name: "SampleApp",
|
||||
targets: ["SampleApp"]),
|
||||
],
|
||||
dependencies: [
|
||||
.package(url: "https://github.com/pvzig/SlackKit.git", .upToNextMinor(from: "4.2.0")),
|
||||
],
|
||||
targets: [
|
||||
.target(
|
||||
name: "SampleApp",
|
||||
dependencies: ["SKServer"])
|
||||
]
|
||||
)
|
||||
|
||||
```
|
||||
use_frameworks!
|
||||
pod 'SKServer'
|
||||
```
|
||||
and run
|
||||
</details>
|
||||
<details>
|
||||
<summary><strong>Carthage</strong></summary>
|
||||
Add SlackKit to your <code>Cartfile</code>:
|
||||
|
||||
```
|
||||
# Use CocoaPods version >= 1.4.0
|
||||
pod install
|
||||
github "pvzig/SlackKit"
|
||||
```
|
||||
|
||||
### Carthage
|
||||
|
||||
Add SKServer to your Cartfile:
|
||||
|
||||
```
|
||||
github "SlackKit/SKServer"
|
||||
```
|
||||
and run
|
||||
|
||||
```
|
||||
carthage bootstrap
|
||||
```
|
||||
|
||||
Drag the built `SKServer.framework` into your Xcode project.
|
||||
Drag the built <code>SKServer.framework</code> and it's dependencies <code>SKCore.framework</code>, <code>SKWebAPI.framework</code>, and <code>Swifter.framework</code> into your Xcode project.
|
||||
</details>
|
||||
<details>
|
||||
<summary><strong>CocoaPods</strong></summary>
|
||||
Add SKServer to your <code>Podfile</code>:
|
||||
|
||||
### Swift Package Manager
|
||||
|
||||
Add SKServer to your Package.swift
|
||||
|
||||
```swift
|
||||
import PackageDescription
|
||||
|
||||
let package = Package(
|
||||
dependencies: [
|
||||
.package(url: "https://github.com/SlackKit/SKServer.git", .upToNextMinor(from: "4.1.0"))
|
||||
]
|
||||
)
|
||||
```
|
||||
use_frameworks!
|
||||
pod 'SlackKit/SKServer'
|
||||
```
|
||||
</details>
|
||||
|
||||
Run `swift build` on your application’s main directory.
|
||||
|
||||
## Usage
|
||||
To use the library in your project import it:
|
||||
|
||||
#### Carthage & SPM
|
||||
|
||||
```swift
|
||||
import SKServer
|
||||
```
|
||||
|
||||
## Usage
|
||||
#### CocoaPods
|
||||
|
||||
```swift
|
||||
import SlackKit
|
||||
```
|
||||
|
||||
### The Basics
|
||||
For local development and testing of features like OAuth, slash commands, and message buttons that require connecting over https, you may want to use a tool like [ngrok](https://ngrok.com/).
|
||||
|
||||
@@ -21,8 +21,10 @@
|
||||
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
// THE SOFTWARE.
|
||||
|
||||
#if !COCOAPODS
|
||||
import SKCore
|
||||
import SKWebAPI
|
||||
#endif
|
||||
|
||||
public struct OAuthMiddleware: Middleware {
|
||||
private let config: OAuthConfig
|
||||
|
||||
@@ -21,7 +21,9 @@
|
||||
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
// THE SOFTWARE.
|
||||
|
||||
#if !COCOAPODS
|
||||
import SKCore
|
||||
#endif
|
||||
|
||||
public struct MessageActionRequest {
|
||||
public let action: Action?
|
||||
@@ -41,7 +43,7 @@ public struct MessageActionRequest {
|
||||
callbackID = response?["callback_id"] as? String
|
||||
team = Team(team: response?["team"] as? [String: Any])
|
||||
channel = Channel(channel: response?["channel"] as? [String: Any])
|
||||
user = User(user: response?["channel"] as? [String: Any])
|
||||
user = User(user: response?["user"] as? [String: Any])
|
||||
actionTS = response?["action_ts"] as? String
|
||||
messageTS = response?["message_ts"] as? String
|
||||
attachmentID = response?["attachment_id"] as? String
|
||||
|
||||
@@ -21,7 +21,9 @@
|
||||
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
// THE SOFTWARE.
|
||||
|
||||
#if !COCOAPODS
|
||||
import SKCore
|
||||
#endif
|
||||
|
||||
public struct MessageActionRoute {
|
||||
let action: Action
|
||||
|
||||
@@ -21,7 +21,9 @@
|
||||
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
// THE SOFTWARE.
|
||||
|
||||
#if !COCOAPODS
|
||||
import SKCore
|
||||
#endif
|
||||
|
||||
public struct OAuthResponse {
|
||||
public let accessToken: String?
|
||||
|
||||
@@ -22,7 +22,9 @@
|
||||
// THE SOFTWARE.
|
||||
|
||||
import Foundation
|
||||
#if !COCOAPODS
|
||||
import SKCore
|
||||
#endif
|
||||
|
||||
public struct SKResponse {
|
||||
let text: String
|
||||
|
||||
@@ -21,7 +21,9 @@
|
||||
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
// THE SOFTWARE.
|
||||
|
||||
#if !COCOAPODS
|
||||
@_exported import SKCore
|
||||
#endif
|
||||
|
||||
public protocol SlackKitServer {
|
||||
func start()
|
||||
|
||||
+48
-39
@@ -1,68 +1,77 @@
|
||||
# SKWebAPI: SlackKit Web API Module
|
||||

|
||||

|
||||

|
||||
[](https://github.com/apple/swift-package-manager)
|
||||
[](https://github.com/Carthage/Carthage)
|
||||
[](https://cocoapods.org)
|
||||
# SKWebAPI
|
||||
|
||||
A Swift module to help make requests to the [Slack Web API](https://api.slack.com/web).
|
||||
Make requests to the [Slack Web API](https://api.slack.com/web) in Swift.
|
||||
|
||||
## Installation
|
||||
|
||||
### CocoaPods
|
||||
<details>
|
||||
<summary><strong>Swift Package Manager</strong></summary>
|
||||
Add SlackKit as a dependency to your <code>Package.swift</code> and specify SKWebAPI as a target dependency:
|
||||
|
||||
Add SKWebAPI to your pod file:
|
||||
```swift
|
||||
import PackageDescription
|
||||
|
||||
let package = Package(
|
||||
name: "SampleApp",
|
||||
products: [
|
||||
.executable(
|
||||
name: "SampleApp",
|
||||
targets: ["SampleApp"]),
|
||||
],
|
||||
dependencies: [
|
||||
.package(url: "https://github.com/pvzig/SlackKit.git", .upToNextMinor(from: "4.2.0")),
|
||||
],
|
||||
targets: [
|
||||
.target(
|
||||
name: "SampleApp",
|
||||
dependencies: ["SKWebAPI"])
|
||||
]
|
||||
)
|
||||
|
||||
```
|
||||
use_frameworks!
|
||||
pod 'SKWebAPI'
|
||||
```
|
||||
and run
|
||||
</details>
|
||||
<details>
|
||||
<summary><strong>Carthage</strong></summary>
|
||||
Add SlackKit to your <code>Cartfile</code>:
|
||||
|
||||
```
|
||||
# Use CocoaPods version >= 1.4.0
|
||||
pod install
|
||||
github "pvzig/SlackKit"
|
||||
```
|
||||
|
||||
### Carthage
|
||||
|
||||
Add SKWebAPI to your Cartfile:
|
||||
|
||||
```
|
||||
github "SlackKit/SKWebAPI"
|
||||
```
|
||||
and run
|
||||
|
||||
```
|
||||
carthage bootstrap
|
||||
```
|
||||
|
||||
Drag the built `SKWebAPI.framework` into your Xcode project.
|
||||
Drag the built <code>SKWebAPI.framework</code> and it's dependency <code>SKCore.framework</code> into your Xcode project.
|
||||
</details>
|
||||
<details>
|
||||
<summary><strong>CocoaPods</strong></summary>
|
||||
Add SKWebAPI to your <code>Podfile</code>:
|
||||
|
||||
### Swift Package Manager
|
||||
|
||||
Add SKWebAPI to your Package.swift
|
||||
|
||||
```swift
|
||||
import PackageDescription
|
||||
|
||||
let package = Package(
|
||||
dependencies: [
|
||||
.package(url: "https://github.com/SlackKit/SKWebAPI.git", .upToNextMinor(from: "4.1.0"))
|
||||
]
|
||||
)
|
||||
```
|
||||
use_frameworks!
|
||||
pod 'SlackKit/SKWebAPI'
|
||||
```
|
||||
</details>
|
||||
|
||||
Run `swift build` on your application’s main directory.
|
||||
|
||||
## Usage
|
||||
To use the library in your project import it:
|
||||
|
||||
#### Carthage & SPM
|
||||
|
||||
```swift
|
||||
import SKWebAPI
|
||||
```
|
||||
|
||||
## Usage
|
||||
#### CocoaPods
|
||||
|
||||
```swift
|
||||
import SlackKit
|
||||
```
|
||||
|
||||
### The Basics
|
||||
Initialize an instance of `SKWebAPI` with a Slack auth token and make your requests:
|
||||
|
||||
```swift
|
||||
|
||||
@@ -35,6 +35,7 @@ public enum Endpoint: String {
|
||||
case channelsSetTopic = "channels.setTopic"
|
||||
case chatDelete = "chat.delete"
|
||||
case chatPostMessage = "chat.postMessage"
|
||||
case chatPostEphemeral = "chat.postEphemeral"
|
||||
case chatMeMessage = "chat.meMessage"
|
||||
case chatUpdate = "chat.update"
|
||||
case conversationsList = "conversations.list"
|
||||
@@ -81,6 +82,7 @@ public enum Endpoint: String {
|
||||
case usersGetPresence = "users.getPresence"
|
||||
case usersInfo = "users.info"
|
||||
case usersList = "users.list"
|
||||
case usersProfileSet = "users.profile.set"
|
||||
case usersSetActive = "users.setActive"
|
||||
case usersSetPresence = "users.setPresence"
|
||||
}
|
||||
|
||||
@@ -25,7 +25,9 @@
|
||||
import Dispatch
|
||||
#endif
|
||||
import Foundation
|
||||
#if !COCOAPODS
|
||||
import SKCore
|
||||
#endif
|
||||
|
||||
public struct NetworkInterface {
|
||||
|
||||
|
||||
@@ -23,7 +23,9 @@
|
||||
|
||||
//swiftlint:disable file_length
|
||||
import Foundation
|
||||
#if !COCOAPODS
|
||||
@_exported import SKCore
|
||||
#endif
|
||||
|
||||
public final class WebAPI {
|
||||
|
||||
@@ -312,6 +314,34 @@ extension WebAPI {
|
||||
failure?(error)
|
||||
}
|
||||
}
|
||||
|
||||
public func sendEphemeral(
|
||||
channel: String,
|
||||
text: String,
|
||||
user: String,
|
||||
asUser: Bool? = nil,
|
||||
attachments: [Attachment?]? = nil,
|
||||
linkNames: Bool? = nil,
|
||||
parse: ParseMode? = nil,
|
||||
success: (((ts: String?, channel: String?)) -> Void)?,
|
||||
failure: FailureClosure?
|
||||
) {
|
||||
let parameters: [String: Any?] = [
|
||||
"token": token,
|
||||
"channel": channel,
|
||||
"text": text,
|
||||
"user": user,
|
||||
"as_user": asUser,
|
||||
"attachments": encodeAttachments(attachments),
|
||||
"link_names": linkNames,
|
||||
"parse": parse?.rawValue,
|
||||
]
|
||||
networkInterface.request(.chatPostEphemeral, parameters: parameters, successClosure: {(response) in
|
||||
success?((ts: response["sendMessage"] as? String, response["channel"] as? String))
|
||||
}) {(error) in
|
||||
failure?(error)
|
||||
}
|
||||
}
|
||||
|
||||
public func sendMeMessage(
|
||||
channel: String,
|
||||
@@ -1079,6 +1109,46 @@ extension WebAPI {
|
||||
}
|
||||
}
|
||||
|
||||
public func usersProfileSet(profile: User.Profile, success: SuccessClosure?, failure: FailureClosure?) {
|
||||
let profileValues = ([
|
||||
"first_name": profile.firstName,
|
||||
"last_name": profile.lastName,
|
||||
"real_name": profile.realName,
|
||||
"email": profile.email,
|
||||
"phone": profile.phone,
|
||||
"status_text": profile.statusText,
|
||||
"status_emoji": profile.statusEmoji,
|
||||
"status_expiration": profile.statusExpiration,
|
||||
] as [String: Any?])
|
||||
.filter { $0.value != nil }
|
||||
.mapValues { $0! }
|
||||
|
||||
do {
|
||||
let data = try JSONSerialization.data(withJSONObject: profileValues)
|
||||
let json = String(data: data, encoding: .utf8)
|
||||
guard let encodedJSON = json?.addingPercentEncoding(withAllowedCharacters: .urlQueryAllowed) else {
|
||||
throw SlackError.clientJSONError
|
||||
}
|
||||
var urlComponents = URLComponents(string: "https://slack.com/api/users.profile.set")
|
||||
urlComponents?.queryItems = [
|
||||
URLQueryItem(name: "token", value: token),
|
||||
URLQueryItem(name: "profile", value: encodedJSON)
|
||||
]
|
||||
|
||||
guard let requestString = urlComponents?.url?.absoluteString else {
|
||||
throw SlackError.clientNetworkError
|
||||
}
|
||||
|
||||
networkInterface.customRequest(requestString, data: Data(), success: { _ in
|
||||
success?(true)
|
||||
}) {(error) in
|
||||
failure?(error)
|
||||
}
|
||||
} catch {
|
||||
failure?(error as? SlackError ?? SlackError.unknownError)
|
||||
}
|
||||
}
|
||||
|
||||
public func setUserActive(success: SuccessClosure?, failure: FailureClosure?) {
|
||||
networkInterface.request(.usersSetActive, parameters: ["token": token], successClosure: { _ in
|
||||
success?(true)
|
||||
|
||||
+34
-35
@@ -1,47 +1,16 @@
|
||||
Pod::Spec.new do |s|
|
||||
s.name = "SlackKit"
|
||||
s.version = "4.2.0"
|
||||
s.version = "4.2.1"
|
||||
s.summary = "Write Slack apps in Swift"
|
||||
s.homepage = "https://github.com/pvzig/SlackKit"
|
||||
s.license = "MIT"
|
||||
s.author = { "Peter Zignego" => "peter@launchsoft.co" }
|
||||
s.source = { :git => "https://github.com/pvzig/SlackKit.git", :tag => s.version.to_s }
|
||||
s.social_media_url = "https://twitter.com/pvzig"
|
||||
s.ios.deployment_target = "10.0"
|
||||
s.osx.deployment_target = "10.11"
|
||||
s.tvos.deployment_target = "10.0"
|
||||
s.platforms = { :ios => '10.0', :osx => '10.11', :tvos => '10.0' }
|
||||
s.swift_version = '4.2'
|
||||
s.cocoapods_version = '>= 1.4.0'
|
||||
s.default_subspec = "SlackKit"
|
||||
s.swift_version = "4.2"
|
||||
s.cocoapods_version = ">= 1.4.0"
|
||||
|
||||
s.subspec "SKCore" do |ss|
|
||||
ss.source_files = "SKCore/Sources/"
|
||||
ss.framework = "Foundation"
|
||||
end
|
||||
|
||||
s.subspec "SKClient" do |ss|
|
||||
ss.source_files = "SKClient/Sources/"
|
||||
ss.dependency "SlackKit/SKCore"
|
||||
end
|
||||
|
||||
s.subspec "SKWebAPI" do |ss|
|
||||
ss.source_files = "SKWebAPI/Sources/"
|
||||
ss.dependency "SlackKit/SKCore"
|
||||
end
|
||||
|
||||
s.subspec "SKRTMAPI" do |ss|
|
||||
ss.source_files = "SKRTMAPI/Sources/"
|
||||
ss.dependency "SlackKit/SKCore"
|
||||
ss.dependency "SlackKit/SKWebAPI"
|
||||
ss.dependency "Starscream", "3.0.6"
|
||||
end
|
||||
|
||||
s.subspec "SKServer" do |ss|
|
||||
ss.source_files = "SKServer/Sources/"
|
||||
ss.dependency "SlackKit/SKCore"
|
||||
ss.dependency "SlackKit/SKWebAPI"
|
||||
ss.dependency "Swifter", "1.4.5"
|
||||
end
|
||||
|
||||
s.subspec "SlackKit" do |ss|
|
||||
ss.source_files = "SlackKit/Sources/"
|
||||
@@ -51,4 +20,34 @@ Pod::Spec.new do |s|
|
||||
ss.dependency "SlackKit/SKRTMAPI"
|
||||
ss.dependency "SlackKit/SKServer"
|
||||
end
|
||||
|
||||
s.subspec "SKClient" do |ss|
|
||||
ss.source_files = "SKClient/Sources/"
|
||||
ss.dependency "SlackKit/SKCore"
|
||||
end
|
||||
|
||||
s.subspec "SKCore" do |ss|
|
||||
ss.source_files = "SKCore/Sources/"
|
||||
ss.framework = "Foundation"
|
||||
end
|
||||
|
||||
s.subspec "SKRTMAPI" do |ss|
|
||||
ss.source_files = "SKRTMAPI/Sources/**/*.swift"
|
||||
ss.exclude_files = "SKRTMAPI/Sources/Conformers/VaporEngineRTM.swift"
|
||||
ss.dependency "SlackKit/SKCore"
|
||||
ss.dependency "SlackKit/SKWebAPI"
|
||||
ss.dependency "Starscream", "3.0.6"
|
||||
end
|
||||
|
||||
s.subspec "SKServer" do |ss|
|
||||
ss.source_files = "SKServer/Sources/**/*.swift"
|
||||
ss.dependency "SlackKit/SKCore"
|
||||
ss.dependency "SlackKit/SKWebAPI"
|
||||
ss.dependency "Swifter", "1.4.5"
|
||||
end
|
||||
|
||||
s.subspec "SKWebAPI" do |ss|
|
||||
ss.source_files = "SKWebAPI/Sources/"
|
||||
ss.dependency "SlackKit/SKCore"
|
||||
end
|
||||
end
|
||||
@@ -7,6 +7,21 @@
|
||||
objects = {
|
||||
|
||||
/* Begin PBXBuildFile section */
|
||||
2601B6CD2223038A00F197AB /* channel.json in Resources */ = {isa = PBXBuildFile; fileRef = 26D4E6282220731800A67B67 /* channel.json */; };
|
||||
2601B6CE2223038A00F197AB /* conversation.json in Resources */ = {isa = PBXBuildFile; fileRef = 26D4E6222220731700A67B67 /* conversation.json */; };
|
||||
2601B6CF2223038A00F197AB /* events.json in Resources */ = {isa = PBXBuildFile; fileRef = 26D4E6262220731800A67B67 /* events.json */; };
|
||||
2601B6D02223038A00F197AB /* file.json in Resources */ = {isa = PBXBuildFile; fileRef = 26D4E62A2220731800A67B67 /* file.json */; };
|
||||
2601B6D12223038A00F197AB /* group.json in Resources */ = {isa = PBXBuildFile; fileRef = 26D4E6272220731800A67B67 /* group.json */; };
|
||||
2601B6D22223038A00F197AB /* im.json in Resources */ = {isa = PBXBuildFile; fileRef = 26D4E6232220731700A67B67 /* im.json */; };
|
||||
2601B6D32223038A00F197AB /* mpim.json in Resources */ = {isa = PBXBuildFile; fileRef = 26D4E6212220731700A67B67 /* mpim.json */; };
|
||||
2601B6D42223038A00F197AB /* rtm.connect.json in Resources */ = {isa = PBXBuildFile; fileRef = 26D4E6292220731800A67B67 /* rtm.connect.json */; };
|
||||
2601B6D52223038A00F197AB /* rtm.start.json in Resources */ = {isa = PBXBuildFile; fileRef = 26D4E6202220731700A67B67 /* rtm.start.json */; };
|
||||
2601B6D62223038A00F197AB /* user.json in Resources */ = {isa = PBXBuildFile; fileRef = 26D4E6242220731800A67B67 /* user.json */; };
|
||||
2601B6D72223038A00F197AB /* usergroup.json in Resources */ = {isa = PBXBuildFile; fileRef = 26D4E6252220731800A67B67 /* usergroup.json */; };
|
||||
2601B6E2222371A100F197AB /* SKCoreTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 26D4E6362220733F00A67B67 /* SKCoreTests.swift */; };
|
||||
2601B70C222F6CFD00F197AB /* SKClientTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2601B70B222F6CFD00F197AB /* SKClientTests.swift */; };
|
||||
2601B70F222F766D00F197AB /* member_joined_channel.json in Resources */ = {isa = PBXBuildFile; fileRef = 2601B70D222F766D00F197AB /* member_joined_channel.json */; };
|
||||
2601B710222F766D00F197AB /* member_left_channel.json in Resources */ = {isa = PBXBuildFile; fileRef = 2601B70E222F766D00F197AB /* member_left_channel.json */; };
|
||||
263B102421FE33A000AF9EF9 /* UserGroup.swift in Sources */ = {isa = PBXBuildFile; fileRef = 263B100921FE33A000AF9EF9 /* UserGroup.swift */; };
|
||||
263B102521FE33A000AF9EF9 /* Scope.swift in Sources */ = {isa = PBXBuildFile; fileRef = 263B100A21FE33A000AF9EF9 /* Scope.swift */; };
|
||||
263B102621FE33A000AF9EF9 /* AttachmentField.swift in Sources */ = {isa = PBXBuildFile; fileRef = 263B100B21FE33A000AF9EF9 /* AttachmentField.swift */; };
|
||||
@@ -98,8 +113,59 @@
|
||||
26D4E4D32210A31F00A67B67 /* Starscream.framework in CopyFiles */ = {isa = PBXBuildFile; fileRef = 269A175A21FFDB4C00F1F500 /* Starscream.framework */; settings = {ATTRIBUTES = (RemoveHeadersOnCopy, ); }; };
|
||||
26D4E4D42210A31F00A67B67 /* Swifter.framework in CopyFiles */ = {isa = PBXBuildFile; fileRef = 269A175B21FFDB4C00F1F500 /* Swifter.framework */; settings = {ATTRIBUTES = (RemoveHeadersOnCopy, ); }; };
|
||||
26D4E4D92210A33A00A67B67 /* main.swift in Sources */ = {isa = PBXBuildFile; fileRef = 269A18362204057900F1F500 /* main.swift */; };
|
||||
26D4E605221211FD00A67B67 /* SlackKit.h in Headers */ = {isa = PBXBuildFile; fileRef = 26D4E602221211B900A67B67 /* SlackKit.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
||||
26D4E6062212120100A67B67 /* SKClient.h in Headers */ = {isa = PBXBuildFile; fileRef = 26D4E5FF221211B900A67B67 /* SKClient.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
||||
26D4E6072212120500A67B67 /* SKCore.h in Headers */ = {isa = PBXBuildFile; fileRef = 26D4E603221211B900A67B67 /* SKCore.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
||||
26D4E6082212120900A67B67 /* SKRTMAPI.h in Headers */ = {isa = PBXBuildFile; fileRef = 26D4E5FE221211B900A67B67 /* SKRTMAPI.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
||||
26D4E6092212120F00A67B67 /* SKServer.h in Headers */ = {isa = PBXBuildFile; fileRef = 26D4E600221211B900A67B67 /* SKServer.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
||||
26D4E60A2212121400A67B67 /* SKWebAPI.h in Headers */ = {isa = PBXBuildFile; fileRef = 26D4E601221211B900A67B67 /* SKWebAPI.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
||||
/* End PBXBuildFile section */
|
||||
|
||||
/* Begin PBXContainerItemProxy section */
|
||||
2601B6CB2223032600F197AB /* PBXContainerItemProxy */ = {
|
||||
isa = PBXContainerItemProxy;
|
||||
containerPortal = 263B0F8221FE1B2300AF9EF9 /* Project object */;
|
||||
proxyType = 1;
|
||||
remoteGlobalIDString = 263B0F9A21FE235100AF9EF9;
|
||||
remoteInfo = SKCore;
|
||||
};
|
||||
2601B6D82223039200F197AB /* PBXContainerItemProxy */ = {
|
||||
isa = PBXContainerItemProxy;
|
||||
containerPortal = 263B0F8221FE1B2300AF9EF9 /* Project object */;
|
||||
proxyType = 1;
|
||||
remoteGlobalIDString = 263B0FD021FE23CD00AF9EF9;
|
||||
remoteInfo = SlackKit;
|
||||
};
|
||||
2601B6DA2223039200F197AB /* PBXContainerItemProxy */ = {
|
||||
isa = PBXContainerItemProxy;
|
||||
containerPortal = 263B0F8221FE1B2300AF9EF9 /* Project object */;
|
||||
proxyType = 1;
|
||||
remoteGlobalIDString = 263B0FA921FE23A000AF9EF9;
|
||||
remoteInfo = SKClient;
|
||||
};
|
||||
2601B6DC2223039200F197AB /* PBXContainerItemProxy */ = {
|
||||
isa = PBXContainerItemProxy;
|
||||
containerPortal = 263B0F8221FE1B2300AF9EF9 /* Project object */;
|
||||
proxyType = 1;
|
||||
remoteGlobalIDString = 263B0FC321FE23C200AF9EF9;
|
||||
remoteInfo = SKRTMAPI;
|
||||
};
|
||||
2601B6DE2223039200F197AB /* PBXContainerItemProxy */ = {
|
||||
isa = PBXContainerItemProxy;
|
||||
containerPortal = 263B0F8221FE1B2300AF9EF9 /* Project object */;
|
||||
proxyType = 1;
|
||||
remoteGlobalIDString = 263B0FDD21FE23DB00AF9EF9;
|
||||
remoteInfo = SKServer;
|
||||
};
|
||||
2601B6E02223039200F197AB /* PBXContainerItemProxy */ = {
|
||||
isa = PBXContainerItemProxy;
|
||||
containerPortal = 263B0F8221FE1B2300AF9EF9 /* Project object */;
|
||||
proxyType = 1;
|
||||
remoteGlobalIDString = 263B0FB621FE23B000AF9EF9;
|
||||
remoteInfo = SKWebAPI;
|
||||
};
|
||||
/* End PBXContainerItemProxy section */
|
||||
|
||||
/* Begin PBXCopyFilesBuildPhase section */
|
||||
269A185A220BB2B800F1F500 /* CopyFiles */ = {
|
||||
isa = PBXCopyFilesBuildPhase;
|
||||
@@ -126,6 +192,11 @@
|
||||
/* End PBXCopyFilesBuildPhase section */
|
||||
|
||||
/* Begin PBXFileReference section */
|
||||
2601B6B72220813600F197AB /* SlackKitTests.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = SlackKitTests.xcconfig; sourceTree = "<group>"; };
|
||||
2601B6C1222085AB00F197AB /* SlackKitTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = SlackKitTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
2601B70B222F6CFD00F197AB /* SKClientTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SKClientTests.swift; sourceTree = "<group>"; };
|
||||
2601B70D222F766D00F197AB /* member_joined_channel.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = member_joined_channel.json; sourceTree = "<group>"; };
|
||||
2601B70E222F766D00F197AB /* member_left_channel.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = member_left_channel.json; sourceTree = "<group>"; };
|
||||
263B0F9B21FE235100AF9EF9 /* SKCore.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = SKCore.framework; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
263B0FAA21FE23A000AF9EF9 /* SKClient.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = SKClient.framework; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
263B0FB721FE23B000AF9EF9 /* SKWebAPI.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = SKWebAPI.framework; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
@@ -220,9 +291,36 @@
|
||||
269A18332204055200F1F500 /* main.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = main.swift; sourceTree = "<group>"; };
|
||||
269A18362204057900F1F500 /* main.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = main.swift; sourceTree = "<group>"; };
|
||||
26D4E4D82210A31F00A67B67 /* Robot or Not Bot.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "Robot or Not Bot.app"; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
26D4E5FE221211B900A67B67 /* SKRTMAPI.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SKRTMAPI.h; sourceTree = "<group>"; };
|
||||
26D4E5FF221211B900A67B67 /* SKClient.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SKClient.h; sourceTree = "<group>"; };
|
||||
26D4E600221211B900A67B67 /* SKServer.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SKServer.h; sourceTree = "<group>"; };
|
||||
26D4E601221211B900A67B67 /* SKWebAPI.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SKWebAPI.h; sourceTree = "<group>"; };
|
||||
26D4E602221211B900A67B67 /* SlackKit.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SlackKit.h; sourceTree = "<group>"; };
|
||||
26D4E603221211B900A67B67 /* SKCore.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SKCore.h; sourceTree = "<group>"; };
|
||||
26D4E604221211B900A67B67 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
|
||||
26D4E6142220719D00A67B67 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
|
||||
26D4E6202220731700A67B67 /* rtm.start.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = rtm.start.json; sourceTree = "<group>"; };
|
||||
26D4E6212220731700A67B67 /* mpim.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = mpim.json; sourceTree = "<group>"; };
|
||||
26D4E6222220731700A67B67 /* conversation.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = conversation.json; sourceTree = "<group>"; };
|
||||
26D4E6232220731700A67B67 /* im.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = im.json; sourceTree = "<group>"; };
|
||||
26D4E6242220731800A67B67 /* user.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = user.json; sourceTree = "<group>"; };
|
||||
26D4E6252220731800A67B67 /* usergroup.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = usergroup.json; sourceTree = "<group>"; };
|
||||
26D4E6262220731800A67B67 /* events.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = events.json; sourceTree = "<group>"; };
|
||||
26D4E6272220731800A67B67 /* group.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = group.json; sourceTree = "<group>"; };
|
||||
26D4E6282220731800A67B67 /* channel.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = channel.json; sourceTree = "<group>"; };
|
||||
26D4E6292220731800A67B67 /* rtm.connect.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = rtm.connect.json; sourceTree = "<group>"; };
|
||||
26D4E62A2220731800A67B67 /* file.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = file.json; sourceTree = "<group>"; };
|
||||
26D4E6362220733F00A67B67 /* SKCoreTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SKCoreTests.swift; sourceTree = "<group>"; };
|
||||
/* End PBXFileReference section */
|
||||
|
||||
/* Begin PBXFrameworksBuildPhase section */
|
||||
2601B6BE222085AB00F197AB /* Frameworks */ = {
|
||||
isa = PBXFrameworksBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
263B0F9821FE235100AF9EF9 /* Frameworks */ = {
|
||||
isa = PBXFrameworksBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
@@ -304,7 +402,9 @@
|
||||
263B0FC521FE23C200AF9EF9 /* SKRTMAPI */,
|
||||
263B0FDF21FE23DB00AF9EF9 /* SKServer */,
|
||||
263B0FB821FE23B000AF9EF9 /* SKWebAPI */,
|
||||
26D4E5FD221211B900A67B67 /* Supporting Files */,
|
||||
269A18272204048300F1F500 /* Examples */,
|
||||
26D4E6112220719D00A67B67 /* SlackKitTests */,
|
||||
263B10CB21FE4DD900AF9EF9 /* Frameworks */,
|
||||
263B0FD121FE23CD00AF9EF9 /* SlackKit.framework */,
|
||||
263B0FAA21FE23A000AF9EF9 /* SKClient.framework */,
|
||||
@@ -314,6 +414,7 @@
|
||||
263B0FB721FE23B000AF9EF9 /* SKWebAPI.framework */,
|
||||
263B0FEA21FE247300AF9EF9 /* Leaderboard.app */,
|
||||
26D4E4D82210A31F00A67B67 /* Robot or Not Bot.app */,
|
||||
2601B6C1222085AB00F197AB /* SlackKitTests.xctest */,
|
||||
);
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
@@ -684,6 +785,108 @@
|
||||
path = Sources;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
26D4E5FD221211B900A67B67 /* Supporting Files */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
26D4E602221211B900A67B67 /* SlackKit.h */,
|
||||
26D4E5FF221211B900A67B67 /* SKClient.h */,
|
||||
26D4E603221211B900A67B67 /* SKCore.h */,
|
||||
26D4E5FE221211B900A67B67 /* SKRTMAPI.h */,
|
||||
26D4E600221211B900A67B67 /* SKServer.h */,
|
||||
26D4E601221211B900A67B67 /* SKWebAPI.h */,
|
||||
26D4E604221211B900A67B67 /* Info.plist */,
|
||||
);
|
||||
path = "Supporting Files";
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
26D4E6112220719D00A67B67 /* SlackKitTests */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
26D4E61A222072BC00A67B67 /* SlackKit */,
|
||||
26D4E61B222072C600A67B67 /* SKClient */,
|
||||
26D4E61C222072D100A67B67 /* SKCore */,
|
||||
26D4E61D222072D600A67B67 /* SKRTMAPI */,
|
||||
26D4E61E222072DC00A67B67 /* SKServer */,
|
||||
26D4E61F222072E800A67B67 /* SKWebAPI */,
|
||||
26D4E618222072A700A67B67 /* Resources */,
|
||||
26D4E619222072B000A67B67 /* Supporting Files */,
|
||||
);
|
||||
path = SlackKitTests;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
26D4E618222072A700A67B67 /* Resources */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
26D4E6282220731800A67B67 /* channel.json */,
|
||||
26D4E6222220731700A67B67 /* conversation.json */,
|
||||
26D4E6262220731800A67B67 /* events.json */,
|
||||
26D4E62A2220731800A67B67 /* file.json */,
|
||||
26D4E6272220731800A67B67 /* group.json */,
|
||||
26D4E6232220731700A67B67 /* im.json */,
|
||||
26D4E6212220731700A67B67 /* mpim.json */,
|
||||
26D4E6292220731800A67B67 /* rtm.connect.json */,
|
||||
26D4E6202220731700A67B67 /* rtm.start.json */,
|
||||
26D4E6242220731800A67B67 /* user.json */,
|
||||
26D4E6252220731800A67B67 /* usergroup.json */,
|
||||
2601B70D222F766D00F197AB /* member_joined_channel.json */,
|
||||
2601B70E222F766D00F197AB /* member_left_channel.json */,
|
||||
);
|
||||
path = Resources;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
26D4E619222072B000A67B67 /* Supporting Files */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
26D4E6142220719D00A67B67 /* Info.plist */,
|
||||
2601B6B72220813600F197AB /* SlackKitTests.xcconfig */,
|
||||
);
|
||||
path = "Supporting Files";
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
26D4E61A222072BC00A67B67 /* SlackKit */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
);
|
||||
path = SlackKit;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
26D4E61B222072C600A67B67 /* SKClient */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
2601B70B222F6CFD00F197AB /* SKClientTests.swift */,
|
||||
);
|
||||
path = SKClient;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
26D4E61C222072D100A67B67 /* SKCore */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
26D4E6362220733F00A67B67 /* SKCoreTests.swift */,
|
||||
);
|
||||
path = SKCore;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
26D4E61D222072D600A67B67 /* SKRTMAPI */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
);
|
||||
path = SKRTMAPI;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
26D4E61E222072DC00A67B67 /* SKServer */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
);
|
||||
path = SKServer;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
26D4E61F222072E800A67B67 /* SKWebAPI */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
);
|
||||
path = SKWebAPI;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
/* End PBXGroup section */
|
||||
|
||||
/* Begin PBXHeadersBuildPhase section */
|
||||
@@ -691,6 +894,7 @@
|
||||
isa = PBXHeadersBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
26D4E6072212120500A67B67 /* SKCore.h in Headers */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
@@ -698,6 +902,7 @@
|
||||
isa = PBXHeadersBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
26D4E6062212120100A67B67 /* SKClient.h in Headers */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
@@ -705,6 +910,7 @@
|
||||
isa = PBXHeadersBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
26D4E60A2212121400A67B67 /* SKWebAPI.h in Headers */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
@@ -712,6 +918,7 @@
|
||||
isa = PBXHeadersBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
26D4E6082212120900A67B67 /* SKRTMAPI.h in Headers */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
@@ -719,6 +926,7 @@
|
||||
isa = PBXHeadersBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
26D4E605221211FD00A67B67 /* SlackKit.h in Headers */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
@@ -726,12 +934,36 @@
|
||||
isa = PBXHeadersBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
26D4E6092212120F00A67B67 /* SKServer.h in Headers */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXHeadersBuildPhase section */
|
||||
|
||||
/* Begin PBXNativeTarget section */
|
||||
2601B6C0222085AB00F197AB /* SlackKitTests */ = {
|
||||
isa = PBXNativeTarget;
|
||||
buildConfigurationList = 2601B6C6222085AB00F197AB /* Build configuration list for PBXNativeTarget "SlackKitTests" */;
|
||||
buildPhases = (
|
||||
2601B6BD222085AB00F197AB /* Sources */,
|
||||
2601B6BE222085AB00F197AB /* Frameworks */,
|
||||
2601B6BF222085AB00F197AB /* Resources */,
|
||||
);
|
||||
buildRules = (
|
||||
);
|
||||
dependencies = (
|
||||
2601B6D92223039200F197AB /* PBXTargetDependency */,
|
||||
2601B6DB2223039200F197AB /* PBXTargetDependency */,
|
||||
2601B6DD2223039200F197AB /* PBXTargetDependency */,
|
||||
2601B6DF2223039200F197AB /* PBXTargetDependency */,
|
||||
2601B6E12223039200F197AB /* PBXTargetDependency */,
|
||||
2601B6CC2223032600F197AB /* PBXTargetDependency */,
|
||||
);
|
||||
name = SlackKitTests;
|
||||
productName = SlackKitTests;
|
||||
productReference = 2601B6C1222085AB00F197AB /* SlackKitTests.xctest */;
|
||||
productType = "com.apple.product-type.bundle.unit-test";
|
||||
};
|
||||
263B0F9A21FE235100AF9EF9 /* SKCore */ = {
|
||||
isa = PBXNativeTarget;
|
||||
buildConfigurationList = 263B0FA021FE235100AF9EF9 /* Build configuration list for PBXNativeTarget "SKCore" */;
|
||||
@@ -884,6 +1116,9 @@
|
||||
LastUpgradeCheck = 1010;
|
||||
ORGANIZATIONNAME = "Peter Zignego";
|
||||
TargetAttributes = {
|
||||
2601B6C0222085AB00F197AB = {
|
||||
CreatedOnToolsVersion = 10.1;
|
||||
};
|
||||
263B0F9A21FE235100AF9EF9 = {
|
||||
CreatedOnToolsVersion = 10.1;
|
||||
};
|
||||
@@ -929,11 +1164,32 @@
|
||||
263B0FB621FE23B000AF9EF9 /* SKWebAPI */,
|
||||
263B0FE921FE247300AF9EF9 /* Leaderboard */,
|
||||
26D4E4CB2210A31F00A67B67 /* Robot or Not Bot */,
|
||||
2601B6C0222085AB00F197AB /* SlackKitTests */,
|
||||
);
|
||||
};
|
||||
/* End PBXProject section */
|
||||
|
||||
/* Begin PBXResourcesBuildPhase section */
|
||||
2601B6BF222085AB00F197AB /* Resources */ = {
|
||||
isa = PBXResourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
2601B6CD2223038A00F197AB /* channel.json in Resources */,
|
||||
2601B710222F766D00F197AB /* member_left_channel.json in Resources */,
|
||||
2601B6CE2223038A00F197AB /* conversation.json in Resources */,
|
||||
2601B70F222F766D00F197AB /* member_joined_channel.json in Resources */,
|
||||
2601B6CF2223038A00F197AB /* events.json in Resources */,
|
||||
2601B6D02223038A00F197AB /* file.json in Resources */,
|
||||
2601B6D12223038A00F197AB /* group.json in Resources */,
|
||||
2601B6D22223038A00F197AB /* im.json in Resources */,
|
||||
2601B6D32223038A00F197AB /* mpim.json in Resources */,
|
||||
2601B6D42223038A00F197AB /* rtm.connect.json in Resources */,
|
||||
2601B6D52223038A00F197AB /* rtm.start.json in Resources */,
|
||||
2601B6D62223038A00F197AB /* user.json in Resources */,
|
||||
2601B6D72223038A00F197AB /* usergroup.json in Resources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
263B0F9921FE235100AF9EF9 /* Resources */ = {
|
||||
isa = PBXResourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
@@ -979,6 +1235,15 @@
|
||||
/* End PBXResourcesBuildPhase section */
|
||||
|
||||
/* Begin PBXSourcesBuildPhase section */
|
||||
2601B6BD222085AB00F197AB /* Sources */ = {
|
||||
isa = PBXSourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
2601B70C222F6CFD00F197AB /* SKClientTests.swift in Sources */,
|
||||
2601B6E2222371A100F197AB /* SKCoreTests.swift in Sources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
263B0F9721FE235100AF9EF9 /* Sources */ = {
|
||||
isa = PBXSourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
@@ -1111,7 +1376,101 @@
|
||||
};
|
||||
/* End PBXSourcesBuildPhase section */
|
||||
|
||||
/* Begin PBXTargetDependency section */
|
||||
2601B6CC2223032600F197AB /* PBXTargetDependency */ = {
|
||||
isa = PBXTargetDependency;
|
||||
target = 263B0F9A21FE235100AF9EF9 /* SKCore */;
|
||||
targetProxy = 2601B6CB2223032600F197AB /* PBXContainerItemProxy */;
|
||||
};
|
||||
2601B6D92223039200F197AB /* PBXTargetDependency */ = {
|
||||
isa = PBXTargetDependency;
|
||||
target = 263B0FD021FE23CD00AF9EF9 /* SlackKit */;
|
||||
targetProxy = 2601B6D82223039200F197AB /* PBXContainerItemProxy */;
|
||||
};
|
||||
2601B6DB2223039200F197AB /* PBXTargetDependency */ = {
|
||||
isa = PBXTargetDependency;
|
||||
target = 263B0FA921FE23A000AF9EF9 /* SKClient */;
|
||||
targetProxy = 2601B6DA2223039200F197AB /* PBXContainerItemProxy */;
|
||||
};
|
||||
2601B6DD2223039200F197AB /* PBXTargetDependency */ = {
|
||||
isa = PBXTargetDependency;
|
||||
target = 263B0FC321FE23C200AF9EF9 /* SKRTMAPI */;
|
||||
targetProxy = 2601B6DC2223039200F197AB /* PBXContainerItemProxy */;
|
||||
};
|
||||
2601B6DF2223039200F197AB /* PBXTargetDependency */ = {
|
||||
isa = PBXTargetDependency;
|
||||
target = 263B0FDD21FE23DB00AF9EF9 /* SKServer */;
|
||||
targetProxy = 2601B6DE2223039200F197AB /* PBXContainerItemProxy */;
|
||||
};
|
||||
2601B6E12223039200F197AB /* PBXTargetDependency */ = {
|
||||
isa = PBXTargetDependency;
|
||||
target = 263B0FB621FE23B000AF9EF9 /* SKWebAPI */;
|
||||
targetProxy = 2601B6E02223039200F197AB /* PBXContainerItemProxy */;
|
||||
};
|
||||
/* End PBXTargetDependency section */
|
||||
|
||||
/* Begin XCBuildConfiguration section */
|
||||
2601B6C7222085AB00F197AB /* Debug */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
baseConfigurationReference = 2601B6B72220813600F197AB /* SlackKitTests.xcconfig */;
|
||||
buildSettings = {
|
||||
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = NO;
|
||||
CODE_SIGN_IDENTITY = "";
|
||||
CODE_SIGN_STYLE = Manual;
|
||||
DEVELOPMENT_TEAM = "";
|
||||
GCC_PREPROCESSOR_DEFINITIONS = (
|
||||
"DEBUG=1",
|
||||
"$(inherited)",
|
||||
);
|
||||
INFOPLIST_FILE = "SlackKitTests/Supporting Files/Info.plist";
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 10.0;
|
||||
LD_RUNPATH_SEARCH_PATHS = (
|
||||
"$(inherited)",
|
||||
"@executable_path/../Frameworks",
|
||||
"@loader_path/../Frameworks",
|
||||
"@executable_path/Frameworks",
|
||||
"@loader_path/Frameworks",
|
||||
);
|
||||
OTHER_SWIFT_FLAGS = "-DXcode";
|
||||
PRODUCT_BUNDLE_IDENTIFIER = com.launchsoft.SlackKitTests;
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
PROVISIONING_PROFILE_SPECIFIER = "";
|
||||
SUPPORTED_PLATFORMS = "iphonesimulator iphoneos appletvsimulator appletvos macosx";
|
||||
SWIFT_VERSION = 4.2;
|
||||
TARGETED_DEVICE_FAMILY = "1,2,3";
|
||||
TVOS_DEPLOYMENT_TARGET = 10.0;
|
||||
VALID_ARCHS = "x86_64 i386";
|
||||
};
|
||||
name = Debug;
|
||||
};
|
||||
2601B6C8222085AB00F197AB /* Release */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = NO;
|
||||
CODE_SIGN_IDENTITY = "";
|
||||
CODE_SIGN_STYLE = Manual;
|
||||
DEVELOPMENT_TEAM = "";
|
||||
INFOPLIST_FILE = "SlackKitTests/Supporting Files/Info.plist";
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 10.0;
|
||||
LD_RUNPATH_SEARCH_PATHS = (
|
||||
"$(inherited)",
|
||||
"@executable_path/../Frameworks",
|
||||
"@loader_path/../Frameworks",
|
||||
"@executable_path/Frameworks",
|
||||
"@loader_path/Frameworks",
|
||||
);
|
||||
OTHER_SWIFT_FLAGS = "-DXcode";
|
||||
PRODUCT_BUNDLE_IDENTIFIER = com.launchsoft.SlackKitTests;
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
PROVISIONING_PROFILE_SPECIFIER = "";
|
||||
SUPPORTED_PLATFORMS = "iphonesimulator iphoneos appletvsimulator appletvos macosx";
|
||||
SWIFT_VERSION = 4.2;
|
||||
TARGETED_DEVICE_FAMILY = "1,2,3";
|
||||
TVOS_DEPLOYMENT_TARGET = 10.0;
|
||||
VALID_ARCHS = "x86_64 i386";
|
||||
};
|
||||
name = Release;
|
||||
};
|
||||
263B0F9121FE1B2300AF9EF9 /* Debug */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
@@ -1246,7 +1605,7 @@
|
||||
DYLIB_COMPATIBILITY_VERSION = 1;
|
||||
DYLIB_CURRENT_VERSION = 1;
|
||||
DYLIB_INSTALL_NAME_BASE = "@rpath";
|
||||
INFOPLIST_FILE = "$(PROJECT_DIR)/Info.plist";
|
||||
INFOPLIST_FILE = "$(PROJECT_DIR)/Supporting Files/Info.plist";
|
||||
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
|
||||
LD_RUNPATH_SEARCH_PATHS = (
|
||||
"$(inherited)",
|
||||
@@ -1276,7 +1635,7 @@
|
||||
DYLIB_COMPATIBILITY_VERSION = 1;
|
||||
DYLIB_CURRENT_VERSION = 1;
|
||||
DYLIB_INSTALL_NAME_BASE = "@rpath";
|
||||
INFOPLIST_FILE = "$(PROJECT_DIR)/Info.plist";
|
||||
INFOPLIST_FILE = "$(PROJECT_DIR)/Supporting Files/Info.plist";
|
||||
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
|
||||
LD_RUNPATH_SEARCH_PATHS = (
|
||||
"$(inherited)",
|
||||
@@ -1306,7 +1665,8 @@
|
||||
DYLIB_COMPATIBILITY_VERSION = 1;
|
||||
DYLIB_CURRENT_VERSION = 1;
|
||||
DYLIB_INSTALL_NAME_BASE = "@rpath";
|
||||
INFOPLIST_FILE = "$(PROJECT_DIR)/Info.plist";
|
||||
HEADER_SEARCH_PATHS = "";
|
||||
INFOPLIST_FILE = "$(PROJECT_DIR)/Supporting Files/Info.plist";
|
||||
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
|
||||
LD_RUNPATH_SEARCH_PATHS = (
|
||||
"$(inherited)",
|
||||
@@ -1336,7 +1696,8 @@
|
||||
DYLIB_COMPATIBILITY_VERSION = 1;
|
||||
DYLIB_CURRENT_VERSION = 1;
|
||||
DYLIB_INSTALL_NAME_BASE = "@rpath";
|
||||
INFOPLIST_FILE = "$(PROJECT_DIR)/Info.plist";
|
||||
HEADER_SEARCH_PATHS = "";
|
||||
INFOPLIST_FILE = "$(PROJECT_DIR)/Supporting Files/Info.plist";
|
||||
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
|
||||
LD_RUNPATH_SEARCH_PATHS = (
|
||||
"$(inherited)",
|
||||
@@ -1366,7 +1727,8 @@
|
||||
DYLIB_COMPATIBILITY_VERSION = 1;
|
||||
DYLIB_CURRENT_VERSION = 1;
|
||||
DYLIB_INSTALL_NAME_BASE = "@rpath";
|
||||
INFOPLIST_FILE = "$(PROJECT_DIR)/Info.plist";
|
||||
HEADER_SEARCH_PATHS = "";
|
||||
INFOPLIST_FILE = "$(PROJECT_DIR)/Supporting Files/Info.plist";
|
||||
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
|
||||
LD_RUNPATH_SEARCH_PATHS = (
|
||||
"$(inherited)",
|
||||
@@ -1396,7 +1758,8 @@
|
||||
DYLIB_COMPATIBILITY_VERSION = 1;
|
||||
DYLIB_CURRENT_VERSION = 1;
|
||||
DYLIB_INSTALL_NAME_BASE = "@rpath";
|
||||
INFOPLIST_FILE = "$(PROJECT_DIR)/Info.plist";
|
||||
HEADER_SEARCH_PATHS = "";
|
||||
INFOPLIST_FILE = "$(PROJECT_DIR)/Supporting Files/Info.plist";
|
||||
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
|
||||
LD_RUNPATH_SEARCH_PATHS = (
|
||||
"$(inherited)",
|
||||
@@ -1428,7 +1791,7 @@
|
||||
DYLIB_CURRENT_VERSION = 1;
|
||||
DYLIB_INSTALL_NAME_BASE = "@rpath";
|
||||
FRAMEWORK_SEARCH_PATHS = "$(inherited)";
|
||||
INFOPLIST_FILE = "$(PROJECT_DIR)/Info.plist";
|
||||
INFOPLIST_FILE = "$(PROJECT_DIR)/Supporting Files/Info.plist";
|
||||
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
|
||||
LD_RUNPATH_SEARCH_PATHS = (
|
||||
"$(inherited)",
|
||||
@@ -1460,7 +1823,7 @@
|
||||
DYLIB_CURRENT_VERSION = 1;
|
||||
DYLIB_INSTALL_NAME_BASE = "@rpath";
|
||||
FRAMEWORK_SEARCH_PATHS = "$(inherited)";
|
||||
INFOPLIST_FILE = "$(PROJECT_DIR)/Info.plist";
|
||||
INFOPLIST_FILE = "$(PROJECT_DIR)/Supporting Files/Info.plist";
|
||||
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
|
||||
LD_RUNPATH_SEARCH_PATHS = (
|
||||
"$(inherited)",
|
||||
@@ -1491,7 +1854,7 @@
|
||||
DYLIB_COMPATIBILITY_VERSION = 1;
|
||||
DYLIB_CURRENT_VERSION = 1;
|
||||
DYLIB_INSTALL_NAME_BASE = "@rpath";
|
||||
INFOPLIST_FILE = "$(PROJECT_DIR)/Info.plist";
|
||||
INFOPLIST_FILE = "$(PROJECT_DIR)/Supporting Files/Info.plist";
|
||||
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
|
||||
LD_RUNPATH_SEARCH_PATHS = (
|
||||
"$(inherited)",
|
||||
@@ -1523,7 +1886,7 @@
|
||||
DYLIB_COMPATIBILITY_VERSION = 1;
|
||||
DYLIB_CURRENT_VERSION = 1;
|
||||
DYLIB_INSTALL_NAME_BASE = "@rpath";
|
||||
INFOPLIST_FILE = "$(PROJECT_DIR)/Info.plist";
|
||||
INFOPLIST_FILE = "$(PROJECT_DIR)/Supporting Files/Info.plist";
|
||||
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
|
||||
LD_RUNPATH_SEARCH_PATHS = (
|
||||
"$(inherited)",
|
||||
@@ -1555,7 +1918,7 @@
|
||||
DYLIB_CURRENT_VERSION = 1;
|
||||
DYLIB_INSTALL_NAME_BASE = "@rpath";
|
||||
FRAMEWORK_SEARCH_PATHS = "$(inherited)";
|
||||
INFOPLIST_FILE = "$(PROJECT_DIR)/Info.plist";
|
||||
INFOPLIST_FILE = "$(PROJECT_DIR)/Supporting Files/Info.plist";
|
||||
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
|
||||
LD_RUNPATH_SEARCH_PATHS = (
|
||||
"$(inherited)",
|
||||
@@ -1587,7 +1950,7 @@
|
||||
DYLIB_CURRENT_VERSION = 1;
|
||||
DYLIB_INSTALL_NAME_BASE = "@rpath";
|
||||
FRAMEWORK_SEARCH_PATHS = "$(inherited)";
|
||||
INFOPLIST_FILE = "$(PROJECT_DIR)/Info.plist";
|
||||
INFOPLIST_FILE = "$(PROJECT_DIR)/Supporting Files/Info.plist";
|
||||
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
|
||||
LD_RUNPATH_SEARCH_PATHS = (
|
||||
"$(inherited)",
|
||||
@@ -1710,6 +2073,15 @@
|
||||
/* End XCBuildConfiguration section */
|
||||
|
||||
/* Begin XCConfigurationList section */
|
||||
2601B6C6222085AB00F197AB /* Build configuration list for PBXNativeTarget "SlackKitTests" */ = {
|
||||
isa = XCConfigurationList;
|
||||
buildConfigurations = (
|
||||
2601B6C7222085AB00F197AB /* Debug */,
|
||||
2601B6C8222085AB00F197AB /* Release */,
|
||||
);
|
||||
defaultConfigurationIsVisible = 0;
|
||||
defaultConfigurationName = Release;
|
||||
};
|
||||
263B0F8521FE1B2300AF9EF9 /* Build configuration list for PBXProject "SlackKit" */ = {
|
||||
isa = XCConfigurationList;
|
||||
buildConfigurations = (
|
||||
|
||||
@@ -1,91 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<Scheme
|
||||
LastUpgradeVersion = "1010"
|
||||
version = "1.3">
|
||||
<BuildAction
|
||||
parallelizeBuildables = "YES"
|
||||
buildImplicitDependencies = "YES">
|
||||
<BuildActionEntries>
|
||||
<BuildActionEntry
|
||||
buildForTesting = "YES"
|
||||
buildForRunning = "YES"
|
||||
buildForProfiling = "YES"
|
||||
buildForArchiving = "YES"
|
||||
buildForAnalyzing = "YES">
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "26D4E4CB2210A31F00A67B67"
|
||||
BuildableName = "Robot or Not Bot.app"
|
||||
BlueprintName = "Robot or Not Bot"
|
||||
ReferencedContainer = "container:SlackKit.xcodeproj">
|
||||
</BuildableReference>
|
||||
</BuildActionEntry>
|
||||
</BuildActionEntries>
|
||||
</BuildAction>
|
||||
<TestAction
|
||||
buildConfiguration = "Debug"
|
||||
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
|
||||
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
||||
shouldUseLaunchSchemeArgsEnv = "YES">
|
||||
<Testables>
|
||||
</Testables>
|
||||
<MacroExpansion>
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "26D4E4CB2210A31F00A67B67"
|
||||
BuildableName = "Robot or Not Bot.app"
|
||||
BlueprintName = "Robot or Not Bot"
|
||||
ReferencedContainer = "container:SlackKit.xcodeproj">
|
||||
</BuildableReference>
|
||||
</MacroExpansion>
|
||||
<AdditionalOptions>
|
||||
</AdditionalOptions>
|
||||
</TestAction>
|
||||
<LaunchAction
|
||||
buildConfiguration = "Debug"
|
||||
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
|
||||
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
||||
launchStyle = "0"
|
||||
useCustomWorkingDirectory = "NO"
|
||||
ignoresPersistentStateOnLaunch = "NO"
|
||||
debugDocumentVersioning = "YES"
|
||||
debugServiceExtension = "internal"
|
||||
allowLocationSimulation = "YES">
|
||||
<BuildableProductRunnable
|
||||
runnableDebuggingMode = "0">
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "26D4E4CB2210A31F00A67B67"
|
||||
BuildableName = "Robot or Not Bot.app"
|
||||
BlueprintName = "Robot or Not Bot"
|
||||
ReferencedContainer = "container:SlackKit.xcodeproj">
|
||||
</BuildableReference>
|
||||
</BuildableProductRunnable>
|
||||
<AdditionalOptions>
|
||||
</AdditionalOptions>
|
||||
</LaunchAction>
|
||||
<ProfileAction
|
||||
buildConfiguration = "Release"
|
||||
shouldUseLaunchSchemeArgsEnv = "YES"
|
||||
savedToolIdentifier = ""
|
||||
useCustomWorkingDirectory = "NO"
|
||||
debugDocumentVersioning = "YES">
|
||||
<BuildableProductRunnable
|
||||
runnableDebuggingMode = "0">
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "26D4E4CB2210A31F00A67B67"
|
||||
BuildableName = "Robot or Not Bot.app"
|
||||
BlueprintName = "Robot or Not Bot"
|
||||
ReferencedContainer = "container:SlackKit.xcodeproj">
|
||||
</BuildableReference>
|
||||
</BuildableProductRunnable>
|
||||
</ProfileAction>
|
||||
<AnalyzeAction
|
||||
buildConfiguration = "Debug">
|
||||
</AnalyzeAction>
|
||||
<ArchiveAction
|
||||
buildConfiguration = "Release"
|
||||
revealArchiveInOrganizer = "YES">
|
||||
</ArchiveAction>
|
||||
</Scheme>
|
||||
@@ -0,0 +1,61 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<Scheme
|
||||
LastUpgradeVersion = "1010"
|
||||
version = "1.3">
|
||||
<BuildAction
|
||||
parallelizeBuildables = "YES"
|
||||
buildImplicitDependencies = "YES">
|
||||
</BuildAction>
|
||||
<TestAction
|
||||
buildConfiguration = "Debug"
|
||||
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
|
||||
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
||||
shouldUseLaunchSchemeArgsEnv = "YES">
|
||||
<Testables>
|
||||
<TestableReference
|
||||
skipped = "NO">
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "2601B6C0222085AB00F197AB"
|
||||
BuildableName = "SlackKitTests.xctest"
|
||||
BlueprintName = "SlackKitTests"
|
||||
ReferencedContainer = "container:SlackKit.xcodeproj">
|
||||
</BuildableReference>
|
||||
</TestableReference>
|
||||
</Testables>
|
||||
<AdditionalOptions>
|
||||
</AdditionalOptions>
|
||||
</TestAction>
|
||||
<LaunchAction
|
||||
buildConfiguration = "Debug"
|
||||
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
|
||||
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
||||
launchStyle = "0"
|
||||
useCustomWorkingDirectory = "NO"
|
||||
ignoresPersistentStateOnLaunch = "NO"
|
||||
debugDocumentVersioning = "YES"
|
||||
debugServiceExtension = "internal"
|
||||
allowLocationSimulation = "YES">
|
||||
<CommandLineArguments>
|
||||
<CommandLineArgument
|
||||
isEnabled = "YES">
|
||||
</CommandLineArgument>
|
||||
</CommandLineArguments>
|
||||
<AdditionalOptions>
|
||||
</AdditionalOptions>
|
||||
</LaunchAction>
|
||||
<ProfileAction
|
||||
buildConfiguration = "Release"
|
||||
shouldUseLaunchSchemeArgsEnv = "YES"
|
||||
savedToolIdentifier = ""
|
||||
useCustomWorkingDirectory = "NO"
|
||||
debugDocumentVersioning = "YES">
|
||||
</ProfileAction>
|
||||
<AnalyzeAction
|
||||
buildConfiguration = "Debug">
|
||||
</AnalyzeAction>
|
||||
<ArchiveAction
|
||||
buildConfiguration = "Release"
|
||||
revealArchiveInOrganizer = "YES">
|
||||
</ArchiveAction>
|
||||
</Scheme>
|
||||
+35
-111
@@ -1,51 +1,56 @@
|
||||
<p align="center"><img src="https://cloud.githubusercontent.com/assets/8311605/24083714/e921a0d4-0cb2-11e7-8384-d42113ef5056.png" alt="SlackKit" width="500"/></p>
|
||||
# SlackKit: Slack Apps in Swift
|
||||
|
||||

|
||||

|
||||

|
||||
[](https://github.com/apple/swift-package-manager)
|
||||
[](https://github.com/Carthage/Carthage)
|
||||
[](https://cocoapods.org)
|
||||
## Installation
|
||||
<details>
|
||||
<summary><strong>Swift Package Manager</strong></summary>
|
||||
Add SlackKit to your <code>Package.swift</code>
|
||||
|
||||
## SlackKit: Slack Apps in Swift
|
||||
### Description
|
||||
|
||||
SlackKit makes it easy to build Slack apps in Swift.
|
||||
|
||||
It's intended to expose all of the functionality of Slack's [Real Time Messaging API](https://api.slack.com/rtm) as well as the [web APIs](https://api.slack.com/web) that are accessible to [bot users](https://api.slack.com/bot-users). SlackKit also supports Slack’s [OAuth 2.0](https://api.slack.com/docs/oauth) flow including the [Add to Slack](https://api.slack.com/docs/slack-button) and [Sign in with Slack](https://api.slack.com/docs/sign-in-with-slack) buttons, [incoming webhooks](https://api.slack.com/incoming-webhooks), [slash commands](https://api.slack.com/slash-commands), and [message buttons](https://api.slack.com/docs/message-buttons).
|
||||
|
||||
### Installation
|
||||
|
||||
#### Swift Package Manager
|
||||
|
||||
Add `SlackKit` to your `Package.swift`
|
||||
|
||||
```swift
|
||||
import PackageDescription
|
||||
|
||||
```swift
|
||||
let package = Package(
|
||||
dependencies: [
|
||||
.package(url: "https://github.com/SlackKit/SlackKit.git", .upToNextMinor(from: "4.1.0"))
|
||||
.package(url: "https://github.com/pvzig/SlackKit.git", .upToNextMinor(from: "4.2.0"))
|
||||
]
|
||||
)
|
||||
```
|
||||
|
||||
#### Carthage
|
||||
**When built using Swift Package Manager, SlackKit includes the [vapor websocket framework](https://github.com/vapor/websocket) by default which requires libressl.**
|
||||
|
||||
Add `SlackKit` to your `Cartfile`:
|
||||
You can install it with [homebrew](https://brew.sh): `brew install libressl`
|
||||
|
||||
For additional details, see the [SKRTMAPI readme](https://github.com/pvzig/SlackKit/tree/master/SKRTMAPI#swift-package-manager).
|
||||
</details>
|
||||
<details>
|
||||
<summary><strong>Carthage</strong></summary>
|
||||
Add SlackKit to your <code>Cartfile</code>:
|
||||
|
||||
```
|
||||
github "SlackKit/SlackKit"
|
||||
github "pvzig/SlackKit"
|
||||
```
|
||||
|
||||
#### CocoaPods
|
||||
Add `SlackKit` to your `Podfile`:
|
||||
</details>
|
||||
<details>
|
||||
<summary><strong>CocoaPods</strong></summary>
|
||||
Add SlackKit to your <code>Podfile</code>:
|
||||
|
||||
```
|
||||
pod 'SlackKit'
|
||||
```
|
||||
</details>
|
||||
|
||||
### Usage
|
||||
To use the library in your project import it:
|
||||
|
||||
#### Carthage & SPM
|
||||
|
||||
```swift
|
||||
import SKWebAPI
|
||||
```
|
||||
|
||||
#### CocoaPods
|
||||
|
||||
```swift
|
||||
import SlackKit
|
||||
```
|
||||
|
||||
#### The Basics
|
||||
Create a bot user with an API token:
|
||||
|
||||
@@ -124,84 +129,3 @@ Slack has [many different oauth scopes](https://api.slack.com/docs/oauth-scopes)
|
||||
If you authenticate using OAuth and the Add to Slack or Sign in with Slack buttons this is handled for you.
|
||||
|
||||
For local development of things like OAuth, slash commands, and message buttons, you may want to use a tool like [ngrok](https://ngrok.com).
|
||||
|
||||
#### Web API Methods
|
||||
SlackKit currently supports the a subset of the Slack Web APIs that are available to bot users:
|
||||
|
||||
| Web APIs |
|
||||
| ------------- |
|
||||
| `api.test`|
|
||||
| `api.revoke`|
|
||||
| `auth.test`|
|
||||
| `channels.history`|
|
||||
| `channels.info`|
|
||||
| `channels.list`|
|
||||
| `channels.mark`|
|
||||
| `channels.setPurpose`|
|
||||
| `channels.setTopic`|
|
||||
| `chat.delete`|
|
||||
| `chat.meMessage`|
|
||||
| `chat.postMessage`|
|
||||
| `chat.update`|
|
||||
| `emoji.list`|
|
||||
| `files.comments.add`|
|
||||
| `files.comments.edit`|
|
||||
| `files.comments.delete`|
|
||||
| `files.delete`|
|
||||
| `files.info`|
|
||||
| `files.upload`|
|
||||
| `groups.close`|
|
||||
| `groups.history`|
|
||||
| `groups.info`|
|
||||
| `groups.list`|
|
||||
| `groups.mark`|
|
||||
| `groups.open`|
|
||||
| `groups.setPurpose`|
|
||||
| `groups.setTopic`|
|
||||
| `im.close`|
|
||||
| `im.history`|
|
||||
| `im.list`|
|
||||
| `im.mark`|
|
||||
| `im.open`|
|
||||
| `mpim.close`|
|
||||
| `mpim.history`|
|
||||
| `mpim.list`|
|
||||
| `mpim.mark`|
|
||||
| `mpim.open`|
|
||||
| `oauth.access`|
|
||||
| `pins.add`|
|
||||
| `pins.list`|
|
||||
| `pins.remove`|
|
||||
| `reactions.add`|
|
||||
| `reactions.get`|
|
||||
| `reactions.list`|
|
||||
| `reactions.remove`|
|
||||
| `rtm.start`|
|
||||
| `stars.add`|
|
||||
| `stars.remove`|
|
||||
| `team.info`|
|
||||
| `users.getPresence`|
|
||||
| `users.info`|
|
||||
| `users.list`|
|
||||
| `users.setActive`|
|
||||
| `users.setPresence`|
|
||||
|
||||
Don’t need the whole banana? Want more control over the low-level implementation details? Use the extensible modules SlackKit is built on:
|
||||
|
||||
| Module | Slack Service |
|
||||
| ------------- |------------- |
|
||||
| **[SKClient](https://github.com/SlackKit/SKClient)** | Write your own client implementation|
|
||||
| **[SKRTMAPI](https://github.com/SlackKit/SKRTMAPI)** | Connect to the Slack RTM API|
|
||||
| **[SKServer](https://github.com/SlackKit/SKServer)** | Spin up a server|
|
||||
| **[SKWebAPI](https://github.com/SlackKit/SKWebAPI)** | Access the Slack Web API|
|
||||
|
||||
### Examples
|
||||
You can find the source code for several example applications [here](https://github.com/SlackKit/Examples).
|
||||
|
||||
### Tutorials
|
||||
- [Build a Slack Bot and Deploy to Heroku](https://medium.com/@pvzig/building-slack-bots-in-swift-b99e243e444c)
|
||||
|
||||
### Get In Touch
|
||||
Twitter: [@pvzig](https://twitter.com/pvzig)
|
||||
|
||||
Email: <peter@launchsoft.co>
|
||||
|
||||
@@ -22,11 +22,13 @@
|
||||
// THE SOFTWARE.
|
||||
|
||||
import Foundation
|
||||
#if !COCOAPODS
|
||||
@_exported import SKClient
|
||||
@_exported import SKCore
|
||||
@_exported import SKRTMAPI
|
||||
@_exported import SKServer
|
||||
@_exported import SKWebAPI
|
||||
#endif
|
||||
|
||||
public final class SlackKit: RTMAdapter {
|
||||
|
||||
|
||||
Executable
+53
@@ -0,0 +1,53 @@
|
||||
{
|
||||
"ok": true,
|
||||
"channel": {
|
||||
"id": "C1H9RESGL",
|
||||
"name": "busting",
|
||||
"is_channel": true,
|
||||
"created": 1466025154,
|
||||
"creator": "U0G9QF9C6",
|
||||
"is_archived": false,
|
||||
"is_general": false,
|
||||
"name_normalized": "busting",
|
||||
"is_shared": false,
|
||||
"is_org_shared": false,
|
||||
"is_member": true,
|
||||
"is_private": false,
|
||||
"is_mpim": false,
|
||||
"last_read": "1503435939.000101",
|
||||
"latest": {
|
||||
"text": "Containment unit is 98% full",
|
||||
"username": "ecto1138",
|
||||
"bot_id": "B19LU7CSY",
|
||||
"attachments": [
|
||||
{
|
||||
"text": "Don't get too attached",
|
||||
"id": 1,
|
||||
"fallback": "This is an attachment fallback"
|
||||
}
|
||||
],
|
||||
"type": "message",
|
||||
"subtype": "bot_message",
|
||||
"ts": "1503435956.000247"
|
||||
},
|
||||
"unread_count": 1,
|
||||
"unread_count_display": 1,
|
||||
"members": [
|
||||
"U0G9QF9C6",
|
||||
"U1QNSQB9U"
|
||||
],
|
||||
"topic": {
|
||||
"value": "Spiritual containment strategies",
|
||||
"creator": "U0G9QF9C6",
|
||||
"last_set": 1503435128
|
||||
},
|
||||
"purpose": {
|
||||
"value": "Discuss busting ghosts",
|
||||
"creator": "U0G9QF9C6",
|
||||
"last_set": 1503435128
|
||||
},
|
||||
"previous_names": [
|
||||
"dusting"
|
||||
]
|
||||
}
|
||||
}
|
||||
Executable
+39
@@ -0,0 +1,39 @@
|
||||
{
|
||||
"ok": true,
|
||||
"channel": {
|
||||
"id": "C012AB3CD",
|
||||
"name": "general",
|
||||
"is_channel": true,
|
||||
"is_group": false,
|
||||
"is_im": false,
|
||||
"created": 1449252889,
|
||||
"creator": "W012A3BCD",
|
||||
"is_archived": false,
|
||||
"is_general": true,
|
||||
"unlinked": 0,
|
||||
"name_normalized": "general",
|
||||
"is_read_only": false,
|
||||
"is_shared": false,
|
||||
"is_ext_shared": false,
|
||||
"is_org_shared": false,
|
||||
"pending_shared": [],
|
||||
"is_pending_ext_shared": false,
|
||||
"is_member": true,
|
||||
"is_private": false,
|
||||
"is_mpim": false,
|
||||
"last_read": "1502126650.228446",
|
||||
"topic": {
|
||||
"value": "For public discussion of generalities",
|
||||
"creator": "W012A3BCD",
|
||||
"last_set": 1449709364
|
||||
},
|
||||
"purpose": {
|
||||
"value": "This part of the workspace is for fun. Make fun here.",
|
||||
"creator": "W012A3BCD",
|
||||
"last_set": 1449709364
|
||||
},
|
||||
"previous_names": [ "specifics", "abstractions", "etc" ],
|
||||
"num_members": 23,
|
||||
"locale": "en-US"
|
||||
}
|
||||
}
|
||||
Executable
+461
@@ -0,0 +1,461 @@
|
||||
{
|
||||
"bot_added": {
|
||||
"type": "bot_added",
|
||||
"bot": {
|
||||
"id": "B0EV3JE8Z",
|
||||
"deleted": false,
|
||||
"name": "bot",
|
||||
"icons": {
|
||||
"image_48": "https://slack.global.ssl.fastly.net/12b5a/plugins/bot/assets/service_48.png"
|
||||
}
|
||||
},
|
||||
"cache_ts": 1448003197
|
||||
},
|
||||
"bot_changed": {
|
||||
"type": "bot_added",
|
||||
"bot": {
|
||||
"id": "B0EV3JE8Z",
|
||||
"deleted": false,
|
||||
"name": "changed-bot",
|
||||
"icons": {
|
||||
"image_48": "https://slack.global.ssl.fastly.net/12b5a/plugins/bot/assets/service_48.png"
|
||||
}
|
||||
},
|
||||
"cache_ts": 1448003197
|
||||
},
|
||||
"channel_archive": {
|
||||
"type": "channel_archive",
|
||||
"channel": "C0CJ25PDM",
|
||||
"user": "U0CJ5PC7L"
|
||||
},
|
||||
"channel_created": {
|
||||
"type": "channel_created",
|
||||
"channel": {
|
||||
"id": "C0F3Q8LH5",
|
||||
"is_channel": true,
|
||||
"name": "test-channel",
|
||||
"created": 1448262090,
|
||||
"creator": "U0CJ5PC7L"
|
||||
},
|
||||
"event_ts": "1448262090.810507"
|
||||
},
|
||||
"channel_deleted": {
|
||||
"type": "channel_deleted",
|
||||
"channel": "C0CJ25PDM"
|
||||
},
|
||||
"channel_joined": {
|
||||
"type": "channel_joined",
|
||||
"channel": {
|
||||
"id": "C0CJ25PDM",
|
||||
"name": "test",
|
||||
"is_channel": true,
|
||||
"created": 1444959237,
|
||||
"creator": "U0CJ5PC7L",
|
||||
"is_archived": false,
|
||||
"is_general": false,
|
||||
"is_member": true,
|
||||
"last_read": "0000000000.000000",
|
||||
"latest": {
|
||||
"user": "U0F3LFX6K",
|
||||
"type": "message",
|
||||
"subtype": "channel_join",
|
||||
"text": "<@U0F3LFX6K|carol> has joined the channel",
|
||||
"ts": "1448262357.000002"
|
||||
},
|
||||
"unread_count": 0,
|
||||
"unread_count_display": 0,
|
||||
"members": [
|
||||
"U0CJ5PC7L",
|
||||
"U0F3LFX6K"
|
||||
],
|
||||
"topic": {
|
||||
"value": "",
|
||||
"creator": "",
|
||||
"last_set": 0
|
||||
},
|
||||
"purpose": {
|
||||
"value": "",
|
||||
"creator": "",
|
||||
"last_set": 0
|
||||
}
|
||||
}
|
||||
},
|
||||
"channel_left": {
|
||||
"type": "channel_left",
|
||||
"channel": "C0CJ25PDM"
|
||||
},
|
||||
"channel_marked": {
|
||||
"type": "channel_marked",
|
||||
"channel": "C0CJ25PDM",
|
||||
"ts": "1448253718.000002",
|
||||
"unread_count": 0,
|
||||
"unread_count_display": 0,
|
||||
"num_mentions": 0,
|
||||
"num_mentions_display": 0,
|
||||
"mention_count": 0,
|
||||
"mention_count_display": 0
|
||||
},
|
||||
"channel_rename": {
|
||||
"type": "channel_rename",
|
||||
"channel": {
|
||||
"id": "C0CJ25PDM",
|
||||
"is_channel": true,
|
||||
"name": "test-channel-rename",
|
||||
"created": "1448262090"
|
||||
},
|
||||
"event_ts": "1448262186.810954"
|
||||
},
|
||||
"channel_unarchive": {
|
||||
"type": "channel_unarchive",
|
||||
"channel": "C0CJ25PDM",
|
||||
"user": "U0CJ5PC7L"
|
||||
},
|
||||
"group_archive": {
|
||||
"type": "group_archive",
|
||||
"channel": "G0CHZSXFW",
|
||||
"ts": "1448327143.000002"
|
||||
},
|
||||
"group_close": {
|
||||
"type": "group_close",
|
||||
"user": "U0CJ5PC7L",
|
||||
"channel": "G0CHZSXFW"
|
||||
},
|
||||
"group_joined": {
|
||||
"type": "group_joined",
|
||||
"channel": {
|
||||
"id": "G0CHZSXFW",
|
||||
"name": "private",
|
||||
"is_group": true,
|
||||
"created": 1444959855,
|
||||
"creator": "U0CJ5PC7L",
|
||||
"is_archived": false,
|
||||
"is_mpim": false,
|
||||
"is_open": true,
|
||||
"last_read": "1448328439.000011",
|
||||
"latest": {
|
||||
"user": "U0CJ5PC7L",
|
||||
"type": "message",
|
||||
"text": "I'm Alice! Yay!",
|
||||
"ts": "1448328439.000011"
|
||||
},
|
||||
"unread_count": 0,
|
||||
"unread_count_display": 0,
|
||||
"members": [
|
||||
"U0CJ5PC7L",
|
||||
"U0F3LFX6K"
|
||||
],
|
||||
"topic": {
|
||||
"value": "",
|
||||
"creator": "",
|
||||
"last_set": 0
|
||||
},
|
||||
"purpose": {
|
||||
"value": "",
|
||||
"creator": "",
|
||||
"last_set": 0
|
||||
}
|
||||
}
|
||||
},
|
||||
"group_left": {
|
||||
"type": "group_left",
|
||||
"channel": "G0CHZSXFW"
|
||||
},
|
||||
"group_marked": {
|
||||
"channel": "G0CHZSXFW",
|
||||
"ts": "1448327532.000006",
|
||||
"unread_count": 0,
|
||||
"unread_count_display": 0,
|
||||
"num_mentions": 0,
|
||||
"num_mentions_display": 0,
|
||||
"mention_count": 0,
|
||||
"mention_count_display": 0,
|
||||
"type": "group_marked",
|
||||
"is_mpim": false
|
||||
},
|
||||
"group_rename": {
|
||||
"type": "group_rename",
|
||||
"channel": {
|
||||
"id": "G0CHZSXFW",
|
||||
"name": "test-group-rename",
|
||||
"is_group": true,
|
||||
"created": 1444959855
|
||||
},
|
||||
"ts": "1448327708.000007"
|
||||
},
|
||||
"group_unarchive": {
|
||||
"type": "group_unarchive",
|
||||
"channel": "G0CHZSXFW",
|
||||
"ts": "1448327151.000004"
|
||||
},
|
||||
"im_close": {
|
||||
"type": "im_close",
|
||||
"user": "USLACKBOT",
|
||||
"channel": "D0CJ1P4JJ"
|
||||
},
|
||||
"im_created": {
|
||||
"type": "im_created",
|
||||
"user": "U0F3LFX6K",
|
||||
"channel": {
|
||||
"id": "D0F3HHAQ3",
|
||||
"is_im": true,
|
||||
"user": "U0F3LFX6K",
|
||||
"created": 1448254082,
|
||||
"last_read": "0000000000.000000",
|
||||
"latest": null,
|
||||
"unread_count": 0,
|
||||
"unread_count_display": 0,
|
||||
"is_open": false
|
||||
}
|
||||
},
|
||||
"im_marked": {
|
||||
"type": "im_marked",
|
||||
"channel": "D0CHZQWNP",
|
||||
"ts": "1448253718.000002",
|
||||
"dm_count": 0,
|
||||
"unread_count_display": 0,
|
||||
"num_mentions_display": 0,
|
||||
"mention_count_display": 0
|
||||
},
|
||||
"im_open": {
|
||||
"type": "im_open",
|
||||
"user": "USLACKBOT",
|
||||
"channel": "D0CJ1P4JJ"
|
||||
},
|
||||
"manual_presence_change": {
|
||||
"type": "manual_presence_change",
|
||||
"presence": "away",
|
||||
"event_ts": "1448323107.373650"
|
||||
},
|
||||
"message::channel_archive": {
|
||||
"user": "U0F3LFX6K",
|
||||
"members": [
|
||||
"U0CJ5PC7L",
|
||||
"U0F3LFX6K"
|
||||
],
|
||||
"type": "message",
|
||||
"subtype": "channel_archive",
|
||||
"text": "<@U0F3LFX6K|carol> archived the channel (w/ 2 members)",
|
||||
"channel": "C0CJ25PDM",
|
||||
"ts": "1448491518.000007"
|
||||
},
|
||||
"message::channel_join": {
|
||||
"user": "U0F3LFX6K",
|
||||
"inviter": "U0CJ5PC7L",
|
||||
"type": "message",
|
||||
"subtype": "channel_join",
|
||||
"text": "<@U0F3LFX6K|carol> has joined the channel",
|
||||
"channel": "C0CJ25PDM",
|
||||
"ts": "1448413360.000002"
|
||||
},
|
||||
"message::channel_leave": {
|
||||
"user": "U0F3LFX6K",
|
||||
"type": "message",
|
||||
"subtype": "channel_leave",
|
||||
"text": "<@U0F3LFX6K|carol> has left the channel",
|
||||
"channel": "C0CJ25PDM",
|
||||
"ts": "1448413366.000003"
|
||||
},
|
||||
"message::channel_name": {
|
||||
"user": "U0F3LFX6K",
|
||||
"old_name": "test",
|
||||
"name": "test-channel-rename",
|
||||
"type": "message",
|
||||
"subtype": "channel_name",
|
||||
"text": "<@U0F3LFX6K|carol> has renamed the channel from \"test\" to \"test-channel-rename\"",
|
||||
"channel": "C0CJ25PDM",
|
||||
"ts": "1449034681.000004"
|
||||
},
|
||||
"message::group_archive": {
|
||||
"user": "U0F3LFX6K",
|
||||
"type": "message",
|
||||
"subtype": "group_archive",
|
||||
"text": "<@U0F3LFX6K|carol> archived the private channel",
|
||||
"channel": "G0CHZSXFW",
|
||||
"ts": "1448490710.000005"
|
||||
},
|
||||
"message::group_join": {
|
||||
"user": "U0F3LFX6K",
|
||||
"inviter": "U0CJ5PC7L",
|
||||
"type": "message",
|
||||
"subtype": "group_join",
|
||||
"text": "<@U0F3LFX6K|carol> has joined the group",
|
||||
"channel": "G0CHZSXFW",
|
||||
"ts": "1448486574.000003"
|
||||
},
|
||||
"message::group_leave": {
|
||||
"user": "U0F3LFX6K",
|
||||
"type": "message",
|
||||
"subtype": "group_leave",
|
||||
"text": "<@U0F3LFX6K|carol> has left the group",
|
||||
"channel": "G0CHZSXFW",
|
||||
"ts": "1448486522.000002"
|
||||
},
|
||||
"message::group_name": {
|
||||
"user": "U0CJ5PC7L",
|
||||
"old_name": "private",
|
||||
"name": "private-rename",
|
||||
"type": "message",
|
||||
"subtype": "group_name",
|
||||
"text": "<@U0CJ5PC7L|alice> has renamed the group from \"private\" to \"private-rename\"",
|
||||
"channel": "G0CHZSXFW",
|
||||
"ts": "1449034974.000003"
|
||||
},
|
||||
"message::group_unarchive": {
|
||||
"user": "U0F3LFX6K",
|
||||
"type": "message",
|
||||
"subtype": "group_unarchive",
|
||||
"text": "<@U0F3LFX6K|carol> un-archived the private channel",
|
||||
"channel": "G0CHZSXFW",
|
||||
"ts": "1448490716.000007"
|
||||
},
|
||||
"message::message_changed": {
|
||||
"type": "message",
|
||||
"message": {
|
||||
"type": "message",
|
||||
"user": "U0F3LFX6K",
|
||||
"text": "Hi carol! :simple_smile:",
|
||||
"edited": {
|
||||
"user": "U0F3LFX6K",
|
||||
"ts": "1448496795.000000"
|
||||
},
|
||||
"ts": "1448496754.000002"
|
||||
},
|
||||
"subtype": "message_changed",
|
||||
"hidden": true,
|
||||
"channel": "C0CJ25PDM",
|
||||
"event_ts": "1448496795.861984",
|
||||
"ts": "1448496795.000005"
|
||||
},
|
||||
"message::message_deleted": {
|
||||
"type": "message",
|
||||
"deleted_ts": "1448496776.000003",
|
||||
"subtype": "message_deleted",
|
||||
"hidden": true,
|
||||
"channel": "C0CJ25PDM",
|
||||
"event_ts": "1448496783.861926",
|
||||
"ts": "1448496783.000004"
|
||||
},
|
||||
"pref_change": {
|
||||
"type": "pref_change",
|
||||
"name": "display_real_names_override",
|
||||
"value": 1
|
||||
},
|
||||
"presence_change": {
|
||||
"type": "presence_change",
|
||||
"user": "U0CJ5PC7L",
|
||||
"presence": "away"
|
||||
},
|
||||
"reaction_added": {
|
||||
"type": "reaction_added",
|
||||
"user": "U0CJ5PC7L",
|
||||
"item": {
|
||||
"type": "message",
|
||||
"channel": "C0CHZA86Q",
|
||||
"ts": "1444959632.000002"
|
||||
},
|
||||
"reaction": "+1",
|
||||
"event_ts": "1450340664.394875"
|
||||
},
|
||||
"reaction_removed": {
|
||||
"type": "reaction_removed",
|
||||
"user": "U0CJ5PC7L",
|
||||
"item": {
|
||||
"type": "message",
|
||||
"channel": "C0CHZA86Q",
|
||||
"ts": "1444959632.000002"
|
||||
},
|
||||
"reaction": "+1",
|
||||
"event_ts": "1450340723.395241"
|
||||
},
|
||||
"team_domain_change": {
|
||||
"type": "team_domain_change",
|
||||
"url": "https://sslack-api-test.slack.com",
|
||||
"domain": "sslack-api-test",
|
||||
"event_ts": "1448005008.450131"
|
||||
},
|
||||
"team_join": {
|
||||
"type": "team_join",
|
||||
"user": {
|
||||
"id": "U0EV582MU",
|
||||
"team_id": "T0CHZBU59",
|
||||
"name": "eve",
|
||||
"deleted": false,
|
||||
"status": null,
|
||||
"color": "674b1b",
|
||||
"real_name": "eve",
|
||||
"tz": "America/Los_Angeles",
|
||||
"tz_label": "Pacific Standard Time",
|
||||
"tz_offset": -28800,
|
||||
"profile": {
|
||||
"first_name": "eve",
|
||||
"real_name": "eve",
|
||||
"real_name_normalized": "eve",
|
||||
"email": "leah+slack-api-test+eve@slack-corp.com",
|
||||
"image_24": "https://secure.gravatar.com/avatar/11eb4e78a6b5e83a6434e831df883179.jpg?s=24&d=https%3A%2F%2Fslack.global.ssl.fastly.net%2F66f9%2Fimg%2Favatars%2Fava_0017-24.png",
|
||||
"image_32": "https://secure.gravatar.com/avatar/11eb4e78a6b5e83a6434e831df883179.jpg?s=32&d=https%3A%2F%2Fslack.global.ssl.fastly.net%2F66f9%2Fimg%2Favatars%2Fava_0017-32.png",
|
||||
"image_48": "https://secure.gravatar.com/avatar/11eb4e78a6b5e83a6434e831df883179.jpg?s=48&d=https%3A%2F%2Fslack.global.ssl.fastly.net%2F66f9%2Fimg%2Favatars%2Fava_0017-48.png",
|
||||
"image_72": "https://secure.gravatar.com/avatar/11eb4e78a6b5e83a6434e831df883179.jpg?s=72&d=https%3A%2F%2Fslack.global.ssl.fastly.net%2F66f9%2Fimg%2Favatars%2Fava_0017-72.png",
|
||||
"image_192": "https://secure.gravatar.com/avatar/11eb4e78a6b5e83a6434e831df883179.jpg?s=192&d=https%3A%2F%2Fslack.global.ssl.fastly.net%2F7fa9%2Fimg%2Favatars%2Fava_0017-192.png",
|
||||
"image_512": "https://secure.gravatar.com/avatar/11eb4e78a6b5e83a6434e831df883179.jpg?s=512&d=https%3A%2F%2Fslack.global.ssl.fastly.net%2F7fa9%2Fimg%2Favatars%2Fava_0017-512.png",
|
||||
"fields": null
|
||||
},
|
||||
"is_admin": false,
|
||||
"is_owner": false,
|
||||
"is_primary_owner": false,
|
||||
"is_restricted": false,
|
||||
"is_ultra_restricted": false,
|
||||
"is_bot": false,
|
||||
"presence": "away"
|
||||
},
|
||||
"cache_ts": 1448005248
|
||||
},
|
||||
"team_pref_change": {
|
||||
"type": "team_pref_change",
|
||||
"name": "require_at_for_mention",
|
||||
"value": true
|
||||
},
|
||||
"team_rename": {
|
||||
"type": "team_rename",
|
||||
"name": "slack-api-test-test",
|
||||
"event_ts": "1448004913.449540"
|
||||
},
|
||||
"user_change": {
|
||||
"type": "user_change",
|
||||
"user": {
|
||||
"id": "U0CJ1TWKX",
|
||||
"team_id": "T0CHZBU59",
|
||||
"name": "bob",
|
||||
"deleted": false,
|
||||
"status": null,
|
||||
"color": "4bbe2e",
|
||||
"real_name": "bob",
|
||||
"tz": "America/Los_Angeles",
|
||||
"tz_label": "Pacific Standard Time",
|
||||
"tz_offset": -28800,
|
||||
"profile": {
|
||||
"first_name": "bob",
|
||||
"real_name": "bob",
|
||||
"real_name_normalized": "bob",
|
||||
"email": "leah+slack-api-test-user-change-test@slack-corp.com",
|
||||
"image_24": "https://secure.gravatar.com/avatar/7c36ad3a7192f01d72cb3b189143eb4c.jpg?s=24&d=https%3A%2F%2Fslack.global.ssl.fastly.net%2F66f9%2Fimg%2Favatars%2Fava_0005-24.png",
|
||||
"image_32": "https://secure.gravatar.com/avatar/7c36ad3a7192f01d72cb3b189143eb4c.jpg?s=32&d=https%3A%2F%2Fslack.global.ssl.fastly.net%2F66f9%2Fimg%2Favatars%2Fava_0005-32.png",
|
||||
"image_48": "https://secure.gravatar.com/avatar/7c36ad3a7192f01d72cb3b189143eb4c.jpg?s=48&d=https%3A%2F%2Fslack.global.ssl.fastly.net%2F66f9%2Fimg%2Favatars%2Fava_0005-48.png",
|
||||
"image_72": "https://secure.gravatar.com/avatar/7c36ad3a7192f01d72cb3b189143eb4c.jpg?s=72&d=https%3A%2F%2Fslack.global.ssl.fastly.net%2F66f9%2Fimg%2Favatars%2Fava_0005-72.png",
|
||||
"image_192": "https://secure.gravatar.com/avatar/7c36ad3a7192f01d72cb3b189143eb4c.jpg?s=192&d=https%3A%2F%2Fslack.global.ssl.fastly.net%2F7fa9%2Fimg%2Favatars%2Fava_0005-192.png",
|
||||
"image_512": "https://secure.gravatar.com/avatar/7c36ad3a7192f01d72cb3b189143eb4c.jpg?s=512&d=https%3A%2F%2Fslack.global.ssl.fastly.net%2F7fa9%2Fimg%2Favatars%2Fava_0005-512.png",
|
||||
"fields": null
|
||||
},
|
||||
"is_admin": false,
|
||||
"is_owner": false,
|
||||
"is_primary_owner": false,
|
||||
"is_restricted": false,
|
||||
"is_ultra_restricted": false,
|
||||
"is_bot": false
|
||||
}
|
||||
},
|
||||
"user_typing": {
|
||||
"type": "user_typing",
|
||||
"channel": "C0CHZA86Q",
|
||||
"user": "U0CJ1TWKX"
|
||||
}
|
||||
}
|
||||
Executable
+59
@@ -0,0 +1,59 @@
|
||||
{
|
||||
"id" : "F2147483862",
|
||||
"created" : 1356032811,
|
||||
"timestamp" : 1356032811,
|
||||
"name" : "file.htm",
|
||||
"title" : "My HTML file",
|
||||
"mimetype" : "text\/plain",
|
||||
"filetype" : "text",
|
||||
"pretty_type": "Text",
|
||||
"user" : "U2147483697",
|
||||
"mode" : "hosted",
|
||||
"editable" : true,
|
||||
"is_external": false,
|
||||
"external_type": "",
|
||||
"username": "",
|
||||
"size" : 12345,
|
||||
"url_private": "https:\/\/slack.com\/files-pri\/T024BE7LD-F024BERPE\/1.png",
|
||||
"url_private_download": "https:\/\/slack.com\/files-pri\/T024BE7LD-F024BERPE\/download\/1.png",
|
||||
"thumb_64": "https:\/\/slack-files.com\/files-tmb\/T024BE7LD-F024BERPE-c66246\/1_64.png",
|
||||
"thumb_80": "https:\/\/slack-files.com\/files-tmb\/T024BE7LD-F024BERPE-c66246\/1_80.png",
|
||||
"thumb_360": "https:\/\/slack-files.com\/files-tmb\/T024BE7LD-F024BERPE-c66246\/1_360.png",
|
||||
"thumb_360_gif": "https:\/\/slack-files.com\/files-tmb\/T024BE7LD-F024BERPE-c66246\/1_360.gif",
|
||||
"thumb_360_w": 100,
|
||||
"thumb_360_h": 100,
|
||||
"thumb_480": "https:\/\/slack-files.com\/files-tmb\/T024BE7LD-F024BERPE-c66246\/1_480.png",
|
||||
"thumb_480_w": 480,
|
||||
"thumb_480_h": 480,
|
||||
"thumb_160": "https:\/\/slack-files.com\/files-tmb\/T024BE7LD-F024BERPE-c66246\/1_160.png",
|
||||
"permalink": "https:\/\/tinyspeck.slack.com\/files\/cal\/F024BERPE\/1.png",
|
||||
"permalink_public" : "https:\/\/tinyspeck.slack.com\/T024BE7LD-F024BERPE-3f9216b62c",
|
||||
"edit_link": "https:\/\/tinyspeck.slack.com\/files\/cal\/F024BERPE\/1.png/edit",
|
||||
"preview": "<!DOCTYPE html>\n<html>\n<meta charset='utf-8'>",
|
||||
"preview_highlight": "<div class=\"sssh-code\"><div class=\"sssh-line\"><pre><!DOCTYPE html...",
|
||||
"lines": 123,
|
||||
"lines_more": 118,
|
||||
"is_public": true,
|
||||
"public_url_shared": false,
|
||||
"display_as_bot" : false,
|
||||
"channels": ["C024BE7LT"],
|
||||
"groups": ["G12345"],
|
||||
"ims": ["D12345"],
|
||||
"initial_comment": {},
|
||||
"num_stars": 7,
|
||||
"is_starred": true,
|
||||
"pinned_to": ["C024BE7LT"],
|
||||
"reactions": [
|
||||
{
|
||||
"name": "astonished",
|
||||
"count": 3,
|
||||
"users": [ "U1", "U2", "U3" ]
|
||||
},
|
||||
{
|
||||
"name": "facepalm",
|
||||
"count": 1034,
|
||||
"users": [ "U1", "U2", "U3", "U4", "U5" ]
|
||||
}
|
||||
],
|
||||
"comments_count": 1
|
||||
}
|
||||
Executable
+27
@@ -0,0 +1,27 @@
|
||||
{
|
||||
"id": "G024BE91L",
|
||||
"name": "secretplans",
|
||||
"is_group": "true",
|
||||
"created": 1360782804,
|
||||
"creator": "U024BE7LH",
|
||||
"is_archived": false,
|
||||
"is_mpim": false,
|
||||
"members": [
|
||||
"U024BE7LH"
|
||||
],
|
||||
"topic": {
|
||||
"value": "Secret plans on hold",
|
||||
"creator": "U024BE7LV",
|
||||
"last_set": 1369677212
|
||||
},
|
||||
"purpose": {
|
||||
"value": "Discuss secret plans that no-one else should know",
|
||||
"creator": "U024BE7LH",
|
||||
"last_set": 1360782804
|
||||
},
|
||||
|
||||
"last_read": "1401383885.000061",
|
||||
"latest": {},
|
||||
"unread_count": 0,
|
||||
"unread_count_display": 0
|
||||
}
|
||||
Executable
+7
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"id": "D024BFF1M",
|
||||
"is_im": true,
|
||||
"user": "U024BE7LH",
|
||||
"created": 1360782804,
|
||||
"is_user_deleted": false
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
{
|
||||
"type": "member_joined_channel",
|
||||
"user": "U0CJ1TWKX",
|
||||
"channel": "C0CHZA86Q",
|
||||
"channel_type": "C",
|
||||
"team": "T0CHZBU59",
|
||||
"inviter": "U123456789"
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"type": "member_left_channel",
|
||||
"user": "U0CJ5PC7L",
|
||||
"channel": "C0CJ25PDM",
|
||||
"channel_type": "C",
|
||||
"team": "T0CHZBU59"
|
||||
}
|
||||
Executable
+15
@@ -0,0 +1,15 @@
|
||||
{
|
||||
"id": "G024BE91L",
|
||||
"name": "mpdm-user1--user2--user3-1",
|
||||
"is_mpim": true,
|
||||
"is_group": false,
|
||||
"created": 1360782804,
|
||||
"creator": "U024BE7LH",
|
||||
"members": [
|
||||
"U024BE7LH"
|
||||
],
|
||||
"last_read": "1401383885.000061",
|
||||
"latest": { },
|
||||
"unread_count": 0,
|
||||
"unread_count_display": 0
|
||||
}
|
||||
Executable
+13
@@ -0,0 +1,13 @@
|
||||
{
|
||||
"ok": true,
|
||||
"url": "ws://localhost:5225",
|
||||
"team": {
|
||||
"id": "T02QYTVLG",
|
||||
"name": "SF UTES",
|
||||
"domain": "sfutes"
|
||||
},
|
||||
"self": {
|
||||
"id": "U02QYTVLJ",
|
||||
"name": "hess"
|
||||
}
|
||||
}
|
||||
Executable
+604
@@ -0,0 +1,604 @@
|
||||
{
|
||||
"ok": true,
|
||||
"self": {
|
||||
"id": "U0CJ5PC7L",
|
||||
"name": "alice",
|
||||
"prefs": {
|
||||
"highlight_words": "",
|
||||
"user_colors": "",
|
||||
"color_names_in_list": true,
|
||||
"growls_enabled": true,
|
||||
"tz": "America\/Los_Angeles",
|
||||
"push_dm_alert": true,
|
||||
"push_mention_alert": true,
|
||||
"push_everything": true,
|
||||
"push_idle_wait": 2,
|
||||
"push_sound": "b2.mp3",
|
||||
"push_loud_channels": "",
|
||||
"push_mention_channels": "",
|
||||
"push_loud_channels_set": "",
|
||||
"email_alerts": "instant",
|
||||
"email_alerts_sleep_until": 0,
|
||||
"email_misc": true,
|
||||
"email_weekly": true,
|
||||
"welcome_message_hidden": false,
|
||||
"all_channels_loud": true,
|
||||
"loud_channels": "",
|
||||
"never_channels": "",
|
||||
"loud_channels_set": "",
|
||||
"show_member_presence": true,
|
||||
"search_sort": "timestamp",
|
||||
"expand_inline_imgs": true,
|
||||
"expand_internal_inline_imgs": true,
|
||||
"expand_snippets": false,
|
||||
"posts_formatting_guide": true,
|
||||
"seen_welcome_2": true,
|
||||
"seen_ssb_prompt": false,
|
||||
"seen_spaces_new_xp_tooltip": false,
|
||||
"spaces_new_xp_banner_dismissed": false,
|
||||
"search_only_my_channels": false,
|
||||
"emoji_mode": "default",
|
||||
"emoji_use": "{}",
|
||||
"has_invited": true,
|
||||
"has_uploaded": false,
|
||||
"has_created_channel": true,
|
||||
"search_exclude_channels": "",
|
||||
"messages_theme": "default",
|
||||
"webapp_spellcheck": true,
|
||||
"no_joined_overlays": false,
|
||||
"no_created_overlays": false,
|
||||
"dropbox_enabled": false,
|
||||
"seen_domain_invite_reminder": false,
|
||||
"seen_member_invite_reminder": false,
|
||||
"mute_sounds": false,
|
||||
"arrow_history": false,
|
||||
"tab_ui_return_selects": true,
|
||||
"obey_inline_img_limit": true,
|
||||
"new_msg_snd": "knock_brush.mp3",
|
||||
"collapsible": false,
|
||||
"collapsible_by_click": true,
|
||||
"require_at": false,
|
||||
"ssb_space_window": "",
|
||||
"mac_ssb_bounce": "",
|
||||
"mac_ssb_bullet": true,
|
||||
"expand_non_media_attachments": true,
|
||||
"show_typing": true,
|
||||
"pagekeys_handled": true,
|
||||
"last_snippet_type": "",
|
||||
"display_real_names_override": 0,
|
||||
"time24": false,
|
||||
"enter_is_special_in_tbt": false,
|
||||
"graphic_emoticons": false,
|
||||
"convert_emoticons": true,
|
||||
"autoplay_chat_sounds": true,
|
||||
"ss_emojis": true,
|
||||
"sidebar_behavior": "",
|
||||
"seen_onboarding_start": false,
|
||||
"onboarding_cancelled": false,
|
||||
"seen_onboarding_slackbot_conversation": false,
|
||||
"seen_onboarding_channels": false,
|
||||
"seen_onboarding_direct_messages": false,
|
||||
"seen_onboarding_invites": false,
|
||||
"seen_onboarding_search": false,
|
||||
"seen_onboarding_recent_mentions": false,
|
||||
"seen_onboarding_starred_items": false,
|
||||
"seen_onboarding_private_groups": false,
|
||||
"onboarding_slackbot_conversation_step": 0,
|
||||
"mark_msgs_read_immediately": true,
|
||||
"start_scroll_at_oldest": true,
|
||||
"snippet_editor_wrap_long_lines": false,
|
||||
"ls_disabled": false,
|
||||
"sidebar_theme": "default",
|
||||
"sidebar_theme_custom_values": "",
|
||||
"f_key_search": false,
|
||||
"k_key_omnibox": true,
|
||||
"speak_growls": false,
|
||||
"mac_speak_voice": "com.apple.speech.synthesis.voice.Alex",
|
||||
"mac_speak_speed": 250,
|
||||
"comma_key_prefs": false,
|
||||
"at_channel_suppressed_channels": "",
|
||||
"push_at_channel_suppressed_channels": "",
|
||||
"prompted_for_email_disabling": false,
|
||||
"full_text_extracts": false,
|
||||
"no_text_in_notifications": false,
|
||||
"muted_channels": "",
|
||||
"no_macssb1_banner": false,
|
||||
"no_winssb1_banner": false,
|
||||
"no_omnibox_in_channels": false,
|
||||
"k_key_omnibox_auto_hide_count": 0,
|
||||
"hide_user_group_info_pane": false,
|
||||
"mentions_exclude_at_user_groups": false,
|
||||
"privacy_policy_seen": true,
|
||||
"search_exclude_bots": false,
|
||||
"fuzzy_matching": false,
|
||||
"load_lato_2": false,
|
||||
"fuller_timestamps": false,
|
||||
"last_seen_at_channel_warning": 0,
|
||||
"flex_resize_window": false,
|
||||
"msg_preview": false,
|
||||
"msg_preview_displaces": true,
|
||||
"msg_preview_persistent": true,
|
||||
"emoji_autocomplete_big": false,
|
||||
"winssb_run_from_tray": true,
|
||||
"winssb_window_flash_behavior": "idle",
|
||||
"two_factor_auth_enabled": false,
|
||||
"two_factor_type": null,
|
||||
"two_factor_backup_type": null,
|
||||
"mentions_exclude_at_channels": true,
|
||||
"confirm_clear_all_unreads": true,
|
||||
"confirm_user_marked_away": true,
|
||||
"box_enabled": false,
|
||||
"seen_single_emoji_msg": false,
|
||||
"confirm_sh_call_start": true,
|
||||
"preferred_skin_tone": "",
|
||||
"show_all_skin_tones": false,
|
||||
"msg_select": "{ \"on\":false, \"single\":true, \"key\":true, \"links\":false, \"hover\":false }"
|
||||
},
|
||||
"created": 1444958977,
|
||||
"manual_presence": "active",
|
||||
"enterprise_user": {
|
||||
"id": "T0CHZBU59",
|
||||
"enterprise_id": "E12EF3W42",
|
||||
"enterprise_name": "bertorg",
|
||||
"is_admin": false,
|
||||
"is_owner": false,
|
||||
"teams": [
|
||||
"T0CHZBU59"
|
||||
]
|
||||
}
|
||||
},
|
||||
"team": {
|
||||
"id": "T0CHZBU59",
|
||||
"name": "slack-api-test",
|
||||
"email_domain": "",
|
||||
"domain": "slack-api-test",
|
||||
"msg_edit_window_mins": -1,
|
||||
"prefs": {
|
||||
"default_channels": [
|
||||
"C0CHZA86Q",
|
||||
"C0CJ5FF0R"
|
||||
],
|
||||
"msg_edit_window_mins": -1,
|
||||
"allow_message_deletion": true,
|
||||
"hide_referers": true,
|
||||
"display_real_names": false,
|
||||
"who_can_at_everyone": "regular",
|
||||
"who_can_at_channel": "ra",
|
||||
"warn_before_at_channel": "always",
|
||||
"who_can_create_channels": "regular",
|
||||
"who_can_archive_channels": "regular",
|
||||
"who_can_create_groups": "ra",
|
||||
"who_can_post_general": "ra",
|
||||
"who_can_kick_channels": "admin",
|
||||
"who_can_kick_groups": "regular",
|
||||
"who_can_create_delete_user_groups": "admin",
|
||||
"who_can_edit_user_groups": "admin",
|
||||
"retention_type": 0,
|
||||
"retention_duration": 0,
|
||||
"group_retention_type": 0,
|
||||
"group_retention_duration": 0,
|
||||
"dm_retention_type": 0,
|
||||
"dm_retention_duration": 0,
|
||||
"file_retention_type": 0,
|
||||
"file_retention_duration": 0,
|
||||
"require_at_for_mention": 0,
|
||||
"compliance_export_start": 0,
|
||||
"auth_mode": "normal",
|
||||
"who_can_manage_integrations": "regular"
|
||||
},
|
||||
"icon": {
|
||||
"image_34": "https:\/\/slack.global.ssl.fastly.net\/66f9\/img\/avatars-teams\/ava_0014-34.png",
|
||||
"image_44": "https:\/\/slack.global.ssl.fastly.net\/66f9\/img\/avatars-teams\/ava_0014-44.png",
|
||||
"image_68": "https:\/\/slack.global.ssl.fastly.net\/66f9\/img\/avatars-teams\/ava_0014-68.png",
|
||||
"image_88": "https:\/\/slack.global.ssl.fastly.net\/66f9\/img\/avatars-teams\/ava_0014-88.png",
|
||||
"image_102": "https:\/\/slack.global.ssl.fastly.net\/66f9\/img\/avatars-teams\/ava_0014-102.png",
|
||||
"image_132": "https:\/\/slack.global.ssl.fastly.net\/66f9\/img\/avatars-teams\/ava_0014-132.png",
|
||||
"image_default": true
|
||||
},
|
||||
"over_storage_limit": false,
|
||||
"plan": "",
|
||||
"profile": [
|
||||
],
|
||||
"over_integrations_limit": true
|
||||
},
|
||||
"latest_event_ts": "1444959257.000000",
|
||||
"channels": [
|
||||
{
|
||||
"id": "C0CHZA86Q",
|
||||
"name": "general",
|
||||
"is_channel": true,
|
||||
"created": 1444958977,
|
||||
"creator": "U0CJ5PC7L",
|
||||
"is_archived": false,
|
||||
"is_general": true,
|
||||
"has_pins": false,
|
||||
"is_member": true,
|
||||
"last_read": "0000000000.000000",
|
||||
"latest": {
|
||||
"user": "U0CJ1TWKX",
|
||||
"type": "message",
|
||||
"subtype": "channel_join",
|
||||
"text": "<@U0CJ1TWKX|bob> has joined the channel",
|
||||
"ts": "1444959632.000002"
|
||||
},
|
||||
"unread_count": 0,
|
||||
"unread_count_display": 0,
|
||||
"members": [
|
||||
"U0CJ1TWKX",
|
||||
"U0CJ5PC7L"
|
||||
],
|
||||
"topic": {
|
||||
"value": "Company-wide announcements and work-based matters",
|
||||
"creator": "",
|
||||
"last_set": 0
|
||||
},
|
||||
"purpose": {
|
||||
"value": "This channel is for team-wide communication and announcements. All team members are in this channel.",
|
||||
"creator": "",
|
||||
"last_set": 0
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "C0CJ5FF0R",
|
||||
"name": "random",
|
||||
"is_channel": true,
|
||||
"created": 1444958977,
|
||||
"creator": "U0CJ5PC7L",
|
||||
"is_archived": false,
|
||||
"is_general": false,
|
||||
"has_pins": false,
|
||||
"is_member": true,
|
||||
"last_read": "0000000000.000000",
|
||||
"latest": {
|
||||
"user": "U0CJ1TWKX",
|
||||
"type": "message",
|
||||
"subtype": "channel_join",
|
||||
"text": "<@U0CJ1TWKX|bob> has joined the channel",
|
||||
"ts": "1444959632.000002"
|
||||
},
|
||||
"unread_count": 0,
|
||||
"unread_count_display": 0,
|
||||
"members": [
|
||||
"U0CJ1TWKX",
|
||||
"U0CJ5PC7L"
|
||||
],
|
||||
"topic": {
|
||||
"value": "Non-work banter and water cooler conversation",
|
||||
"creator": "",
|
||||
"last_set": 0
|
||||
},
|
||||
"purpose": {
|
||||
"value": "A place for non-work-related flimflam, faffing, hodge-podge or jibber-jabber you'd prefer to keep out of more focused work-related channels.",
|
||||
"creator": "",
|
||||
"last_set": 0
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "C0CJ25PDM",
|
||||
"name": "test",
|
||||
"is_channel": true,
|
||||
"created": 1444959237,
|
||||
"creator": "U0CJ5PC7L",
|
||||
"is_archived": false,
|
||||
"is_general": false,
|
||||
"has_pins": false,
|
||||
"is_member": true,
|
||||
"last_read": "0000000000.000000",
|
||||
"latest": {
|
||||
"user": "U0CJ5PC7L",
|
||||
"type": "message",
|
||||
"subtype": "channel_join",
|
||||
"text": "<@U0CJ5PC7L|alice> has joined the channel",
|
||||
"ts": "1444959236.000002"
|
||||
},
|
||||
"unread_count": 0,
|
||||
"unread_count_display": 0,
|
||||
"members": [
|
||||
"U0CJ5PC7L"
|
||||
],
|
||||
"topic": {
|
||||
"value": "",
|
||||
"creator": "",
|
||||
"last_set": 0
|
||||
},
|
||||
"purpose": {
|
||||
"value": "",
|
||||
"creator": "",
|
||||
"last_set": 0
|
||||
}
|
||||
}
|
||||
],
|
||||
"groups": [
|
||||
{
|
||||
"id": "G0CHZSXFW",
|
||||
"name": "private",
|
||||
"is_group": true,
|
||||
"created": 1444959855,
|
||||
"creator": "U0CJ5PC7L",
|
||||
"is_archived": false,
|
||||
"is_mpim": false,
|
||||
"has_pins": false,
|
||||
"is_open": true,
|
||||
"last_read": "0000000000.000000",
|
||||
"latest": {
|
||||
"user": "U0CJ1TWKX",
|
||||
"inviter": "U0CJ5PC7L",
|
||||
"type": "message",
|
||||
"subtype": "group_join",
|
||||
"text": "<@U0CJ1TWKX|bob> has joined the group",
|
||||
"ts": "1444959855.000003"
|
||||
},
|
||||
"unread_count": 0,
|
||||
"unread_count_display": 0,
|
||||
"members": [
|
||||
"U0CJ5PC7L"
|
||||
],
|
||||
"topic": {
|
||||
"value": "",
|
||||
"creator": "",
|
||||
"last_set": 0
|
||||
},
|
||||
"purpose": {
|
||||
"value": "",
|
||||
"creator": "",
|
||||
"last_set": 0
|
||||
}
|
||||
}
|
||||
],
|
||||
"ims": [
|
||||
{
|
||||
"id": "D0CJ1P4JJ",
|
||||
"is_im": true,
|
||||
"user": "USLACKBOT",
|
||||
"created": 1444958977,
|
||||
"has_pins": false,
|
||||
"last_read": "1444958980.000002",
|
||||
"latest": {
|
||||
"type": "message",
|
||||
"user": "USLACKBOT",
|
||||
"text": "We just added $25 in credits to your team\u2019s account to celebrate the addition of <@U0CJ1TWKX>. Add another team member, and we\u2019ll add another $25 more when they join. More the merrier!",
|
||||
"ts": "1444959632.000003"
|
||||
},
|
||||
"unread_count": 1,
|
||||
"unread_count_display": 1,
|
||||
"is_open": true
|
||||
},
|
||||
{
|
||||
"id": "D0CHZQWNP",
|
||||
"is_im": true,
|
||||
"user": "U0CJ1TWKX",
|
||||
"created": 1444959632,
|
||||
"has_pins": false,
|
||||
"last_read": "0000000000.000000",
|
||||
"latest": {
|
||||
"type": "message",
|
||||
"user": "U0CJ1TWKX",
|
||||
"text": "hi alice!",
|
||||
"ts": "1444959642.000002"
|
||||
},
|
||||
"unread_count": 1,
|
||||
"unread_count_display": 1,
|
||||
"is_open": true
|
||||
}
|
||||
],
|
||||
"cache_ts": 1444959857,
|
||||
"users": [
|
||||
{
|
||||
"id": "U0CJ5PC7L",
|
||||
"name": "alice",
|
||||
"deleted": false,
|
||||
"status": null,
|
||||
"color": "9f69e7",
|
||||
"real_name": "",
|
||||
"tz": "America\/Los_Angeles",
|
||||
"tz_label": "Pacific Daylight Time",
|
||||
"tz_offset": -25200,
|
||||
"profile": {
|
||||
"real_name": "",
|
||||
"real_name_normalized": "",
|
||||
"email": "leah+slack-api-test-alice@slack-corp.com",
|
||||
"image_24": "https:\/\/secure.gravatar.com\/avatar\/371dba50bd80313b4037d0bd41aa057b.jpg?s=24&d=https%3A%2F%2Fslack.global.ssl.fastly.net%2F66f9%2Fimg%2Favatars%2Fava_0026-24.png",
|
||||
"image_32": "https:\/\/secure.gravatar.com\/avatar\/371dba50bd80313b4037d0bd41aa057b.jpg?s=32&d=https%3A%2F%2Fslack.global.ssl.fastly.net%2F66f9%2Fimg%2Favatars%2Fava_0026-32.png",
|
||||
"image_48": "https:\/\/secure.gravatar.com\/avatar\/371dba50bd80313b4037d0bd41aa057b.jpg?s=48&d=https%3A%2F%2Fslack.global.ssl.fastly.net%2F272a%2Fimg%2Favatars%2Fava_0026-48.png",
|
||||
"image_72": "https:\/\/secure.gravatar.com\/avatar\/371dba50bd80313b4037d0bd41aa057b.jpg?s=72&d=https%3A%2F%2Fslack.global.ssl.fastly.net%2F66f9%2Fimg%2Favatars%2Fava_0026-72.png",
|
||||
"image_192": "https:\/\/secure.gravatar.com\/avatar\/371dba50bd80313b4037d0bd41aa057b.jpg?s=192&d=https%3A%2F%2Fslack.global.ssl.fastly.net%2F7fa9%2Fimg%2Favatars%2Fava_0026-192.png",
|
||||
"image_512": "https:\/\/secure.gravatar.com\/avatar\/371dba50bd80313b4037d0bd41aa057b.jpg?s=512&d=https%3A%2F%2Fslack.global.ssl.fastly.net%2F7fa9%2Fimg%2Favatars%2Fava_0026-512.png"
|
||||
},
|
||||
"is_admin": true,
|
||||
"is_owner": true,
|
||||
"is_primary_owner": true,
|
||||
"is_restricted": false,
|
||||
"is_ultra_restricted": false,
|
||||
"is_bot": false,
|
||||
"has_files": false,
|
||||
"has_2fa": false,
|
||||
"presence": "active"
|
||||
},
|
||||
{
|
||||
"id": "U0CJ1TWKX",
|
||||
"name": "bob",
|
||||
"deleted": false,
|
||||
"status": null,
|
||||
"color": "4bbe2e",
|
||||
"real_name": "bob",
|
||||
"tz": "America\/Los_Angeles",
|
||||
"tz_label": "Pacific Daylight Time",
|
||||
"tz_offset": -25200,
|
||||
"profile": {
|
||||
"first_name": "bob",
|
||||
"real_name": "bob",
|
||||
"real_name_normalized": "bob",
|
||||
"email": "leah+slack-api-test-bob@slack-corp.com",
|
||||
"image_24": "https:\/\/secure.gravatar.com\/avatar\/ce30a54b00402f5cad7cefd39bf19106.jpg?s=24&d=https%3A%2F%2Fslack.global.ssl.fastly.net%2F66f9%2Fimg%2Favatars%2Fava_0005-24.png",
|
||||
"image_32": "https:\/\/secure.gravatar.com\/avatar\/ce30a54b00402f5cad7cefd39bf19106.jpg?s=32&d=https%3A%2F%2Fslack.global.ssl.fastly.net%2F66f9%2Fimg%2Favatars%2Fava_0005-32.png",
|
||||
"image_48": "https:\/\/secure.gravatar.com\/avatar\/ce30a54b00402f5cad7cefd39bf19106.jpg?s=48&d=https%3A%2F%2Fslack.global.ssl.fastly.net%2F66f9%2Fimg%2Favatars%2Fava_0005-48.png",
|
||||
"image_72": "https:\/\/secure.gravatar.com\/avatar\/ce30a54b00402f5cad7cefd39bf19106.jpg?s=72&d=https%3A%2F%2Fslack.global.ssl.fastly.net%2F66f9%2Fimg%2Favatars%2Fava_0005-72.png",
|
||||
"image_192": "https:\/\/secure.gravatar.com\/avatar\/ce30a54b00402f5cad7cefd39bf19106.jpg?s=192&d=https%3A%2F%2Fslack.global.ssl.fastly.net%2F7fa9%2Fimg%2Favatars%2Fava_0005-192.png",
|
||||
"image_512": "https:\/\/secure.gravatar.com\/avatar\/ce30a54b00402f5cad7cefd39bf19106.jpg?s=512&d=https%3A%2F%2Fslack.global.ssl.fastly.net%2F7fa9%2Fimg%2Favatars%2Fava_0005-512.png"
|
||||
},
|
||||
"is_admin": false,
|
||||
"is_owner": false,
|
||||
"is_primary_owner": false,
|
||||
"is_restricted": false,
|
||||
"is_ultra_restricted": false,
|
||||
"is_bot": false,
|
||||
"has_files": false,
|
||||
"has_2fa": false,
|
||||
"presence": "away"
|
||||
},
|
||||
{
|
||||
"id": "U0F3LFX6K",
|
||||
"team_id": "T0CHZBU59",
|
||||
"name": "carol",
|
||||
"deleted": false,
|
||||
"status": null,
|
||||
"color": "e96699",
|
||||
"real_name": "carol",
|
||||
"tz": "America/Los_Angeles",
|
||||
"tz_label": "Pacific Standard Time",
|
||||
"tz_offset": -28800,
|
||||
"profile": {
|
||||
"first_name": "carol",
|
||||
"real_name": "carol",
|
||||
"real_name_normalized": "carol",
|
||||
"email": "leah+slack-api-test+carol@slack-corp.com",
|
||||
"image_24": "https://secure.gravatar.com/avatar/fe6f44ad42f1c7eb53321c43cd4a3253.jpg?s=24&d=https%3A%2F%2Fslack.global.ssl.fastly.net%2F66f9%2Fimg%2Favatars%2Fava_0008-24.png",
|
||||
"image_32": "https://secure.gravatar.com/avatar/fe6f44ad42f1c7eb53321c43cd4a3253.jpg?s=32&d=https%3A%2F%2Fslack.global.ssl.fastly.net%2F66f9%2Fimg%2Favatars%2Fava_0008-32.png",
|
||||
"image_48": "https://secure.gravatar.com/avatar/fe6f44ad42f1c7eb53321c43cd4a3253.jpg?s=48&d=https%3A%2F%2Fslack.global.ssl.fastly.net%2F66f9%2Fimg%2Favatars%2Fava_0008-48.png",
|
||||
"image_72": "https://secure.gravatar.com/avatar/fe6f44ad42f1c7eb53321c43cd4a3253.jpg?s=72&d=https%3A%2F%2Fslack.global.ssl.fastly.net%2F66f9%2Fimg%2Favatars%2Fava_0008-72.png",
|
||||
"image_192": "https://secure.gravatar.com/avatar/fe6f44ad42f1c7eb53321c43cd4a3253.jpg?s=192&d=https%3A%2F%2Fslack.global.ssl.fastly.net%2F7fa9%2Fimg%2Favatars%2Fava_0008-192.png",
|
||||
"image_512": "https://secure.gravatar.com/avatar/fe6f44ad42f1c7eb53321c43cd4a3253.jpg?s=512&d=https%3A%2F%2Fslack.global.ssl.fastly.net%2F7fa9%2Fimg%2Favatars%2Fava_0008-512.png",
|
||||
"fields": null
|
||||
},
|
||||
"is_admin": false,
|
||||
"is_owner": false,
|
||||
"is_primary_owner": false,
|
||||
"is_restricted": false,
|
||||
"is_ultra_restricted": false,
|
||||
"is_bot": false,
|
||||
"has_2fa": false,
|
||||
"presence": "active"
|
||||
},
|
||||
{
|
||||
"id": "USLACKBOT",
|
||||
"name": "slackbot",
|
||||
"deleted": false,
|
||||
"status": null,
|
||||
"color": "757575",
|
||||
"real_name": "slackbot",
|
||||
"tz": null,
|
||||
"tz_label": "Pacific Daylight Time",
|
||||
"tz_offset": -25200,
|
||||
"profile": {
|
||||
"first_name": "slackbot",
|
||||
"last_name": "",
|
||||
"image_24": "https:\/\/slack.global.ssl.fastly.net\/66f9\/img\/slackbot_24.png",
|
||||
"image_32": "https:\/\/slack.global.ssl.fastly.net\/66f9\/img\/slackbot_32.png",
|
||||
"image_48": "https:\/\/slack.global.ssl.fastly.net\/66f9\/img\/slackbot_48.png",
|
||||
"image_72": "https:\/\/slack.global.ssl.fastly.net\/66f9\/img\/slackbot_72.png",
|
||||
"image_192": "https:\/\/slack.global.ssl.fastly.net\/66f9\/img\/slackbot_192.png",
|
||||
"image_512": "https:\/\/slack.global.ssl.fastly.net\/7fa9\/img\/slackbot_512.png",
|
||||
"real_name": "slackbot",
|
||||
"real_name_normalized": "slackbot",
|
||||
"email": null
|
||||
},
|
||||
"is_admin": false,
|
||||
"is_owner": false,
|
||||
"is_primary_owner": false,
|
||||
"is_restricted": false,
|
||||
"is_ultra_restricted": false,
|
||||
"is_bot": false,
|
||||
"presence": "active"
|
||||
},
|
||||
{
|
||||
"id": "U0EUYE1E0",
|
||||
"team_id": "T0CHZBU59",
|
||||
"name": "test-bot",
|
||||
"deleted": false,
|
||||
"status": null,
|
||||
"color": "3c989f",
|
||||
"real_name": "Test Bot",
|
||||
"tz": null,
|
||||
"tz_label": "Pacific Daylight Time",
|
||||
"tz_offset": -25200,
|
||||
"profile": {
|
||||
"bot_id": "B0EV07BEH",
|
||||
"image_24": "https://avatars.slack-edge.com/2015-11-19/14986249557_24078e22bcd76fabab72_24.jpg",
|
||||
"image_32": "https://avatars.slack-edge.com/2015-11-19/14986249557_24078e22bcd76fabab72_32.jpg",
|
||||
"image_48": "https://avatars.slack-edge.com/2015-11-19/14986249557_24078e22bcd76fabab72_48.jpg",
|
||||
"image_72": "https://avatars.slack-edge.com/2015-11-19/14986249557_24078e22bcd76fabab72_72.jpg",
|
||||
"image_192": "https://avatars.slack-edge.com/2015-11-19/14986249557_24078e22bcd76fabab72_192.jpg",
|
||||
"image_512": "https://avatars.slack-edge.com/2015-11-19/14986249557_24078e22bcd76fabab72_512.jpg",
|
||||
"image_1024": "https://avatars.slack-edge.com/2015-11-19/14986249557_24078e22bcd76fabab72_512.jpg",
|
||||
"image_original": "https://avatars.slack-edge.com/2015-11-19/14986249557_24078e22bcd76fabab72_original.jpg",
|
||||
"first_name": "Test",
|
||||
"last_name": "Bot",
|
||||
"title": "bot-stuff",
|
||||
"avatar_hash": "24078e22bcd7",
|
||||
"real_name": "Test Bot",
|
||||
"real_name_normalized": "Test Bot",
|
||||
"fields": null
|
||||
},
|
||||
"is_admin": false,
|
||||
"is_owner": false,
|
||||
"is_primary_owner": false,
|
||||
"is_restricted": false,
|
||||
"is_ultra_restricted": false,
|
||||
"is_bot": true,
|
||||
"presence": "away"
|
||||
},
|
||||
{
|
||||
"id": "W0E2S5A3B",
|
||||
"team_id": "T0CHZBU59",
|
||||
"name": "dave",
|
||||
"deleted": false,
|
||||
"status": null,
|
||||
"color": "e96699",
|
||||
"real_name": "dave",
|
||||
"tz": "America/Los_Angeles",
|
||||
"tz_label": "Pacific Standard Time",
|
||||
"tz_offset": -28800,
|
||||
"profile": {
|
||||
"first_name": "dave",
|
||||
"real_name": "dave",
|
||||
"real_name_normalized": "dave",
|
||||
"email": "bert+slack-api-test+dave@slack-corp.com",
|
||||
"image_24": "https://secure.gravatar.com/avatar/fe6f44ad42f1c7eb53321c43cd4a3253.jpg?s=24&d=https%3A%2F%2Fslack.global.ssl.fastly.net%2F66f9%2Fimg%2Favatars%2Fava_0008-24.png",
|
||||
"image_32": "https://secure.gravatar.com/avatar/fe6f44ad42f1c7eb53321c43cd4a3253.jpg?s=32&d=https%3A%2F%2Fslack.global.ssl.fastly.net%2F66f9%2Fimg%2Favatars%2Fava_0008-32.png",
|
||||
"image_48": "https://secure.gravatar.com/avatar/fe6f44ad42f1c7eb53321c43cd4a3253.jpg?s=48&d=https%3A%2F%2Fslack.global.ssl.fastly.net%2F66f9%2Fimg%2Favatars%2Fava_0008-48.png",
|
||||
"image_72": "https://secure.gravatar.com/avatar/fe6f44ad42f1c7eb53321c43cd4a3253.jpg?s=72&d=https%3A%2F%2Fslack.global.ssl.fastly.net%2F66f9%2Fimg%2Favatars%2Fava_0008-72.png",
|
||||
"image_192": "https://secure.gravatar.com/avatar/fe6f44ad42f1c7eb53321c43cd4a3253.jpg?s=192&d=https%3A%2F%2Fslack.global.ssl.fastly.net%2F7fa9%2Fimg%2Favatars%2Fava_0008-192.png",
|
||||
"image_512": "https://secure.gravatar.com/avatar/fe6f44ad42f1c7eb53321c43cd4a3253.jpg?s=512&d=https%3A%2F%2Fslack.global.ssl.fastly.net%2F7fa9%2Fimg%2Favatars%2Fava_0008-512.png",
|
||||
"fields": null
|
||||
},
|
||||
"is_admin": false,
|
||||
"is_owner": false,
|
||||
"is_primary_owner": false,
|
||||
"is_restricted": false,
|
||||
"is_ultra_restricted": false,
|
||||
"is_bot": false,
|
||||
"has_2fa": false,
|
||||
"presence": "active"
|
||||
}
|
||||
],
|
||||
"cache_version": "v11-mouse",
|
||||
"cache_ts_version": "v1-cat",
|
||||
"bots": [
|
||||
{
|
||||
"id": "B0CJ5FF1P",
|
||||
"deleted": false,
|
||||
"name": "gdrive"
|
||||
},
|
||||
{
|
||||
"id": "B0EV07BEH",
|
||||
"deleted": false,
|
||||
"name": "bot",
|
||||
"icons": {
|
||||
"image_36": "https://a.slack-edge.com/2fac/plugins/bot/assets/service_36.png",
|
||||
"image_48": "https://a.slack-edge.com/2fac/plugins/bot/assets/service_48.png",
|
||||
"image_72": "https://a.slack-edge.com/12b5a/plugins/bot/assets/service_72.png"
|
||||
}
|
||||
}
|
||||
],
|
||||
"url": "ws://localhost:5221"
|
||||
}
|
||||
Executable
+42
@@ -0,0 +1,42 @@
|
||||
{
|
||||
"ok": true,
|
||||
"user": {
|
||||
"id": "W012A3CDE",
|
||||
"team_id": "T012AB3C4",
|
||||
"name": "spengler",
|
||||
"deleted": false,
|
||||
"color": "9f69e7",
|
||||
"real_name": "Egon Spengler",
|
||||
"tz": "America/Los_Angeles",
|
||||
"tz_label": "Pacific Daylight Time",
|
||||
"tz_offset": -25200,
|
||||
"profile": {
|
||||
"avatar_hash": "ge3b51ca72de",
|
||||
"status_text": "Print is dead",
|
||||
"status_emoji": ":books:",
|
||||
"real_name": "Egon Spengler",
|
||||
"display_name": "spengler",
|
||||
"real_name_normalized": "Egon Spengler",
|
||||
"display_name_normalized": "spengler",
|
||||
"email": "spengler@ghostbusters.example.com",
|
||||
"image_24": "https://.../avatar/e3b51ca72dee4ef87916ae2b9240df50.jpg",
|
||||
"image_32": "https://.../avatar/e3b51ca72dee4ef87916ae2b9240df50.jpg",
|
||||
"image_48": "https://.../avatar/e3b51ca72dee4ef87916ae2b9240df50.jpg",
|
||||
"image_72": "https://.../avatar/e3b51ca72dee4ef87916ae2b9240df50.jpg",
|
||||
"image_192": "https://.../avatar/e3b51ca72dee4ef87916ae2b9240df50.jpg",
|
||||
"image_512": "https://.../avatar/e3b51ca72dee4ef87916ae2b9240df50.jpg",
|
||||
"team": "T012AB3C4"
|
||||
},
|
||||
"is_admin": true,
|
||||
"is_owner": false,
|
||||
"is_primary_owner": false,
|
||||
"is_restricted": false,
|
||||
"is_ultra_restricted": false,
|
||||
"is_bot": false,
|
||||
"is_stranger": false,
|
||||
"updated": 1502138686,
|
||||
"is_app_user": false,
|
||||
"has_2fa": false,
|
||||
"locale": "en-US"
|
||||
}
|
||||
}
|
||||
Executable
+31
@@ -0,0 +1,31 @@
|
||||
{
|
||||
"id": "S0614TZR7",
|
||||
"team_id": "T060RNRCH",
|
||||
"is_usergroup": true,
|
||||
"name": "Workspace Admins",
|
||||
"description": "A group of all Administrators on your workspace.",
|
||||
"handle": "admins",
|
||||
"is_external": false,
|
||||
"date_create": 1446598059,
|
||||
"date_update": 1446670362,
|
||||
"date_delete": 0,
|
||||
"auto_type": "admin",
|
||||
"created_by": "USLACKBOT",
|
||||
"updated_by": "U060RNRCZ",
|
||||
"deleted_by": null,
|
||||
"prefs": {
|
||||
"channels": [
|
||||
|
||||
],
|
||||
"groups": [
|
||||
|
||||
]
|
||||
},
|
||||
"users": [
|
||||
"U060RNRCZ",
|
||||
"U060ULRC0",
|
||||
"U06129G2V",
|
||||
"U061309JM"
|
||||
],
|
||||
"user_count": "4"
|
||||
}
|
||||
@@ -0,0 +1,63 @@
|
||||
//
|
||||
// SKClientTests.swift
|
||||
// SlackKitTests
|
||||
//
|
||||
// Created by Peter Zignego on 3/5/19.
|
||||
// Copyright © 2019 Peter Zignego. All rights reserved.
|
||||
//
|
||||
|
||||
import XCTest
|
||||
@testable import SKClient
|
||||
|
||||
final class SKClientTests: XCTestCase {
|
||||
|
||||
static var rootPath: String {
|
||||
#if Xcode
|
||||
return Bundle(for: self).resourcePath!
|
||||
#else
|
||||
return "SlackKitTests/Resources"
|
||||
#endif
|
||||
}
|
||||
|
||||
struct JSONData {
|
||||
static let rtm_start = try! Data(contentsOf: URL(fileURLWithPath: "\(rootPath)/rtm.start.json"))
|
||||
static let member_joined_channel = try! Data(contentsOf: URL(fileURLWithPath: "\(rootPath)/member_joined_channel.json"))
|
||||
static let member_left_channel = try! Data(contentsOf: URL(fileURLWithPath: "\(rootPath)/member_left_channel.json"))
|
||||
}
|
||||
|
||||
static var allTests = [
|
||||
("testMemberJoinedChannel", testMemberJoinedChannel),
|
||||
("testMemberLeftChannel", testMemberLeftChannel)
|
||||
]
|
||||
|
||||
var client: Client!
|
||||
|
||||
override func setUp() {
|
||||
client = Client()
|
||||
client.initialSetup(JSON: try! JSONSerialization.jsonObject(with: JSONData.rtm_start, options: []) as! [String: Any])
|
||||
}
|
||||
|
||||
func testMemberJoinedChannel() {
|
||||
let channelId = "C0CHZA86Q"
|
||||
let userId = "U0CJ1TWKX"
|
||||
let json = try! JSONSerialization.jsonObject(with: JSONData.member_joined_channel, options: []) as! [String: Any]
|
||||
client.memberJoinedChannel(Event(json))
|
||||
if let contains = client.channels[channelId]?.members?.contains(userId) {
|
||||
XCTAssertTrue(contains)
|
||||
} else {
|
||||
XCTFail()
|
||||
}
|
||||
}
|
||||
|
||||
func testMemberLeftChannel() {
|
||||
let channelId = "C0CJ25PDM"
|
||||
let userId = "U0CJ5PC7L"
|
||||
let json = try! JSONSerialization.jsonObject(with: JSONData.member_left_channel, options: []) as! [String: Any]
|
||||
client.memberLeftChannel(Event(json))
|
||||
if let contains = client.channels[channelId]?.members?.contains(userId) {
|
||||
XCTAssertFalse(contains)
|
||||
} else {
|
||||
XCTFail()
|
||||
}
|
||||
}
|
||||
}
|
||||
Executable
+149
@@ -0,0 +1,149 @@
|
||||
//
|
||||
// SKCoreTests.swift
|
||||
//
|
||||
// Copyright © 2017 Peter Zignego. All rights reserved.
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
// of this software and associated documentation files (the "Software"), to deal
|
||||
// in the Software without restriction, including without limitation the rights
|
||||
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
// copies of the Software, and to permit persons to whom the Software is
|
||||
// furnished to do so, subject to the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be included in
|
||||
// all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
// THE SOFTWARE.
|
||||
|
||||
import XCTest
|
||||
@testable import SKCore
|
||||
|
||||
final class SKCoreTests: XCTestCase {
|
||||
|
||||
static var rootPath: String {
|
||||
#if Xcode
|
||||
return Bundle(for: self).resourcePath!
|
||||
#else
|
||||
return "SlackKitTests/Resources"
|
||||
#endif
|
||||
}
|
||||
|
||||
struct JSONData {
|
||||
static let channel = try! Data(contentsOf: URL(fileURLWithPath: "\(rootPath)/channel.json"))
|
||||
static let conversation = try! Data(contentsOf: URL(fileURLWithPath: "\(rootPath)/conversation.json"))
|
||||
static let file = try! Data(contentsOf: URL(fileURLWithPath: "\(rootPath)/file.json"))
|
||||
static let group = try! Data(contentsOf: URL(fileURLWithPath: "\(rootPath)/group.json"))
|
||||
static let im = try! Data(contentsOf: URL(fileURLWithPath: "\(rootPath)/im.json"))
|
||||
static let mpim = try! Data(contentsOf: URL(fileURLWithPath: "\(rootPath)/mpim.json"))
|
||||
static let user = try! Data(contentsOf: URL(fileURLWithPath: "\(rootPath)/user.json"))
|
||||
static let usergroup = try! Data(contentsOf: URL(fileURLWithPath: "\(rootPath)/usergroup.json"))
|
||||
static let events = try! Data(contentsOf: URL(fileURLWithPath: "\(rootPath)/events.json"))
|
||||
}
|
||||
|
||||
static var allTests = [
|
||||
("testChannel", testChannel),
|
||||
("testConversation", testConversation),
|
||||
("testFile", testFile),
|
||||
("testGroup", testGroup),
|
||||
("testIm", testIm),
|
||||
("TestMpim", testMpim),
|
||||
("testUser", testUser),
|
||||
("testUserGroup", testUserGroup),
|
||||
("testEvents", testEvents)
|
||||
]
|
||||
|
||||
func testEvents() {
|
||||
let eventsKeys = [
|
||||
// Bot Event
|
||||
"bot_added","bot_changed",
|
||||
// Channel Event
|
||||
"channel_archive","channel_created","channel_deleted",
|
||||
"channel_joined", "channel_left", "channel_marked",
|
||||
"channel_rename","channel_unarchive",
|
||||
// Group Event
|
||||
"group_archive","group_close","group_joined",
|
||||
"group_left", "group_marked","group_rename","group_unarchive",
|
||||
// Im Event
|
||||
"im_close","im_created","im_marked","im_open", "manual_presence_change",
|
||||
// Message Event
|
||||
"message::channel_join", "message::channel_leave", "message::channel_name",
|
||||
"message::group_join", "message::group_name", "message::group_unarchive",
|
||||
"message::message_changed", "message::message_deleted",
|
||||
// Preference Event
|
||||
"pref_change", "presence_change",
|
||||
// Reaction Event
|
||||
"reaction_added", "reaction_removed",
|
||||
// Team Event
|
||||
"team_domain_change", "team_join", "team_pref_change",
|
||||
"team_rename",
|
||||
// User Event
|
||||
"user_change", "user_typing"
|
||||
]
|
||||
|
||||
let data = JSONData.events
|
||||
let json = try! JSONSerialization.jsonObject(with: data, options: []) as! [String: Any]
|
||||
_ = eventsKeys.map { json[$0] as! [String: Any] }.map { Event($0) }
|
||||
}
|
||||
|
||||
func testChannel() {
|
||||
let data = JSONData.channel
|
||||
let json = try! JSONSerialization.jsonObject(with: data, options: []) as! [String : Any]
|
||||
let channel = Channel(channel: json)
|
||||
XCTAssertNotNil(channel)
|
||||
}
|
||||
|
||||
func testConversation() {
|
||||
let data = JSONData.conversation
|
||||
let json = try! JSONSerialization.jsonObject(with: data, options: []) as! [String : Any]
|
||||
let channel = Channel(channel: json["channel"] as?[String : Any])
|
||||
XCTAssertNotNil(channel)
|
||||
}
|
||||
|
||||
func testFile() {
|
||||
let data = JSONData.file
|
||||
let json = try! JSONSerialization.jsonObject(with: data, options: []) as! [String : Any]
|
||||
let file = File(file: json)
|
||||
XCTAssertNotNil(file)
|
||||
}
|
||||
|
||||
func testGroup() {
|
||||
let data = JSONData.group
|
||||
let json = try! JSONSerialization.jsonObject(with: data, options: []) as! [String: Any]
|
||||
let channel = Channel(channel: json)
|
||||
XCTAssertNotNil(channel)
|
||||
}
|
||||
|
||||
func testIm() {
|
||||
let data = JSONData.im
|
||||
let json = try! JSONSerialization.jsonObject(with: data, options: []) as! [String: Any]
|
||||
let channel = Channel(channel: json)
|
||||
XCTAssertNotNil(channel)
|
||||
}
|
||||
|
||||
func testMpim() {
|
||||
let data = JSONData.mpim
|
||||
let json = try! JSONSerialization.jsonObject(with: data, options: []) as! [String: Any]
|
||||
let channel = Channel(channel: json)
|
||||
XCTAssertNotNil(channel)
|
||||
}
|
||||
|
||||
func testUser() {
|
||||
let data = JSONData.user
|
||||
let json = try! JSONSerialization.jsonObject(with: data, options: []) as! [String: Any]
|
||||
let user = User(user: json)
|
||||
XCTAssertNotNil(user)
|
||||
}
|
||||
|
||||
func testUserGroup() {
|
||||
let data = JSONData.usergroup
|
||||
let json = try! JSONSerialization.jsonObject(with: data, options: []) as! [String: Any]
|
||||
let userGroup = UserGroup(userGroup: json)
|
||||
XCTAssertNotNil(userGroup)
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>CFBundleDevelopmentRegion</key>
|
||||
<string>$(DEVELOPMENT_LANGUAGE)</string>
|
||||
<key>CFBundleExecutable</key>
|
||||
<string>$(EXECUTABLE_NAME)</string>
|
||||
<key>CFBundleIdentifier</key>
|
||||
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
|
||||
<key>CFBundleInfoDictionaryVersion</key>
|
||||
<string>6.0</string>
|
||||
<key>CFBundleName</key>
|
||||
<string>$(PRODUCT_NAME)</string>
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>BNDL</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>1.0</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>1</string>
|
||||
</dict>
|
||||
</plist>
|
||||
@@ -0,0 +1,16 @@
|
||||
//
|
||||
// SlackKitTests.xcconfig
|
||||
// SlackKit
|
||||
//
|
||||
// Created by Peter Zignego on 1/28/19.
|
||||
// Copyright © 2019 Peter Zignego. All rights reserved.
|
||||
//
|
||||
|
||||
// Configuration settings file format documentation can be found at:
|
||||
// https://help.apple.com/xcode/#/dev745c5c974
|
||||
|
||||
FRAMEWORK_SEARCH_PATHS[sdk=macosx*] = "$(PROJECT_DIR)/Frameworks/macOS";
|
||||
FRAMEWORK_SEARCH_PATHS[sdk=appletvos*] = "$(PROJECT_DIR)/Frameworks/tvOS";
|
||||
FRAMEWORK_SEARCH_PATHS[sdk=iphoneos*] = "$(PROJECT_DIR)/Frameworks/iOS";
|
||||
FRAMEWORK_SEARCH_PATHS[sdk=iphonesimulator*] = "$(PROJECT_DIR)/Frameworks/iOS";
|
||||
FRAMEWORK_SEARCH_PATHS[sdk=appletvsimulator*] = "$(PROJECT_DIR)/Frameworks/tvOS";
|
||||
@@ -0,0 +1,31 @@
|
||||
import XCTest
|
||||
|
||||
extension SKClientTests {
|
||||
static let __allTests = [
|
||||
("testMemberJoinedChannel", testMemberJoinedChannel),
|
||||
("testMemberLeftChannel", testMemberLeftChannel),
|
||||
]
|
||||
}
|
||||
|
||||
extension SKCoreTests {
|
||||
static let __allTests = [
|
||||
("testChannel", testChannel),
|
||||
("testConversation", testConversation),
|
||||
("testEvents", testEvents),
|
||||
("testFile", testFile),
|
||||
("testGroup", testGroup),
|
||||
("testIm", testIm),
|
||||
("testMpim", testMpim),
|
||||
("testUser", testUser),
|
||||
("testUserGroup", testUserGroup),
|
||||
]
|
||||
}
|
||||
|
||||
#if !os(macOS)
|
||||
public func __allTests() -> [XCTestCaseEntry] {
|
||||
return [
|
||||
testCase(SKClientTests.__allTests),
|
||||
testCase(SKCoreTests.__allTests),
|
||||
]
|
||||
}
|
||||
#endif
|
||||
@@ -13,7 +13,7 @@
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>FMWK</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>1</string>
|
||||
<string>4.2.1</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>$(CURRENT_PROJECT_VERSION)</string>
|
||||
</dict>
|
||||
Executable
+14
@@ -0,0 +1,14 @@
|
||||
//
|
||||
// SKClient.h
|
||||
// SKClient
|
||||
//
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
//! Project version number for SKClient.
|
||||
FOUNDATION_EXPORT double SKClientVersionNumber;
|
||||
|
||||
//! Project version string for SKClient.
|
||||
FOUNDATION_EXPORT const unsigned char SKClientVersionString[];
|
||||
|
||||
// In this header, you should import all the public headers of your framework using statements like #import <SKClient/PublicHeader.h>
|
||||
Executable
+14
@@ -0,0 +1,14 @@
|
||||
//
|
||||
// SKCore.h
|
||||
// SKCore
|
||||
//
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
//! Project version number for SKCore.
|
||||
FOUNDATION_EXPORT double SKCoreVersionNumber;
|
||||
|
||||
//! Project version string for SKCore.
|
||||
FOUNDATION_EXPORT const unsigned char SKCoreVersionString[];
|
||||
|
||||
// In this header, you should import all the public headers of your framework using statements like #import <SKCore/PublicHeader.h>
|
||||
Executable
+14
@@ -0,0 +1,14 @@
|
||||
//
|
||||
// SKRTMAPI.h
|
||||
// SKRTMAPI
|
||||
//
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
//! Project version number for SKRTMAPI.
|
||||
FOUNDATION_EXPORT double SKRTMAPIVersionNumber;
|
||||
|
||||
//! Project version string for SKRTMAPI.
|
||||
FOUNDATION_EXPORT const unsigned char SKRTMAPIVersionString[];
|
||||
|
||||
// In this header, you should import all the public headers of your framework using statements like #import <SKRTMAPI/PublicHeader.h>
|
||||
Executable
+14
@@ -0,0 +1,14 @@
|
||||
//
|
||||
// SKServer.h
|
||||
// SKServer
|
||||
//
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
//! Project version number for SKServer.
|
||||
FOUNDATION_EXPORT double SKServerVersionNumber;
|
||||
|
||||
//! Project version string for SKServer.
|
||||
FOUNDATION_EXPORT const unsigned char SKServerVersionString[];
|
||||
|
||||
// In this header, you should import all the public headers of your framework using statements like #import <SKServer/PublicHeader.h>
|
||||
Executable
+14
@@ -0,0 +1,14 @@
|
||||
//
|
||||
// SKWebAPI.h
|
||||
// SKWebAPI
|
||||
//
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
//! Project version number for SKWebAPI.
|
||||
FOUNDATION_EXPORT double SKWebAPIVersionNumber;
|
||||
|
||||
//! Project version string for SKWebAPI.
|
||||
FOUNDATION_EXPORT const unsigned char SKWebAPIVersionString[];
|
||||
|
||||
// In this header, you should import all the public headers of your framework using statements like #import <SKWebAPI/PublicHeader.h>
|
||||
Executable
+14
@@ -0,0 +1,14 @@
|
||||
//
|
||||
// SlackKit.h
|
||||
// SlackKit
|
||||
//
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
//! Project version number for SlackKit.
|
||||
FOUNDATION_EXPORT double SlackKitVersionNumber;
|
||||
|
||||
//! Project version string for Moya.
|
||||
FOUNDATION_EXPORT const unsigned char SlackKitVersionString[];
|
||||
|
||||
// In this header, you should import all the public headers of your framework using statements like #import <SlackKit/PublicHeader.h>
|
||||
@@ -7,6 +7,7 @@ trigger:
|
||||
- master
|
||||
|
||||
jobs:
|
||||
# Builds
|
||||
- job: macOS
|
||||
pool:
|
||||
vmImage: 'macOS-10.13'
|
||||
@@ -19,6 +20,14 @@ jobs:
|
||||
configuration: 'Release'
|
||||
xcWorkspacePath: '**/*.xcodeproj/project.xcworkspace'
|
||||
xcodeVersion: '10'
|
||||
- task: Xcode@5
|
||||
inputs:
|
||||
actions: 'test'
|
||||
scheme: 'SlackKitTests'
|
||||
sdk: 'macosx'
|
||||
configuration: 'Debug'
|
||||
xcWorkspacePath: '**/*.xcodeproj/project.xcworkspace'
|
||||
xcodeVersion: '10'
|
||||
- job: iOS
|
||||
pool:
|
||||
vmImage: 'macOS-10.13'
|
||||
@@ -31,6 +40,14 @@ jobs:
|
||||
configuration: 'Release'
|
||||
xcWorkspacePath: '**/*.xcodeproj/project.xcworkspace'
|
||||
xcodeVersion: '10'
|
||||
- task: Xcode@5
|
||||
inputs:
|
||||
actions: 'test'
|
||||
scheme: 'SlackKitTests'
|
||||
sdk: 'iphonesimulator'
|
||||
configuration: 'Debug'
|
||||
xcWorkspacePath: '**/*.xcodeproj/project.xcworkspace'
|
||||
xcodeVersion: '10'
|
||||
- job: tvOS
|
||||
pool:
|
||||
vmImage: 'macOS-10.13'
|
||||
@@ -43,6 +60,14 @@ jobs:
|
||||
configuration: 'Release'
|
||||
xcWorkspacePath: '**/*.xcodeproj/project.xcworkspace'
|
||||
xcodeVersion: '10'
|
||||
- task: Xcode@5
|
||||
inputs:
|
||||
actions: 'test'
|
||||
scheme: 'SlackKitTests'
|
||||
sdk: 'appletvsimulator'
|
||||
configuration: 'Debug'
|
||||
xcWorkspacePath: '**/*.xcodeproj/project.xcworkspace'
|
||||
xcodeVersion: '10'
|
||||
- job: Linux
|
||||
pool:
|
||||
vmImage: 'ubuntu-16.04'
|
||||
@@ -55,3 +80,5 @@ jobs:
|
||||
tar xzf swift-4.2.1-RELEASE-ubuntu16.04.tar.gz -C $(Build.SourcesDirectory)
|
||||
# Swift build
|
||||
$(Build.SourcesDirectory)/swift-4.2.1-RELEASE-ubuntu16.04/usr/bin/swift build
|
||||
# Swift test
|
||||
$(Build.SourcesDirectory)/swift-4.2.1-RELEASE-ubuntu16.04/usr/bin/swift test
|
||||
Reference in New Issue
Block a user