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 +4 -4
- data/Gemfile +1 -1
- data/README.md +6 -0
- data/lib/dyte/client.rb +0 -10
- data/lib/dyte/resources/meetings.rb +11 -1
- data/lib/dyte/resources/sessions.rb +2 -2
- data/lib/dyte/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c52eb75aa2c387f5d6ba0a020774e39a0bc0fc4145e6d0479f517c4274c9ce03
|
4
|
+
data.tar.gz: 17a4c2efd7d7f5d0f66d82f3b23dda5de6fabba3a57688647f17503e3338010f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5424e1e0f338d08616eb5611f399d5260b0e20049df51c9b6c45c46d15c9bfa4cdb6be14a2fafab310e3ca3f601fc98b515b1c16329e0a06425e54886521cae0
|
7
|
+
data.tar.gz: bb4b863e2fdf39fce16854ad861e4849db76294f5dd03fd90e2fefe1ec4d2b864f5a5181e167a78f237c8c56b5a7b11be0fa2d4e2d4a9d160d214a0f7c85fa6a
|
data/Gemfile
CHANGED
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
|
-
|
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
|
-
|
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
|
-
|
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
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
|
+
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-
|
11
|
+
date: 2023-09-04 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: faraday
|