esa 1.9.0 → 1.10.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: b157f828f920f7a07b5dfea5b1fc91263d42c597
4
- data.tar.gz: 26121241f403dc6684de01be7aaf5df12c738d19
3
+ metadata.gz: e3dbe84bca099ee17b9abf5cb74ec3a8692dd605
4
+ data.tar.gz: b25be6981c3d991d6e2cb71e363dc96d06e5aa7c
5
5
  SHA512:
6
- metadata.gz: 7dac405ce86eb6037cc029451159b5a701d71192a80746b5828c492551b68079903ec4f99a73266a78d33f6d8cf48378722091c2f47a5355351935ba6b9d2799
7
- data.tar.gz: 5d3051d1a94f7f8b76644586dac627a13793d7495e6fa7ed18b6f4415069e94b2ec57eb87ce96148cff2d10cfeb68dac22a71147720d4a0834090b164fbb40aa
6
+ metadata.gz: ed397b10a2338caf94f69631fb4430b88b9f01b42e7e4bcdfe521559b01fc9938eaf4bbf529962183b4f22f0d1012fab910d20fa29a469027310e0b9c93c5c78
7
+ data.tar.gz: 5e774ba17f1ff6e70288acf14a2f099de7f8d0289bb12528b3b8fa026937c5eed52680f5dd7b357f8fd132fb3a325b26bd8ddc222a0ba249216a10bcc341a248
@@ -1,3 +1,6 @@
1
+ ## 1.10.0 (2017-08-22)
2
+ - add: [Support invitation API by ppworks · Pull Request #27 · esaio/esa-ruby](https://github.com/esaio/esa-ruby/pull/27)
3
+
1
4
  ## 1.9.0 (2017-08-02)
2
5
  - add: [Enable to set headers for remote url on #upload_attachment by nownabe · Pull Request #26 · esaio/esa-ruby](https://github.com/esaio/esa-ruby/pull/26)
3
6
 
data/README.md CHANGED
@@ -129,6 +129,22 @@ client.batch_move_category(from: '/esa/', to: '/tori/piyo/')
129
129
  client.tags
130
130
  #=> GET /v1/teams/foobar/tags
131
131
 
132
+ # Infitation API
133
+ client.invitation
134
+ #=> GET /v1/teams/foobar/invitation
135
+
136
+ client.regenerate_invitation
137
+ #=> POST /v1/teams/foobar/invitation_regenerator
138
+
139
+ client.pending_invitations
140
+ #=> GET /v1/teams/foobar/invitations
141
+
142
+ client.send_invitation(emails)
143
+ #=> POST /v1/teams/foobar/invitations
144
+
145
+ client.cancel_invitation(invitation_code)
146
+ #=> DELETE /v1/teams/foobar/invitations/baz
147
+
132
148
  # Upload Attachment(beta)
133
149
  client.upload_attachment('/Users/foo/Desktop/foo.png') # Path
134
150
  client.upload_attachment(File.open('/Users/foo/Desktop/foo.png')) # File
@@ -118,6 +118,27 @@ module Esa
118
118
  send_get("/v1/teams/#{current_team!}/tags", params, headers)
119
119
  end
120
120
 
121
+ def invitation(params = nil, headers = nil)
122
+ send_get("/v1/teams/#{current_team!}/invitation", params, headers)
123
+ end
124
+
125
+ def regenerate_invitation(params = nil, headers = nil)
126
+ send_post("/v1/teams/#{current_team!}/invitation_regenerator", params, headers)
127
+ end
128
+
129
+ def pending_invitations(params = nil, headers = nil)
130
+ send_get("/v1/teams/#{current_team!}/invitations", params, headers)
131
+ end
132
+
133
+ def send_invitation(emails, params = {}, headers = nil)
134
+ params = params.merge(member: { emails: emails } )
135
+ send_post("/v1/teams/#{current_team!}/invitations", params, headers)
136
+ end
137
+
138
+ def cancel_invitation(code, params = nil, headers = nil)
139
+ send_delete("/v1/teams/#{current_team!}/invitations/#{code}", params, headers)
140
+ end
141
+
121
142
  class PathStringIO < StringIO
122
143
  attr_accessor :path
123
144
 
@@ -1,3 +1,3 @@
1
1
  module Esa
2
- VERSION = '1.9.0'
2
+ VERSION = '1.10.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.9.0
4
+ version: 1.10.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-02 00:00:00.000000000 Z
11
+ date: 2017-08-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday