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 +4 -4
- data/CHANGELOG.md +3 -0
- data/README.md +13 -0
- data/lib/esa/api_methods.rb +14 -0
- data/lib/esa/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: de9f4d6bea6629f66867738d68d03d8c00140cb1
|
4
|
+
data.tar.gz: 31d87aeac8f8648a0710707e39de0cbd58be158c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0eda2bf8da962bcbc9cfc22bfe951fcbe5429012945478bb2df461b452aae9abe7c5795cfa74497f39fc60d9cbf6fe384c6fb4fb2bcb0815fe260005adeb0df3
|
7
|
+
data.tar.gz: ec26545a4a158cea810ec6df83717241730d2dfdf202b7300ba3f28e9a345f8667ab1753be6361d5fd1b05ef93aec1d81a979a89f5df7e6e5c6bf473c263af7b
|
data/CHANGELOG.md
CHANGED
@@ -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
|
data/lib/esa/api_methods.rb
CHANGED
@@ -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
|
|
data/lib/esa/version.rb
CHANGED
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
|
+
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-
|
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.
|
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
|