esa 1.10.0 → 1.11.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: e3dbe84bca099ee17b9abf5cb74ec3a8692dd605
4
- data.tar.gz: b25be6981c3d991d6e2cb71e363dc96d06e5aa7c
3
+ metadata.gz: de9f4d6bea6629f66867738d68d03d8c00140cb1
4
+ data.tar.gz: 31d87aeac8f8648a0710707e39de0cbd58be158c
5
5
  SHA512:
6
- metadata.gz: ed397b10a2338caf94f69631fb4430b88b9f01b42e7e4bcdfe521559b01fc9938eaf4bbf529962183b4f22f0d1012fab910d20fa29a469027310e0b9c93c5c78
7
- data.tar.gz: 5e774ba17f1ff6e70288acf14a2f099de7f8d0289bb12528b3b8fa026937c5eed52680f5dd7b357f8fd132fb3a325b26bd8ddc222a0ba249216a10bcc341a248
6
+ metadata.gz: 0eda2bf8da962bcbc9cfc22bfe951fcbe5429012945478bb2df461b452aae9abe7c5795cfa74497f39fc60d9cbf6fe384c6fb4fb2bcb0815fe260005adeb0df3
7
+ data.tar.gz: ec26545a4a158cea810ec6df83717241730d2dfdf202b7300ba3f28e9a345f8667ab1753be6361d5fd1b05ef93aec1d81a979a89f5df7e6e5c6bf473c263af7b
@@ -1,3 +1,6 @@
1
+ ## 1.11.0 (2017-09-04)
2
+ - add: [Support emoji API by ppworks · Pull Request #28 · esaio/esa-ruby](https://github.com/esaio/esa-ruby/pull/28)
3
+
1
4
  ## 1.10.0 (2017-08-22)
2
5
  - add: [Support invitation API by ppworks · Pull Request #27 · esaio/esa-ruby](https://github.com/esaio/esa-ruby/pull/27)
3
6
 
data/README.md CHANGED
@@ -145,6 +145,19 @@ client.send_invitation(emails)
145
145
  client.cancel_invitation(invitation_code)
146
146
  #=> DELETE /v1/teams/foobar/invitations/baz
147
147
 
148
+ # Emoji API
149
+ client.emojis
150
+ #=> GET /v1/teams/foobar/emojis
151
+
152
+ client.create_emoji(code: 'team_emoji', image: '/path/to/image')
153
+ #=> POST /v1/teams/foobar/emojis
154
+
155
+ client.create_emoji(code: 'alias_code', origin_code: 'team_emoji')
156
+ #=> POST /v1/teams/foobar/emojis
157
+
158
+ client.delete_emoji('team_emoji')
159
+ #=> DELETE /v1/teams/foobar/emojis/team_emoji
160
+
148
161
  # Upload Attachment(beta)
149
162
  client.upload_attachment('/Users/foo/Desktop/foo.png') # Path
150
163
  client.upload_attachment(File.open('/Users/foo/Desktop/foo.png')) # File
@@ -1,3 +1,4 @@
1
+ require 'base64'
1
2
  module Esa
2
3
  module ApiMethods
3
4
  HTTP_REGEX = %r{^https?://}
@@ -139,6 +140,19 @@ module Esa
139
140
  send_delete("/v1/teams/#{current_team!}/invitations/#{code}", params, headers)
140
141
  end
141
142
 
143
+ def emojis(params = nil, headers = nil)
144
+ send_get("/v1/teams/#{current_team}/emojis", params, headers)
145
+ end
146
+
147
+ def create_emoji(params = nil, headers = nil)
148
+ params[:image] = Base64.strict_encode64(File.read(params[:image])) if params[:image]
149
+ send_post("/v1/teams/#{current_team!}/emojis", wrap(params, :emoji), headers)
150
+ end
151
+
152
+ def delete_emoji(emoji_code, params = nil, headers = nil)
153
+ send_delete("/v1/teams/#{current_team!}/emojis/#{emoji_code}", params, headers)
154
+ end
155
+
142
156
  class PathStringIO < StringIO
143
157
  attr_accessor :path
144
158
 
@@ -1,3 +1,3 @@
1
1
  module Esa
2
- VERSION = '1.10.0'
2
+ VERSION = '1.11.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.10.0
4
+ version: 1.11.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - fukayatsu
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-08-22 00:00:00.000000000 Z
11
+ date: 2017-09-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday
@@ -238,7 +238,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
238
238
  version: '0'
239
239
  requirements: []
240
240
  rubyforge_project:
241
- rubygems_version: 2.6.11
241
+ rubygems_version: 2.6.13
242
242
  signing_key:
243
243
  specification_version: 4
244
244
  summary: esa API v1 client library, written in Ruby