dyte 0.4.0 → 0.6.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
  SHA256:
3
- metadata.gz: 4a5d981cb8c17293844f20470a740feac7186a98972738953d577556a3ca4209
4
- data.tar.gz: 7abcfdf01e069f3d2154bab0d3cb6e85998d6efb081ecde99aa73fd6fae2d798
3
+ metadata.gz: c52eb75aa2c387f5d6ba0a020774e39a0bc0fc4145e6d0479f517c4274c9ce03
4
+ data.tar.gz: 17a4c2efd7d7f5d0f66d82f3b23dda5de6fabba3a57688647f17503e3338010f
5
5
  SHA512:
6
- metadata.gz: 69db806b1c84d4c63285eba5c0b2e6b89761e261c22c505acbd3d5af53978b472d2fcf29ce75dc726ce7565484fbb936bdfce15212b089a326694eb8ef850c0b
7
- data.tar.gz: f154f710ec7618c9d8735afb9a47099419e2a92ee327f65e4cdef242fd2fd8d1c0d24ce49bd50653c819c2d9484daaea1e396ef38aee867a7dd43282a0b97f9c
6
+ metadata.gz: 5424e1e0f338d08616eb5611f399d5260b0e20049df51c9b6c45c46d15c9bfa4cdb6be14a2fafab310e3ca3f601fc98b515b1c16329e0a06425e54886521cae0
7
+ data.tar.gz: bb4b863e2fdf39fce16854ad861e4849db76294f5dd03fd90e2fefe1ec4d2b864f5a5181e167a78f237c8c56b5a7b11be0fa2d4e2d4a9d160d214a0f7c85fa6a
data/Gemfile CHANGED
@@ -7,7 +7,7 @@ gemspec
7
7
 
8
8
  group :development do
9
9
  gem "rake", "~> 13.0"
10
- gem "standard", "~> 1.24"
10
+ gem "standard"
11
11
  gem "minitest", "~> 5.17"
12
12
  gem "webmock", "~> 3.18"
13
13
  gem "solargraph", "~> 0.48.0"
data/README.md CHANGED
@@ -46,6 +46,12 @@ client.meetings.regenerate_token(meeting_id: "id", participant_id: "id")
46
46
 
47
47
  # Returns all participants for the given meeting ID.
48
48
  client.meetings.fetch_participants(meeting_id: "id")
49
+
50
+ # Returns a participant for the given meeting and participant ID.
51
+ client.meetings.fetch_participant_details(meeting_id: "id", participant_id: "id")
52
+
53
+ # Edits a participant for the given meeting and participant ID.
54
+ client.meetings.edit_participant_details(meeting_id: "id", participant_id: "id")
49
55
  ```
50
56
  ### Presets
51
57
 
data/lib/dyte/client.rb CHANGED
@@ -35,16 +35,6 @@ module Dyte
35
35
  ActiveSessionsResource.new(self)
36
36
  end
37
37
 
38
- def connection_v1
39
- @connection ||= Faraday.new("#{BASE_URL}/#{@organization_id}") do |conn|
40
- conn.headers["Authorization"] = @api_key
41
-
42
- conn.request :json
43
-
44
- conn.response :json, content_type: "application/json"
45
- end
46
- end
47
-
48
38
  def connection
49
39
  auth_token = Base64.strict_encode64("#{@organization_id}:#{@api_key}")
50
40
  @connection ||= Faraday.new(BASE_URL) do |conn|
@@ -22,7 +22,7 @@ module Dyte
22
22
  end
23
23
 
24
24
  def regenerate_token(meeting_id:, participant_id:, **attributes)
25
- Meeting.new post_request("meetings/#{meeting_id}/participants/#{participant_id}/token", body: attributes).body.dig("data")
25
+ post_request("meetings/#{meeting_id}/participants/#{participant_id}/token", body: attributes).body.dig("data")
26
26
  end
27
27
 
28
28
  def fetch_participants(meeting_id:)
@@ -33,5 +33,15 @@ module Dyte
33
33
  def delete_participant(meeting_id:, participant_id:)
34
34
  delete_request("meetings/#{meeting_id}/participants/#{participant_id}")
35
35
  end
36
+
37
+ def fetch_participant_details(meeting_id:, participant_id:)
38
+ response = get_request("meetings/#{meeting_id}/participants/#{participant_id}")
39
+ Participant.new response.body.dig("data")
40
+ end
41
+
42
+ def edit_participant_details(meeting_id:, participant_id:, attributes:)
43
+ response = patch_request("meetings/#{meeting_id}/participants/#{participant_id}", body: attributes)
44
+ Participant.new response.body.dig("data")
45
+ end
36
46
  end
37
47
  end
@@ -16,11 +16,11 @@ module Dyte
16
16
  end
17
17
 
18
18
  def participant_details(session_id:, participant_id:)
19
- Session.new get_request("sessions/#{session_id}/participants/#{participant_id}").body.dig("data")
19
+ get_request("sessions/#{session_id}/participants/#{participant_id}").body.dig("data")
20
20
  end
21
21
 
22
22
  def chat_messages(session_id:)
23
- Session.new get_request("sessions/#{session_id}/chat").body.dig("data")
23
+ get_request("sessions/#{session_id}/chat").body.dig("data")
24
24
  end
25
25
  end
26
26
  end
data/lib/dyte/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Dyte
4
- VERSION = "0.4.0"
4
+ VERSION = "0.6.0"
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dyte
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.0
4
+ version: 0.6.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nick Warwick
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2023-08-18 00:00:00.000000000 Z
11
+ date: 2023-09-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday