Skip to content

Commit d6849bb

Browse files
committed
Merge pull request #90 from aoberoi/issue-88
stops sending action on archives.stop_by_id, fixes #88
2 parents f56d8c9 + 7201e8c commit d6849bb

File tree

2 files changed

+3
-7
lines changed

2 files changed

+3
-7
lines changed

Diff for: lib/opentok/client.rb

+2-3
Original file line numberDiff line numberDiff line change
@@ -85,8 +85,7 @@ def list_archives(offset, count)
8585
end
8686

8787
def stop_archive(archive_id)
88-
response = self.class.post("/v2/partner/#{@api_key}/archive/#{archive_id}", {
89-
:body => { "action" => "stop" }.to_json,
88+
response = self.class.post("/v2/partner/#{@api_key}/archive/#{archive_id}/stop", {
9089
:headers => { "Content-Type" => "application/json" }
9190
})
9291
case response.code
@@ -101,7 +100,7 @@ def stop_archive(archive_id)
101100
when 409
102101
raise OpenTokArchiveError, "The archive could not be stopped. The archive is not currently recording."
103102
else
104-
raise OpenTokArchiveError, "The archive could not be started."
103+
raise OpenTokArchiveError, "The archive could not be stopped."
105104
end
106105
end
107106

Diff for: spec/cassettes/OpenTok_Archives/should_stop_archives.yml

+1-4
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)