esa 1.4.0 → 1.5.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: a940e532ad9c9940ce7ea342758fc40ac149381d
4
- data.tar.gz: 2e5b75806f1f7fd5aae8a877b9d091e7f1553d86
3
+ metadata.gz: 7ad8f1ae7ea01801648babf0a505149f4aac9f95
4
+ data.tar.gz: 0d688dd113247228280a1ae7283040f79cc62695
5
5
  SHA512:
6
- metadata.gz: 26c3aa5977def8be9166c1586644740db89ed5793c677a0ffcde2f8cbf0a9572ece1e3cacad3e490019edf2fd59a6a3c77b7defae21f5910987d98fa4d023db8
7
- data.tar.gz: 73c60a6173fb1567d7f304fa9a81eb78c8ae8c0815796ad50d0243cd40f9b378244aea66786e849685176648d3a49b3dcc93cc858375b08962bd70606a94dec0
6
+ metadata.gz: 8609f4c5b3e4bd4eb623757098f28a45564d9492f46468f7f36f5d0e5cc28eeeb53b8f6ba516d4d3d26e0692750ce9766bf6862c6c8a0f69d7134531f8fb9a5a
7
+ data.tar.gz: 9ed0be20c50a41ebe42b9a04c60db074a22b0cf3255c7cf69c6497791ba0035be136c70fe09c7a3dcb8e601732364ef2f6da227c4b2e5522d05c43219f904ebf
data/.travis.yml CHANGED
@@ -1,5 +1,5 @@
1
1
  language: ruby
2
2
  rvm:
3
- - 2.0.0
4
- - 2.1
5
- - 2.2
3
+ - 2.2.5
4
+ - 2.3.1
5
+ - ruby-head
data/CHANGELOG.md CHANGED
@@ -1,3 +1,6 @@
1
+ ## 1.5.0 (2016-05-05)
2
+ - add: [Add Reaction APIs: star&watch by fukayatsu · Pull Request #20 · esaio/esa-ruby](https://github.com/esaio/esa-ruby/pull/20)
3
+
1
4
  ## 1.4.0 (2016-04-17)
2
5
  - add: [Add Authenticated User API by fukayatsu · Pull Request #19 · esaio/esa-ruby](https://github.com/esaio/esa-ruby/pull/19)
3
6
 
data/README.md CHANGED
@@ -87,6 +87,38 @@ client.create_sharing(post_number)
87
87
  client.delete_sharing(post_number)
88
88
  #=> DELETE /v1/teams/foobar/posts/1/sharing
89
89
 
90
+
91
+ # Star API
92
+ client.post_stargazers(post_number)
93
+ #=> GET /v1/teams/foobar/posts/1/stargazers
94
+
95
+ client.add_post_star(post_number)
96
+ #=> POST /v1/teams/foobar/posts/1/star
97
+
98
+ client.delete_post_star(post_number)
99
+ #=> DELETE /v1/teams/foobar/posts/1/star
100
+
101
+ client.comment_stargazers(comment_id)
102
+ #=> GET /v1/teams/foobar/comments/123/stargazers
103
+
104
+ client.add_comment_star(comment_id)
105
+ #=> POST /v1/teams/foobar/comments/123/star
106
+
107
+ client.delete_comment_star(comment_id)
108
+ #=> DELETE /v1/teams/foobar/comments/123/star
109
+
110
+
111
+ # Watch API
112
+ client.watchers(post_number)
113
+ #=> GET /v1/teams/foobar/posts/1/watchers
114
+
115
+ client.add_watch(post_number)
116
+ #=> POST /v1/teams/foobar/posts/1/watch
117
+
118
+ client.delete_watch(post_number)
119
+ #=> DELETE /v1/teams/foobar/posts/1/watch
120
+
121
+
90
122
  # Upload Attachment(beta)
91
123
  client.upload_attachment('/Users/foo/Desktop/foo.png') # Path
92
124
  client.upload_attachment(File.open('/Users/foo/Desktop/foo.png')) # File
@@ -70,6 +70,42 @@ module Esa
70
70
  send_delete("/v1/teams/#{current_team!}/posts/#{post_number}/sharing", params, headers)
71
71
  end
72
72
 
73
+ def post_stargazers(post_number, params = nil, headers = nil)
74
+ send_get("/v1/teams/#{current_team!}/posts/#{post_number}/stargazers", params, headers)
75
+ end
76
+
77
+ def add_post_star(post_number, params = nil, headers = nil)
78
+ send_post("/v1/teams/#{current_team!}/posts/#{post_number}/star", params, headers)
79
+ end
80
+
81
+ def delete_post_star(post_number, params = nil, headers = nil)
82
+ send_delete("/v1/teams/#{current_team!}/posts/#{post_number}/star", params, headers)
83
+ end
84
+
85
+ def comment_stargazers(comment_id, params = nil, headers = nil)
86
+ send_get("/v1/teams/#{current_team!}/comments/#{comment_id}/stargazers", params, headers)
87
+ end
88
+
89
+ def add_comment_star(comment_id, params = nil, headers = nil)
90
+ send_post("/v1/teams/#{current_team!}/comments/#{comment_id}/star", params, headers)
91
+ end
92
+
93
+ def delete_comment_star(comment_id, params = nil, headers = nil)
94
+ send_delete("/v1/teams/#{current_team!}/comments/#{comment_id}/star", params, headers)
95
+ end
96
+
97
+ def watchers(post_number, params = nil, headers = nil)
98
+ send_get("/v1/teams/#{current_team!}/posts/#{post_number}/watchers", params, headers)
99
+ end
100
+
101
+ def add_watch(post_number, params = nil, headers = nil)
102
+ send_post("/v1/teams/#{current_team!}/posts/#{post_number}/watch", params, headers)
103
+ end
104
+
105
+ def delete_watch(post_number, params = nil, headers = nil)
106
+ send_delete("/v1/teams/#{current_team!}/posts/#{post_number}/watch", params, headers)
107
+ end
108
+
73
109
  class PathStringIO < StringIO
74
110
  attr_accessor :path
75
111
 
data/lib/esa/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Esa
2
- VERSION = '1.4.0'
2
+ VERSION = '1.5.0'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: esa
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.4.0
4
+ version: 1.5.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - fukayatsu
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-04-17 00:00:00.000000000 Z
11
+ date: 2016-05-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday