slack-api-wrapper 0.1.0 → 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 4f09a1ec435533832987741dbb6bb3c8f041c94d
4
- data.tar.gz: 8bb3fc0fc558d9ddf956e7ce49cc63bbbee35093
3
+ metadata.gz: ad3fff134968165b845e3c86776b1a8c6d37a746
4
+ data.tar.gz: b51a6a25afb9a162bd7eb20dafd6e907203dcf01
5
5
  SHA512:
6
- metadata.gz: 037aea41e976706faf3ac23e1fa9330b8fd2e1d732ec5a791998aa81cfafa2fd60cb6c45502b5e982e5c1affe562d258a9efa684fc1d4df5fcdbb7f2fa77e6bd
7
- data.tar.gz: 0647730f20756766677fb8b20adbc2b8031e969ede4832c76e31f59b2404b02f81899f81c567c8e55f78d277917002f4fb2566ba037ba978e70f199bdc3aa5cb
6
+ metadata.gz: 64565f41da5125ff6264e1c123a6c0d09bbe1c6e458f6ef8f872796aa828281ee5dfd2eea85d19fd98027c6faf00d57117c7c691f4845b2f9984070ae7d84e5c
7
+ data.tar.gz: f52c5d7886fa6a28d14f3597bbcafa837408391b350344ab730d42dfb9f1e762961b27c3ba2af2001fcec2862dfb56b22f8467ab6e10b764c2648c80026fd89c
@@ -1,3 +1,6 @@
1
+ ### 0.2.0 2015-09-29
2
+ * Add add and remove starts methods
3
+
1
4
  ### 0.1.0 2015-09-26
2
5
  * Remove oauth logic (use omniauth-slack instead)
3
6
  * Improve error handling and fix some bugs with them
@@ -3,5 +3,5 @@
3
3
 
4
4
  module Slack
5
5
  # The current version of the wrapper.
6
- VERSION = '0.1.0'.freeze
6
+ VERSION = '0.2.0'.freeze
7
7
  end
@@ -8,6 +8,25 @@ module Slack
8
8
  # Endpoint scope
9
9
  SCOPE = 'stars'
10
10
 
11
+ # This method adds a star to an item (message, file, file comment,
12
+ # channel, private group, or DM) on behalf of the authenticated user.
13
+ #
14
+ # @param [Hash] params
15
+ # API call arguments
16
+ # @option params [Object] 'file'
17
+ # File to add star to.
18
+ # @option params [Object] 'file_comment'
19
+ # File comment to add star to.
20
+ # @option params [Object] 'channel'
21
+ # Channel to add star to, or channel where the message to add star to was posted
22
+ # @option params [Object] 'timestamp'
23
+ # Timestamp of the message to add star to.
24
+ #
25
+ # @see https://api.slack.com/methods/stars.add
26
+ def stars_add(params = {})
27
+ response = @session.do_post "#{SCOPE}.add", params
28
+ Slack.parse_response(response)
29
+ end
11
30
  # Lists stars for a user.
12
31
  #
13
32
  # @param [Hash] params
@@ -24,6 +43,26 @@ module Slack
24
43
  response = @session.do_post "#{SCOPE}.list", params
25
44
  Slack.parse_response(response)
26
45
  end
46
+
47
+ # This method removes a star from an item (message, file, file comment,
48
+ # channel, private group, or DM) on behalf of the authenticated user.
49
+ #
50
+ # @param [Hash] params
51
+ # API call arguments
52
+ # @option params [Object] 'file'
53
+ # File to remove star from.
54
+ # @option params [Object] 'file_comment'
55
+ # File comment to remove star from.
56
+ # @option params [Object] 'channel'
57
+ # Channel to remove star from, or channel where the message to remove star from was posted.
58
+ # @option params [Object] 'timestamp'
59
+ # Timestamp of the message to remove star from.
60
+ #
61
+ # @see https://api.slack.com/methods/stars.remove
62
+ def stars_remove(params = {})
63
+ response = @session.do_post "#{SCOPE}.remove", params
64
+ Slack.parse_response(response)
65
+ end
27
66
  end
28
67
  end
29
68
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: slack-api-wrapper
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Gustavo Bazan
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-09-27 00:00:00.000000000 Z
11
+ date: 2015-09-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -180,7 +180,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
180
180
  version: '0'
181
181
  requirements: []
182
182
  rubyforge_project:
183
- rubygems_version: 2.4.6
183
+ rubygems_version: 2.4.3
184
184
  signing_key:
185
185
  specification_version: 4
186
186
  summary: Slack API Wrapper