Skip to content

Commit 83b2df7

Browse files
authored
Merge pull request #94 from 3scale/proxy-deploy
proxy deploy endpoint
2 parents f78b8d2 + 150189f commit 83b2df7

File tree

2 files changed

+18
-0
lines changed

2 files changed

+18
-0
lines changed

lib/3scale/api/client.rb

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -203,6 +203,15 @@ def update_proxy(service_id, attributes)
203203
extract(entity: 'proxy', from: response)
204204
end
205205

206+
# @api public
207+
# @return [Hash]
208+
# @param [Fixnum] service_id Service ID
209+
def proxy_deploy(service_id)
210+
response = http_client.post("/admin/api/services/#{service_id}/proxy/deploy",
211+
body: nil)
212+
extract(entity: 'proxy', from: response)
213+
end
214+
206215
# @api public
207216
# @return [Array<Hash>]
208217
# @param [Fixnum] service_id Service ID

spec/api/client_spec.rb

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1396,4 +1396,13 @@
13961396
expect(client.update_backend_usage(1, 200, attrs)).to eq(backend_usage_a)
13971397
end
13981398
end
1399+
1400+
context '#proxy_deploy' do
1401+
it do
1402+
expect(http_client).to receive(:post)
1403+
.with('/admin/api/services/4/proxy/deploy', body: nil)
1404+
.and_return('proxy' => {})
1405+
expect(client.proxy_deploy(4)).to eq({})
1406+
end
1407+
end
13991408
end

0 commit comments

Comments
 (0)