layabout 0.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +2 -0
- data/.rspec +2 -0
- data/.travis.yml +4 -0
- data/Gemfile +8 -0
- data/Gemfile.lock +63 -0
- data/LICENSE +22 -0
- data/README.md +18 -0
- data/layabout.gemspec +26 -0
- data/lib/layabout/auth_test.rb +35 -0
- data/lib/layabout/channels.rb +82 -0
- data/lib/layabout/chat.rb +67 -0
- data/lib/layabout/delete_chat.rb +48 -0
- data/lib/layabout/file_list.rb +58 -0
- data/lib/layabout/file_upload.rb +73 -0
- data/lib/layabout/helpers.rb +21 -0
- data/lib/layabout/incoming_webhook.rb +41 -0
- data/lib/layabout/slack/channel.rb +32 -0
- data/lib/layabout/slack/file.rb +56 -0
- data/lib/layabout/slack_response.rb +37 -0
- data/lib/layabout/version.rb +3 -0
- data/lib/layabout.rb +29 -0
- data/spec/fixtures/upload_test.txt +1 -0
- data/spec/fixtures/vcr_cassettes/Layabout/_channels/returns_a_list_of_channels.yml +125 -0
- data/spec/fixtures/vcr_cassettes/Layabout/_say/posts_a_message.yml +54 -0
- data/spec/fixtures/vcr_cassettes/Layabout/_upload/uploads_a_file.yml +65 -0
- data/spec/fixtures/vcr_cassettes/Layabout_AuthTest/_get/tests_auth.yml +146 -0
- data/spec/fixtures/vcr_cassettes/Layabout_Channels/_info/returns_a_Layabout_Slack_Channel.yml +96 -0
- data/spec/fixtures/vcr_cassettes/Layabout_Channels/_join/returns_a_success_response.yml +95 -0
- data/spec/fixtures/vcr_cassettes/Layabout_Channels/_leave/returns_a_success_response.yml +95 -0
- data/spec/fixtures/vcr_cassettes/Layabout_Channels/_list/returns_a_list_of_Layabout_Slack_Channel.yml +105 -0
- data/spec/fixtures/vcr_cassettes/Layabout_Chat/_post/submits_a_message.yml +95 -0
- data/spec/fixtures/vcr_cassettes/Layabout_DeleteChat/_delete/deletes_the_message.yml +146 -0
- data/spec/fixtures/vcr_cassettes/Layabout_FileList/_list/returns_a_list_of_Layabout_Slack_File.yml +57 -0
- data/spec/fixtures/vcr_cassettes/Layabout_FileUpload/_upload/uploads_a_file.yml +65 -0
- data/spec/fixtures/vcr_cassettes/Layabout_IncomingWebhook/_post/submits_a_message.yml +44 -0
- data/spec/layabout/auth_test_spec.rb +12 -0
- data/spec/layabout/channels_spec.rb +29 -0
- data/spec/layabout/chat_spec.rb +12 -0
- data/spec/layabout/configuration_spec.rb +15 -0
- data/spec/layabout/delete_chat_spec.rb +13 -0
- data/spec/layabout/file_list_spec.rb +11 -0
- data/spec/layabout/file_upload_spec.rb +12 -0
- data/spec/layabout/incoming_webhook_spec.rb +18 -0
- data/spec/layabout/layabout_spec.rb +23 -0
- data/spec/spec_helper.rb +95 -0
- metadata +217 -0
@@ -0,0 +1,95 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: get
|
5
|
+
uri: https://isotope11.slack.com/api/channels.join?name=%23ruby&token=a-totally-legit-token
|
6
|
+
body:
|
7
|
+
encoding: US-ASCII
|
8
|
+
string: ''
|
9
|
+
headers:
|
10
|
+
Accept-Encoding:
|
11
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
12
|
+
Accept:
|
13
|
+
- "*/*"
|
14
|
+
User-Agent:
|
15
|
+
- Ruby
|
16
|
+
response:
|
17
|
+
status:
|
18
|
+
code: 200
|
19
|
+
message: OK
|
20
|
+
headers:
|
21
|
+
Access-Control-Allow-Origin:
|
22
|
+
- "*"
|
23
|
+
Content-Type:
|
24
|
+
- application/json; charset=utf-8
|
25
|
+
Date:
|
26
|
+
- Thu, 25 Sep 2014 02:22:54 GMT
|
27
|
+
Server:
|
28
|
+
- Apache
|
29
|
+
Strict-Transport-Security:
|
30
|
+
- max-age=31536000; includeSubDomains
|
31
|
+
Vary:
|
32
|
+
- Accept-Encoding
|
33
|
+
X-Xss-Protection:
|
34
|
+
- '0'
|
35
|
+
Content-Length:
|
36
|
+
- '55'
|
37
|
+
Connection:
|
38
|
+
- keep-alive
|
39
|
+
body:
|
40
|
+
encoding: UTF-8
|
41
|
+
string: '{"ok":false,"error":"invalid_auth"}'
|
42
|
+
http_version:
|
43
|
+
recorded_at: Thu, 25 Sep 2014 02:22:53 GMT
|
44
|
+
- request:
|
45
|
+
method: get
|
46
|
+
uri: https://isotope11.slack.com/api/channels.join?name=%23ruby&token=xoxp-2223009426-2222616703-2700726491-4a3e8d
|
47
|
+
body:
|
48
|
+
encoding: US-ASCII
|
49
|
+
string: ''
|
50
|
+
headers:
|
51
|
+
Accept-Encoding:
|
52
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
53
|
+
Accept:
|
54
|
+
- "*/*"
|
55
|
+
User-Agent:
|
56
|
+
- Ruby
|
57
|
+
response:
|
58
|
+
status:
|
59
|
+
code: 200
|
60
|
+
message: OK
|
61
|
+
headers:
|
62
|
+
Access-Control-Allow-Origin:
|
63
|
+
- "*"
|
64
|
+
Cache-Control:
|
65
|
+
- private, no-cache, no-store, must-revalidate
|
66
|
+
Content-Type:
|
67
|
+
- application/json; charset=utf-8
|
68
|
+
Date:
|
69
|
+
- Thu, 25 Sep 2014 12:05:00 GMT
|
70
|
+
Expires:
|
71
|
+
- Mon, 26 Jul 1997 05:00:00 GMT
|
72
|
+
Pragma:
|
73
|
+
- no-cache
|
74
|
+
Server:
|
75
|
+
- Apache
|
76
|
+
Strict-Transport-Security:
|
77
|
+
- max-age=31536000; includeSubDomains
|
78
|
+
Vary:
|
79
|
+
- Accept-Encoding
|
80
|
+
X-Accepted-Oauth-Scopes:
|
81
|
+
- post
|
82
|
+
X-Oauth-Scopes:
|
83
|
+
- identify,read,post,client
|
84
|
+
X-Xss-Protection:
|
85
|
+
- '0'
|
86
|
+
Content-Length:
|
87
|
+
- '198'
|
88
|
+
Connection:
|
89
|
+
- keep-alive
|
90
|
+
body:
|
91
|
+
encoding: UTF-8
|
92
|
+
string: '{"ok":true,"already_in_channel":true,"channel":{"id":"C026VKGP7","name":"ruby","is_channel":true,"created":1395427609,"creator":"U026JJ2HH","is_archived":false,"is_general":false,"is_member":true,"members":["U026JJ4LP"],"topic":{"value":"","creator":"","last_set":"0"},"purpose":{"value":"","creator":"","last_set":"0"}}}'
|
93
|
+
http_version:
|
94
|
+
recorded_at: Thu, 25 Sep 2014 12:05:03 GMT
|
95
|
+
recorded_with: VCR 2.9.3
|
@@ -0,0 +1,95 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: get
|
5
|
+
uri: https://isotope11.slack.com/api/channels.leave?channel=C026K09CS&token=a-totally-legit-token
|
6
|
+
body:
|
7
|
+
encoding: US-ASCII
|
8
|
+
string: ''
|
9
|
+
headers:
|
10
|
+
Accept-Encoding:
|
11
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
12
|
+
Accept:
|
13
|
+
- "*/*"
|
14
|
+
User-Agent:
|
15
|
+
- Ruby
|
16
|
+
response:
|
17
|
+
status:
|
18
|
+
code: 200
|
19
|
+
message: OK
|
20
|
+
headers:
|
21
|
+
Access-Control-Allow-Origin:
|
22
|
+
- "*"
|
23
|
+
Content-Type:
|
24
|
+
- application/json; charset=utf-8
|
25
|
+
Date:
|
26
|
+
- Thu, 25 Sep 2014 02:22:54 GMT
|
27
|
+
Server:
|
28
|
+
- Apache
|
29
|
+
Strict-Transport-Security:
|
30
|
+
- max-age=31536000; includeSubDomains
|
31
|
+
Vary:
|
32
|
+
- Accept-Encoding
|
33
|
+
X-Xss-Protection:
|
34
|
+
- '0'
|
35
|
+
Content-Length:
|
36
|
+
- '55'
|
37
|
+
Connection:
|
38
|
+
- keep-alive
|
39
|
+
body:
|
40
|
+
encoding: UTF-8
|
41
|
+
string: '{"ok":false,"error":"invalid_auth"}'
|
42
|
+
http_version:
|
43
|
+
recorded_at: Thu, 25 Sep 2014 02:22:54 GMT
|
44
|
+
- request:
|
45
|
+
method: get
|
46
|
+
uri: https://isotope11.slack.com/api/channels.leave?channel=C026K09CS&token=xoxp-2223009426-2222616703-2700726491-4a3e8d
|
47
|
+
body:
|
48
|
+
encoding: US-ASCII
|
49
|
+
string: ''
|
50
|
+
headers:
|
51
|
+
Accept-Encoding:
|
52
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
53
|
+
Accept:
|
54
|
+
- "*/*"
|
55
|
+
User-Agent:
|
56
|
+
- Ruby
|
57
|
+
response:
|
58
|
+
status:
|
59
|
+
code: 200
|
60
|
+
message: OK
|
61
|
+
headers:
|
62
|
+
Access-Control-Allow-Origin:
|
63
|
+
- "*"
|
64
|
+
Cache-Control:
|
65
|
+
- private, no-cache, no-store, must-revalidate
|
66
|
+
Content-Type:
|
67
|
+
- application/json; charset=utf-8
|
68
|
+
Date:
|
69
|
+
- Thu, 25 Sep 2014 12:05:00 GMT
|
70
|
+
Expires:
|
71
|
+
- Mon, 26 Jul 1997 05:00:00 GMT
|
72
|
+
Pragma:
|
73
|
+
- no-cache
|
74
|
+
Server:
|
75
|
+
- Apache
|
76
|
+
Strict-Transport-Security:
|
77
|
+
- max-age=31536000; includeSubDomains
|
78
|
+
Vary:
|
79
|
+
- Accept-Encoding
|
80
|
+
X-Accepted-Oauth-Scopes:
|
81
|
+
- post
|
82
|
+
X-Oauth-Scopes:
|
83
|
+
- identify,read,post,client
|
84
|
+
X-Xss-Protection:
|
85
|
+
- '0'
|
86
|
+
Content-Length:
|
87
|
+
- '31'
|
88
|
+
Connection:
|
89
|
+
- keep-alive
|
90
|
+
body:
|
91
|
+
encoding: UTF-8
|
92
|
+
string: '{"ok":true}'
|
93
|
+
http_version:
|
94
|
+
recorded_at: Thu, 25 Sep 2014 12:05:03 GMT
|
95
|
+
recorded_with: VCR 2.9.3
|
@@ -0,0 +1,105 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: get
|
5
|
+
uri: https://isotope11.slack.com/api/channels.list?token=a-totally-legit-token
|
6
|
+
body:
|
7
|
+
encoding: US-ASCII
|
8
|
+
string: ''
|
9
|
+
headers:
|
10
|
+
Accept-Encoding:
|
11
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
12
|
+
Accept:
|
13
|
+
- "*/*"
|
14
|
+
User-Agent:
|
15
|
+
- Ruby
|
16
|
+
response:
|
17
|
+
status:
|
18
|
+
code: 200
|
19
|
+
message: OK
|
20
|
+
headers:
|
21
|
+
Access-Control-Allow-Origin:
|
22
|
+
- "*"
|
23
|
+
Content-Type:
|
24
|
+
- application/json; charset=utf-8
|
25
|
+
Date:
|
26
|
+
- Thu, 25 Sep 2014 02:22:53 GMT
|
27
|
+
Server:
|
28
|
+
- Apache
|
29
|
+
Strict-Transport-Security:
|
30
|
+
- max-age=31536000; includeSubDomains
|
31
|
+
Vary:
|
32
|
+
- Accept-Encoding
|
33
|
+
X-Xss-Protection:
|
34
|
+
- '0'
|
35
|
+
Content-Length:
|
36
|
+
- '55'
|
37
|
+
Connection:
|
38
|
+
- keep-alive
|
39
|
+
body:
|
40
|
+
encoding: UTF-8
|
41
|
+
string: '{"ok":false,"error":"invalid_auth"}'
|
42
|
+
http_version:
|
43
|
+
recorded_at: Thu, 25 Sep 2014 02:22:53 GMT
|
44
|
+
- request:
|
45
|
+
method: get
|
46
|
+
uri: https://isotope11.slack.com/api/channels.list?token=xoxp-2223009426-2222616703-2700726491-4a3e8d
|
47
|
+
body:
|
48
|
+
encoding: US-ASCII
|
49
|
+
string: ''
|
50
|
+
headers:
|
51
|
+
Accept-Encoding:
|
52
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
53
|
+
Accept:
|
54
|
+
- "*/*"
|
55
|
+
User-Agent:
|
56
|
+
- Ruby
|
57
|
+
response:
|
58
|
+
status:
|
59
|
+
code: 200
|
60
|
+
message: OK
|
61
|
+
headers:
|
62
|
+
Access-Control-Allow-Origin:
|
63
|
+
- "*"
|
64
|
+
Cache-Control:
|
65
|
+
- private, no-cache, no-store, must-revalidate
|
66
|
+
Content-Type:
|
67
|
+
- application/json; charset=utf-8
|
68
|
+
Date:
|
69
|
+
- Thu, 25 Sep 2014 12:05:00 GMT
|
70
|
+
Expires:
|
71
|
+
- Mon, 26 Jul 1997 05:00:00 GMT
|
72
|
+
Pragma:
|
73
|
+
- no-cache
|
74
|
+
Server:
|
75
|
+
- Apache
|
76
|
+
Strict-Transport-Security:
|
77
|
+
- max-age=31536000; includeSubDomains
|
78
|
+
Vary:
|
79
|
+
- Accept-Encoding
|
80
|
+
X-Accepted-Oauth-Scopes:
|
81
|
+
- read
|
82
|
+
X-Oauth-Scopes:
|
83
|
+
- identify,read,post,client
|
84
|
+
X-Xss-Protection:
|
85
|
+
- '0'
|
86
|
+
Content-Length:
|
87
|
+
- '1150'
|
88
|
+
Connection:
|
89
|
+
- keep-alive
|
90
|
+
body:
|
91
|
+
encoding: UTF-8
|
92
|
+
string: '{"ok":true,"channels":[{"id":"C029N15A8","name":"affa_tracker","is_channel":true,"created":1399390760,"creator":"U026LNDQB","is_archived":false,"is_general":false,"is_member":false,"members":["U026K09CL","U026K0CLC","U026K13DU","U026LNDQB"],"topic":{"value":"","creator":"","last_set":"0"},"purpose":{"value":"To
|
93
|
+
discuss the development of the Affa Tracker app","creator":"U026LNDQB","last_set":"1399390761"},"num_members":4},{"id":"C026JMBBH","name":"aiua","is_channel":true,"created":1395068252,"creator":"U026JJ4LP","is_archived":false,"is_general":false,"is_member":false,"members":["U026JJBGB","U026JL37B","U026K09CL","U02K9RJTP"],"topic":{"value":"","creator":"","last_set":"0"},"purpose":{"value":"","creator":"","last_set":"0"},"num_members":4},{"id":"C02HN6TPJ","name":"chromium","is_channel":true,"created":1409343386,"creator":"U026JJ2HH","is_archived":false,"is_general":false,"is_member":false,"members":[],"topic":{"value":"","creator":"","last_set":"0"},"purpose":{"value":"","creator":"","last_set":"0"},"num_members":0},{"id":"C029H63H1","name":"colon-ade","is_channel":true,"created":1399038936,"creator":"U026K0CLC","is_archived":false,"is_general":false,"is_member":false,"members":["U026K09CL","U026K0CLC","U026LNDQB"],"topic":{"value":"","creator":"","last_set":"0"},"purpose":{"value":"","creator":"","last_set":"0"},"num_members":3},{"id":"C02D52S06","name":"elixir","is_channel":true,"created":1404914328,"creator":"U02CB4HEZ","is_archived":false,"is_general":false,"is_member":false,"members":["U02CB4HEZ"],"topic":{"value":"","creator":"","last_set":"0"},"purpose":{"value":"Discuss
|
94
|
+
all things Erlang\/Elixir","creator":"U02CB4HEZ","last_set":"1404914328"},"num_members":1},{"id":"C026K09CQ","name":"general","is_channel":true,"created":1395065128,"creator":"U026K09CL","is_archived":false,"is_general":true,"is_member":true,"members":["U026JJ2HH","U026JJ2UV","U026JJ4LP","U026JJBGB","U026JL37B","U026K09CL","U026K0CLC","U026K13DU","U026LNDQB","U02C6FSCT","U02CB4HEZ","U02HKC6LR","U02K9RJTP"],"topic":{"value":"work-related
|
95
|
+
gifs, and curse words","creator":"U026JL37B","last_set":"1400785091"},"purpose":{"value":"The
|
96
|
+
#general channel is for team-wide communication and announcements. All team
|
97
|
+
members are in this channel.","creator":"","last_set":"0"},"num_members":12},{"id":"C026M741S","name":"jenkins","is_channel":true,"created":1395152901,"creator":"U026JJ4LP","is_archived":true,"is_general":false,"is_member":false,"members":[],"topic":{"value":"","creator":"","last_set":"0"},"purpose":{"value":"Build
|
98
|
+
Notifications","creator":"U026JJ4LP","last_set":"1395152901"},"num_members":0},{"id":"C026JJD8R","name":"learningearnings","is_channel":true,"created":1395065397,"creator":"U026JJ2UV","is_archived":false,"is_general":false,"is_member":false,"members":["U026JJ2UV","U026JL37B","U026K09CL","U026K0CLC","U02K9RJTP"],"topic":{"value":"","creator":"","last_set":"0"},"purpose":{"value":"","creator":"","last_set":"0"},"num_members":4},{"id":"C026JJ985","name":"paves","is_channel":true,"created":1395065313,"creator":"U026K09CL","is_archived":false,"is_general":false,"is_member":false,"members":[],"topic":{"value":"","creator":"","last_set":"0"},"purpose":{"value":"Discussion
|
99
|
+
around the PAVES app","creator":"U026K09CL","last_set":"1395065313"},"num_members":0},{"id":"C026K09CS","name":"random","is_channel":true,"created":1395065128,"creator":"U026K09CL","is_archived":false,"is_general":false,"is_member":true,"members":["U026JJ2UV","U026JJ4LP","U026JL37B","U026K09CL","U026K0CLC","U026K13DU","U02C6FSCT","U02CB4HEZ","U02HKC6LR","U02K9RJTP"],"topic":{"value":"","creator":"","last_set":"0"},"purpose":{"value":"A
|
100
|
+
place for non-work banter, links, articles of interest, humor or anything
|
101
|
+
else which you''d like concentrated in some place other than work-related
|
102
|
+
channels.","creator":"","last_set":"0"},"num_members":9},{"id":"C02908AHG","name":"reactjs","is_channel":true,"created":1397765758,"creator":"U026JJ2HH","is_archived":false,"is_general":false,"is_member":false,"members":[],"topic":{"value":"","creator":"","last_set":"0"},"purpose":{"value":"","creator":"","last_set":"0"},"num_members":0},{"id":"C026VKGP7","name":"ruby","is_channel":true,"created":1395427609,"creator":"U026JJ2HH","is_archived":false,"is_general":false,"is_member":true,"members":["U026JJ4LP"],"topic":{"value":"","creator":"","last_set":"0"},"purpose":{"value":"","creator":"","last_set":"0"},"num_members":1},{"id":"C02C76XRU","name":"shipt","is_channel":true,"created":1403638591,"creator":"U026JJBGB","is_archived":false,"is_general":false,"is_member":true,"members":["U026JJ4LP","U026JJBGB","U026JL37B","U026K09CL","U026K0CLC","U026LNDQB","U02C6FSCT","U02CB4HEZ","U02JX3FAF","U02K9RJTP"],"topic":{"value":"","creator":"","last_set":"0"},"purpose":{"value":"","creator":"","last_set":"0"},"num_members":10},{"id":"C029SAZ49","name":"squad","is_channel":true,"created":1399648710,"creator":"U026K0CLC","is_archived":false,"is_general":false,"is_member":false,"members":["U026K09CL","U026K0CLC","U026LNDQB"],"topic":{"value":"","creator":"","last_set":"0"},"purpose":{"value":"","creator":"","last_set":"0"},"num_members":3},{"id":"C0294CFTJ","name":"starcraft","is_channel":true,"created":1398180301,"creator":"U026JL37B","is_archived":false,"is_general":false,"is_member":false,"members":["U026JL37B","U026K09CL","U026K0CLC"],"topic":{"value":"","creator":"","last_set":"0"},"purpose":{"value":"","creator":"","last_set":"0"},"num_members":3},{"id":"C02DUCS9W","name":"uspto","is_channel":true,"created":1405694325,"creator":"U026K09CL","is_archived":false,"is_general":false,"is_member":false,"members":["U026JJ2HH","U026K09CL","U026K0CLC","U02K9RJTP"],"topic":{"value":"","creator":"","last_set":"0"},"purpose":{"value":"","creator":"","last_set":"0"},"num_members":4},{"id":"C027LH86G","name":"vim","is_channel":true,"created":1396289943,"creator":"U026JJ2HH","is_archived":false,"is_general":false,"is_member":false,"members":[],"topic":{"value":"","creator":"","last_set":"0"},"purpose":{"value":"","creator":"","last_set":"0"},"num_members":0},{"id":"C028ZJFRX","name":"_freenode","is_channel":true,"created":1397766131,"creator":"U026JJ2HH","is_archived":false,"is_general":false,"is_member":false,"members":[],"topic":{"value":"","creator":"","last_set":"0"},"purpose":{"value":"","creator":"","last_set":"0"},"num_members":0}]}'
|
103
|
+
http_version:
|
104
|
+
recorded_at: Thu, 25 Sep 2014 12:05:03 GMT
|
105
|
+
recorded_with: VCR 2.9.3
|
@@ -0,0 +1,95 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: get
|
5
|
+
uri: https://isotope11.slack.com/api/chat.postMessage?channel=C026VKGP7&text=hello,%20this%20is%20a%20test&token=a-totally-legit-token
|
6
|
+
body:
|
7
|
+
encoding: US-ASCII
|
8
|
+
string: ''
|
9
|
+
headers:
|
10
|
+
Accept-Encoding:
|
11
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
12
|
+
Accept:
|
13
|
+
- "*/*"
|
14
|
+
User-Agent:
|
15
|
+
- Ruby
|
16
|
+
response:
|
17
|
+
status:
|
18
|
+
code: 200
|
19
|
+
message: OK
|
20
|
+
headers:
|
21
|
+
Access-Control-Allow-Origin:
|
22
|
+
- "*"
|
23
|
+
Content-Type:
|
24
|
+
- application/json; charset=utf-8
|
25
|
+
Date:
|
26
|
+
- Thu, 25 Sep 2014 02:22:54 GMT
|
27
|
+
Server:
|
28
|
+
- Apache
|
29
|
+
Strict-Transport-Security:
|
30
|
+
- max-age=31536000; includeSubDomains
|
31
|
+
Vary:
|
32
|
+
- Accept-Encoding
|
33
|
+
X-Xss-Protection:
|
34
|
+
- '0'
|
35
|
+
Content-Length:
|
36
|
+
- '55'
|
37
|
+
Connection:
|
38
|
+
- keep-alive
|
39
|
+
body:
|
40
|
+
encoding: UTF-8
|
41
|
+
string: '{"ok":false,"error":"invalid_auth"}'
|
42
|
+
http_version:
|
43
|
+
recorded_at: Thu, 25 Sep 2014 02:22:54 GMT
|
44
|
+
- request:
|
45
|
+
method: get
|
46
|
+
uri: https://isotope11.slack.com/api/chat.postMessage?channel=C026VKGP7&text=hello,%20this%20is%20a%20test&token=xoxp-2223009426-2222616703-2700726491-4a3e8d
|
47
|
+
body:
|
48
|
+
encoding: US-ASCII
|
49
|
+
string: ''
|
50
|
+
headers:
|
51
|
+
Accept-Encoding:
|
52
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
53
|
+
Accept:
|
54
|
+
- "*/*"
|
55
|
+
User-Agent:
|
56
|
+
- Ruby
|
57
|
+
response:
|
58
|
+
status:
|
59
|
+
code: 200
|
60
|
+
message: OK
|
61
|
+
headers:
|
62
|
+
Access-Control-Allow-Origin:
|
63
|
+
- "*"
|
64
|
+
Cache-Control:
|
65
|
+
- private, no-cache, no-store, must-revalidate
|
66
|
+
Content-Type:
|
67
|
+
- application/json; charset=utf-8
|
68
|
+
Date:
|
69
|
+
- Thu, 25 Sep 2014 12:05:14 GMT
|
70
|
+
Expires:
|
71
|
+
- Mon, 26 Jul 1997 05:00:00 GMT
|
72
|
+
Pragma:
|
73
|
+
- no-cache
|
74
|
+
Server:
|
75
|
+
- Apache
|
76
|
+
Strict-Transport-Security:
|
77
|
+
- max-age=31536000; includeSubDomains
|
78
|
+
Vary:
|
79
|
+
- Accept-Encoding
|
80
|
+
X-Accepted-Oauth-Scopes:
|
81
|
+
- post
|
82
|
+
X-Oauth-Scopes:
|
83
|
+
- identify,read,post,client
|
84
|
+
X-Xss-Protection:
|
85
|
+
- '0'
|
86
|
+
Content-Length:
|
87
|
+
- '74'
|
88
|
+
Connection:
|
89
|
+
- keep-alive
|
90
|
+
body:
|
91
|
+
encoding: UTF-8
|
92
|
+
string: '{"ok":true,"channel":"C026VKGP7","ts":"1411646714.000002"}'
|
93
|
+
http_version:
|
94
|
+
recorded_at: Thu, 25 Sep 2014 12:05:17 GMT
|
95
|
+
recorded_with: VCR 2.9.3
|
@@ -0,0 +1,146 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: get
|
5
|
+
uri: https://isotope11.slack.com/api/chat.delete?channel=C026VKGP7&token=a-totally-legit-token&ts=p1411610299.000006
|
6
|
+
body:
|
7
|
+
encoding: US-ASCII
|
8
|
+
string: ''
|
9
|
+
headers:
|
10
|
+
Accept-Encoding:
|
11
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
12
|
+
Accept:
|
13
|
+
- "*/*"
|
14
|
+
User-Agent:
|
15
|
+
- Ruby
|
16
|
+
response:
|
17
|
+
status:
|
18
|
+
code: 200
|
19
|
+
message: OK
|
20
|
+
headers:
|
21
|
+
Access-Control-Allow-Origin:
|
22
|
+
- "*"
|
23
|
+
Content-Type:
|
24
|
+
- application/json; charset=utf-8
|
25
|
+
Date:
|
26
|
+
- Thu, 25 Sep 2014 02:22:54 GMT
|
27
|
+
Server:
|
28
|
+
- Apache
|
29
|
+
Strict-Transport-Security:
|
30
|
+
- max-age=31536000; includeSubDomains
|
31
|
+
Vary:
|
32
|
+
- Accept-Encoding
|
33
|
+
X-Xss-Protection:
|
34
|
+
- '0'
|
35
|
+
Content-Length:
|
36
|
+
- '55'
|
37
|
+
Connection:
|
38
|
+
- keep-alive
|
39
|
+
body:
|
40
|
+
encoding: UTF-8
|
41
|
+
string: '{"ok":false,"error":"invalid_auth"}'
|
42
|
+
http_version:
|
43
|
+
recorded_at: Thu, 25 Sep 2014 02:22:54 GMT
|
44
|
+
- request:
|
45
|
+
method: get
|
46
|
+
uri: https://isotope11.slack.com/api/chat.delete?channel=C026VKGP7&token=xoxp-2223009426-2222616703-2700726491-4a3e8d&ts=p1411610299.000006
|
47
|
+
body:
|
48
|
+
encoding: US-ASCII
|
49
|
+
string: ''
|
50
|
+
headers:
|
51
|
+
Accept-Encoding:
|
52
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
53
|
+
Accept:
|
54
|
+
- "*/*"
|
55
|
+
User-Agent:
|
56
|
+
- Ruby
|
57
|
+
response:
|
58
|
+
status:
|
59
|
+
code: 200
|
60
|
+
message: OK
|
61
|
+
headers:
|
62
|
+
Access-Control-Allow-Origin:
|
63
|
+
- "*"
|
64
|
+
Cache-Control:
|
65
|
+
- private, no-cache, no-store, must-revalidate
|
66
|
+
Content-Type:
|
67
|
+
- application/json; charset=utf-8
|
68
|
+
Date:
|
69
|
+
- Thu, 25 Sep 2014 12:05:29 GMT
|
70
|
+
Expires:
|
71
|
+
- Mon, 26 Jul 1997 05:00:00 GMT
|
72
|
+
Pragma:
|
73
|
+
- no-cache
|
74
|
+
Server:
|
75
|
+
- Apache
|
76
|
+
Strict-Transport-Security:
|
77
|
+
- max-age=31536000; includeSubDomains
|
78
|
+
Vary:
|
79
|
+
- Accept-Encoding
|
80
|
+
X-Accepted-Oauth-Scopes:
|
81
|
+
- post
|
82
|
+
X-Oauth-Scopes:
|
83
|
+
- identify,read,post,client
|
84
|
+
X-Xss-Protection:
|
85
|
+
- '0'
|
86
|
+
Content-Length:
|
87
|
+
- '62'
|
88
|
+
Connection:
|
89
|
+
- keep-alive
|
90
|
+
body:
|
91
|
+
encoding: UTF-8
|
92
|
+
string: '{"ok":false,"error":"cant_delete_message"}'
|
93
|
+
http_version:
|
94
|
+
recorded_at: Thu, 25 Sep 2014 12:05:29 GMT
|
95
|
+
- request:
|
96
|
+
method: get
|
97
|
+
uri: https://isotope11.slack.com/api/chat.delete?channel=C026VKGP7&token=xoxp-2223009426-2222616703-2700726491-4a3e8d&ts=p1411646714.000002
|
98
|
+
body:
|
99
|
+
encoding: US-ASCII
|
100
|
+
string: ''
|
101
|
+
headers:
|
102
|
+
Accept-Encoding:
|
103
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
104
|
+
Accept:
|
105
|
+
- "*/*"
|
106
|
+
User-Agent:
|
107
|
+
- Ruby
|
108
|
+
response:
|
109
|
+
status:
|
110
|
+
code: 200
|
111
|
+
message: OK
|
112
|
+
headers:
|
113
|
+
Access-Control-Allow-Origin:
|
114
|
+
- "*"
|
115
|
+
Cache-Control:
|
116
|
+
- private, no-cache, no-store, must-revalidate
|
117
|
+
Content-Type:
|
118
|
+
- application/json; charset=utf-8
|
119
|
+
Date:
|
120
|
+
- Thu, 25 Sep 2014 12:05:56 GMT
|
121
|
+
Expires:
|
122
|
+
- Mon, 26 Jul 1997 05:00:00 GMT
|
123
|
+
Pragma:
|
124
|
+
- no-cache
|
125
|
+
Server:
|
126
|
+
- Apache
|
127
|
+
Strict-Transport-Security:
|
128
|
+
- max-age=31536000; includeSubDomains
|
129
|
+
Vary:
|
130
|
+
- Accept-Encoding
|
131
|
+
X-Accepted-Oauth-Scopes:
|
132
|
+
- post
|
133
|
+
X-Oauth-Scopes:
|
134
|
+
- identify,read,post,client
|
135
|
+
X-Xss-Protection:
|
136
|
+
- '0'
|
137
|
+
Content-Length:
|
138
|
+
- '62'
|
139
|
+
Connection:
|
140
|
+
- keep-alive
|
141
|
+
body:
|
142
|
+
encoding: UTF-8
|
143
|
+
string: '{"ok":true,"channel":"C026VKGP7", "ts": "p1411646714.000002"}'
|
144
|
+
http_version:
|
145
|
+
recorded_at: Thu, 25 Sep 2014 12:05:56 GMT
|
146
|
+
recorded_with: VCR 2.9.3
|
data/spec/fixtures/vcr_cassettes/Layabout_FileList/_list/returns_a_list_of_Layabout_Slack_File.yml
ADDED
@@ -0,0 +1,57 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: get
|
5
|
+
uri: https://isotope11.slack.com/api/files.list?count=1&token=xoxp-2223009426-2222616703-2700726491-4a3e8d
|
6
|
+
body:
|
7
|
+
encoding: US-ASCII
|
8
|
+
string: ''
|
9
|
+
headers:
|
10
|
+
Accept-Encoding:
|
11
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
12
|
+
Accept:
|
13
|
+
- "*/*"
|
14
|
+
User-Agent:
|
15
|
+
- Ruby
|
16
|
+
response:
|
17
|
+
status:
|
18
|
+
code: 200
|
19
|
+
message: OK
|
20
|
+
headers:
|
21
|
+
Access-Control-Allow-Origin:
|
22
|
+
- "*"
|
23
|
+
Cache-Control:
|
24
|
+
- private, no-cache, no-store, must-revalidate
|
25
|
+
Content-Type:
|
26
|
+
- application/json; charset=utf-8
|
27
|
+
Date:
|
28
|
+
- Fri, 26 Sep 2014 12:22:16 GMT
|
29
|
+
Expires:
|
30
|
+
- Mon, 26 Jul 1997 05:00:00 GMT
|
31
|
+
Pragma:
|
32
|
+
- no-cache
|
33
|
+
Server:
|
34
|
+
- Apache
|
35
|
+
Strict-Transport-Security:
|
36
|
+
- max-age=31536000; includeSubDomains
|
37
|
+
Vary:
|
38
|
+
- Accept-Encoding
|
39
|
+
X-Accepted-Oauth-Scopes:
|
40
|
+
- read
|
41
|
+
X-Oauth-Scopes:
|
42
|
+
- identify,read,post,client
|
43
|
+
X-Xss-Protection:
|
44
|
+
- '0'
|
45
|
+
Content-Length:
|
46
|
+
- '600'
|
47
|
+
Connection:
|
48
|
+
- keep-alive
|
49
|
+
body:
|
50
|
+
encoding: UTF-8
|
51
|
+
string: '{"ok":true,"files":[{"id":"F02M13E6D","timestamp":1411680242,"name":"Screen
|
52
|
+
Shot 2014-09-25 at 4.22.36 PM.png","title":"Screen Shot 2014-09-25 at 4.22.36
|
53
|
+
PM.png","mimetype":"image\/png","filetype":"png","pretty_type":"PNG","user":"U02K9RJTP","editable":false,"size":792545,"mode":"hosted","is_external":false,"external_type":"","is_public":true,"public_url_shared":false,"url":"https:\/\/slack-files.com\/files-pub\/T026K09CJ-F02M13E6D-5d26b9\/screen_shot_2014-09-25_at_4.22.36_pm.png","url_download":"https:\/\/slack-files.com\/files-pub\/T026K09CJ-F02M13E6D-5d26b9\/download\/screen_shot_2014-09-25_at_4.22.36_pm.png","url_private":"https:\/\/files.slack.com\/files-pri\/T026K09CJ-F02M13E6D\/screen_shot_2014-09-25_at_4.22.36_pm.png","url_private_download":"https:\/\/files.slack.com\/files-pri\/T026K09CJ-F02M13E6D\/download\/screen_shot_2014-09-25_at_4.22.36_pm.png","thumb_64":"https:\/\/slack-files.com\/files-tmb\/T026K09CJ-F02M13E6D-2df154\/screen_shot_2014-09-25_at_4.22.36_pm_64.png","thumb_80":"https:\/\/slack-files.com\/files-tmb\/T026K09CJ-F02M13E6D-2df154\/screen_shot_2014-09-25_at_4.22.36_pm_80.png","thumb_360":"https:\/\/slack-files.com\/files-tmb\/T026K09CJ-F02M13E6D-2df154\/screen_shot_2014-09-25_at_4.22.36_pm_360.png","thumb_360_w":269,"thumb_360_h":360,"image_exif_rotation":1,"permalink":"https:\/\/isotope11.slack.com\/files\/bradleyprice\/F02M13E6D\/screen_shot_2014-09-25_at_4.22.36_pm.png","permalink_public":"https:\/\/slack-files.com\/T026K09CJ-F02M13E6D-5d26b9","channels":["C026K09CQ"],"groups":[],"ims":[],"comments_count":1,"initial_comment":{"id":"Fc02M2CDMA","timestamp":1411680247,"user":"U02K9RJTP","comment":"it''s
|
54
|
+
a western danger zone, starring Clint Eastwood:"}}],"paging":{"count":1,"total":225,"page":1,"pages":225}}'
|
55
|
+
http_version:
|
56
|
+
recorded_at: Fri, 26 Sep 2014 12:22:16 GMT
|
57
|
+
recorded_with: VCR 2.9.3
|
@@ -0,0 +1,65 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: post
|
5
|
+
uri: https://isotope11.slack.com/api/files.upload
|
6
|
+
body:
|
7
|
+
encoding: UTF-8
|
8
|
+
string: "-------------RubyMultipartPost\r\nContent-Disposition: form-data; name=\"file\";
|
9
|
+
filename=\"Gemfile\"\r\nContent-Length: 12\r\nContent-Type: text/plain\r\nContent-Transfer-Encoding:
|
10
|
+
binary\r\n\r\nHello world\n\r\n-------------RubyMultipartPost\r\nContent-Disposition:
|
11
|
+
form-data; name=\"token\"\r\n\r\nxoxp-2223009426-2222616703-2700726491-4a3e8d\r\n-------------RubyMultipartPost\r\nContent-Disposition:
|
12
|
+
form-data; name=\"channels\"\r\n\r\nC026VKGP7\r\n-------------RubyMultipartPost--\r\n\r\n"
|
13
|
+
headers:
|
14
|
+
Accept-Encoding:
|
15
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
16
|
+
Accept:
|
17
|
+
- "*/*"
|
18
|
+
User-Agent:
|
19
|
+
- Ruby
|
20
|
+
Content-Type:
|
21
|
+
- multipart/form-data; boundary=-----------RubyMultipartPost
|
22
|
+
Content-Length:
|
23
|
+
- '450'
|
24
|
+
response:
|
25
|
+
status:
|
26
|
+
code: 200
|
27
|
+
message: OK
|
28
|
+
headers:
|
29
|
+
Access-Control-Allow-Origin:
|
30
|
+
- "*"
|
31
|
+
Cache-Control:
|
32
|
+
- private, no-cache, no-store, must-revalidate
|
33
|
+
Content-Type:
|
34
|
+
- application/json; charset=utf-8
|
35
|
+
Date:
|
36
|
+
- Thu, 25 Sep 2014 13:45:42 GMT
|
37
|
+
Expires:
|
38
|
+
- Mon, 26 Jul 1997 05:00:00 GMT
|
39
|
+
Pragma:
|
40
|
+
- no-cache
|
41
|
+
Server:
|
42
|
+
- Apache
|
43
|
+
Strict-Transport-Security:
|
44
|
+
- max-age=31536000; includeSubDomains
|
45
|
+
Vary:
|
46
|
+
- Accept-Encoding
|
47
|
+
X-Accepted-Oauth-Scopes:
|
48
|
+
- post
|
49
|
+
X-Oauth-Scopes:
|
50
|
+
- identify,read,post,client
|
51
|
+
X-Xss-Protection:
|
52
|
+
- '0'
|
53
|
+
Content-Length:
|
54
|
+
- '489'
|
55
|
+
Connection:
|
56
|
+
- keep-alive
|
57
|
+
body:
|
58
|
+
encoding: UTF-8
|
59
|
+
string: '{"ok":true,"file":{"id":"F02LZFDSE","timestamp":1411652742,"name":"Gemfile","title":"Gemfile","mimetype":"text\/plain","filetype":"text","pretty_type":"Plain
|
60
|
+
Text","user":"U026JJ4LP","editable":true,"size":12,"mode":"snippet","is_external":false,"external_type":"","is_public":true,"public_url_shared":false,"url":"https:\/\/slack-files.com\/files-pub\/T026K09CJ-F02LZFDSE-72ef07\/gemfile","url_download":"https:\/\/slack-files.com\/files-pub\/T026K09CJ-F02LZFDSE-72ef07\/download\/gemfile","url_private":"https:\/\/files.slack.com\/files-pri\/T026K09CJ-F02LZFDSE\/gemfile","url_private_download":"https:\/\/files.slack.com\/files-pri\/T026K09CJ-F02LZFDSE\/download\/gemfile","permalink":"https:\/\/isotope11.slack.com\/files\/jamescook\/F02LZFDSE\/gemfile","permalink_public":"https:\/\/slack-files.com\/T026K09CJ-F02LZFDSE-72ef07","edit_link":"https:\/\/isotope11.slack.com\/files\/jamescook\/F02LZFDSE\/gemfile\/edit","preview":"Hello
|
61
|
+
world\n","preview_highlight":"<div class=\"sssh-code\"><div class=\"sssh-line\"><pre>Hello
|
62
|
+
world<\/pre><\/div>\n<div class=\"sssh-line\"><pre><\/pre><\/div>\n<\/div>","lines":2,"lines_more":0,"channels":["C026VKGP7"],"groups":[],"ims":[],"comments_count":0}}'
|
63
|
+
http_version:
|
64
|
+
recorded_at: Thu, 25 Sep 2014 13:45:42 GMT
|
65
|
+
recorded_with: VCR 2.9.3
|