dyte 0.6.0 → 0.7.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: c52eb75aa2c387f5d6ba0a020774e39a0bc0fc4145e6d0479f517c4274c9ce03
4
- data.tar.gz: 17a4c2efd7d7f5d0f66d82f3b23dda5de6fabba3a57688647f17503e3338010f
3
+ metadata.gz: e6693cbed7d4a1985e073f15e4104417f5079ba7f8782a0310907ddeecd64e5d
4
+ data.tar.gz: 1f256ca55bf017fdc70241a78e7cf6c11fffa25f93444b10bb53b1cba42aae11
5
5
  SHA512:
6
- metadata.gz: 5424e1e0f338d08616eb5611f399d5260b0e20049df51c9b6c45c46d15c9bfa4cdb6be14a2fafab310e3ca3f601fc98b515b1c16329e0a06425e54886521cae0
7
- data.tar.gz: bb4b863e2fdf39fce16854ad861e4849db76294f5dd03fd90e2fefe1ec4d2b864f5a5181e167a78f237c8c56b5a7b11be0fa2d4e2d4a9d160d214a0f7c85fa6a
6
+ metadata.gz: da6f21955b8d98560996737d606c59e94a4501e08cbecdf412d06fa647fed5bd7f957e3232b712c620d48b994db986c79f6316321ae0d08e8a4c4633a0e23161
7
+ data.tar.gz: 4cdd75f5232992a43a128366f5771125a04cdfb84814fd97bdd030c6ffcd9bdaa22e2b982afd6c4545597aece28b8c11cf850482057736bac3a0ebc17b46d6ee
data/README.md CHANGED
@@ -52,6 +52,9 @@ client.meetings.fetch_participant_details(meeting_id: "id", participant_id: "id"
52
52
 
53
53
  # Edits a participant for the given meeting and participant ID.
54
54
  client.meetings.edit_participant_details(meeting_id: "id", participant_id: "id")
55
+
56
+ # Adds a participant to a meeting.
57
+ client.meetings.add_participant(meeting_id: "id", participant_id: "id")
55
58
  ```
56
59
  ### Presets
57
60
 
@@ -73,8 +76,15 @@ client.sessions.chat_messages(session_id: "id")
73
76
  ### Participants
74
77
 
75
78
  ## Development
79
+ ### Setup
80
+ After checking out the repo run `bin/setup` to install dependencies. Then, run `rake test` to run the tests.
81
+
82
+ ### Running Locally
83
+ It can be convenient to run the gem locally while developing, to test changes. To do so, follow these steps:
84
+ 1) Run `bin/console` from the root directory
85
+ 1) Instantiate the client (enter your Dyte credentials) `client = Client.new(organization_id: '1234', api_key: '1234')`
86
+ 1) Run a test command, for example: `client.participants.list(session_id: 1)`
76
87
 
77
- After checking out the repo run `bin/setup` to install dependencies. Then, run `rake test` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
78
88
 
79
89
  ## Contributing
80
90
 
data/lib/dyte/client.rb CHANGED
@@ -35,6 +35,10 @@ module Dyte
35
35
  ActiveSessionsResource.new(self)
36
36
  end
37
37
 
38
+ def organizations
39
+ OrganizationsResource.new(self)
40
+ end
41
+
38
42
  def connection
39
43
  auth_token = Base64.strict_encode64("#{@organization_id}:#{@api_key}")
40
44
  @connection ||= Faraday.new(BASE_URL) do |conn|
@@ -0,0 +1,4 @@
1
+ module Dyte
2
+ class Organization < Object
3
+ end
4
+ end
@@ -43,5 +43,10 @@ module Dyte
43
43
  response = patch_request("meetings/#{meeting_id}/participants/#{participant_id}", body: attributes)
44
44
  Participant.new response.body.dig("data")
45
45
  end
46
+
47
+ def add_participant(meeting_id:, **attributes)
48
+ response = post_request("meetings/#{meeting_id}/participants", body: attributes)
49
+ Participant.new response.body.dig("data")
50
+ end
46
51
  end
47
52
  end
@@ -0,0 +1,11 @@
1
+ module Dyte
2
+ class OrganizationsResource < Resource
3
+ def create(**attributes)
4
+ Organization.new post_request("orgs", body: attributes).body.dig("data")
5
+ end
6
+
7
+ def update(organization_id:, **attributes)
8
+ Organization.new patch_request("orgs/#{organization_id}", body: attributes).body.dig("data")
9
+ end
10
+ end
11
+ end
@@ -1,3 +1,5 @@
1
+ # This module is deprecated in favour of adding participant actions to the meetings resource. This is for the purpose
2
+ # of better following how Dyte's API is structured. This module will be removed in a future release.
1
3
  module Dyte
2
4
  class ParticipantsResource < Resource
3
5
  def list(session_id:, **params)
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.6.0"
4
+ VERSION = "0.7.0"
5
5
  end
data/lib/dyte.rb CHANGED
@@ -14,6 +14,7 @@ require "dyte/objects/participant"
14
14
  require "dyte/objects/session"
15
15
  require "dyte/objects/recording"
16
16
  require "dyte/objects/active_session"
17
+ require "dyte/objects/organization"
17
18
 
18
19
  # Resources
19
20
  require "dyte/resources/meetings"
@@ -22,6 +23,7 @@ require "dyte/resources/participants"
22
23
  require "dyte/resources/sessions"
23
24
  require "dyte/resources/recordings"
24
25
  require "dyte/resources/active_sessions"
26
+ require "dyte/resources/organizations"
25
27
 
26
28
  module Dyte
27
29
  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.6.0
4
+ version: 0.7.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-09-04 00:00:00.000000000 Z
11
+ date: 2023-10-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday
@@ -52,6 +52,7 @@ files:
52
52
  - lib/dyte/object.rb
53
53
  - lib/dyte/objects/active_session.rb
54
54
  - lib/dyte/objects/meeting.rb
55
+ - lib/dyte/objects/organization.rb
55
56
  - lib/dyte/objects/participant.rb
56
57
  - lib/dyte/objects/preset.rb
57
58
  - lib/dyte/objects/recording.rb
@@ -59,6 +60,7 @@ files:
59
60
  - lib/dyte/resource.rb
60
61
  - lib/dyte/resources/active_sessions.rb
61
62
  - lib/dyte/resources/meetings.rb
63
+ - lib/dyte/resources/organizations.rb
62
64
  - lib/dyte/resources/participants.rb
63
65
  - lib/dyte/resources/presets.rb
64
66
  - lib/dyte/resources/recordings.rb
@@ -87,7 +89,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
87
89
  - !ruby/object:Gem::Version
88
90
  version: '0'
89
91
  requirements: []
90
- rubygems_version: 3.4.19
92
+ rubygems_version: 3.4.17
91
93
  signing_key:
92
94
  specification_version: 4
93
95
  summary: A simple wrapper for the Dyte API.