dyte 0.3.0 → 0.4.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: bb0e6b7dd2bbfbe01192bf25c4172c482cab0214fc93071f83c3a9b2ddcbe0ba
4
- data.tar.gz: 79bae7af5887bb11aebe10e6c6a227cf977546014498c3a25fe7cff93e2b411b
3
+ metadata.gz: 4a5d981cb8c17293844f20470a740feac7186a98972738953d577556a3ca4209
4
+ data.tar.gz: 7abcfdf01e069f3d2154bab0d3cb6e85998d6efb081ecde99aa73fd6fae2d798
5
5
  SHA512:
6
- metadata.gz: 00bcc5e262e6d8d52203e64de30e85f40e4166d29cdf409342d645fe06472332b829324ae51b5f33b15cb083cc7dcd31dccd6cfbfe644ca6d1952aeccdc1a50e
7
- data.tar.gz: aabdec40c608104026629c8ed432f351d680afdef9186483230bcdb1ba640c5b92cf4eeece0fe7d64c20fe9a59e1b72aef82b2d542c4197568ff10008b7d3710
6
+ metadata.gz: 69db806b1c84d4c63285eba5c0b2e6b89761e261c22c505acbd3d5af53978b472d2fcf29ce75dc726ce7565484fbb936bdfce15212b089a326694eb8ef850c0b
7
+ data.tar.gz: f154f710ec7618c9d8735afb9a47099419e2a92ee327f65e4cdef242fd2fd8d1c0d24ce49bd50653c819c2d9484daaea1e396ef38aee867a7dd43282a0b97f9c
data/README.md CHANGED
@@ -1,9 +1,9 @@
1
1
  # Dyte
2
2
 
3
3
  A gem that wraps v2 of the [Dyte API](https://docs.dyte.io/api/#/) to make it easy to use in Ruby applications.
4
- Please note that some resources are not yet implemented. This is due to the fact that v2 of the Dyte API is incomplete. Once the Dyte team has finalized the response structure the remaining resources will be implemented.
4
+ Please note that some resources are not yet implemented. This is due to the fact that v2 of the Dyte API is incomplete. Once the Dyte team has finalized the response structure the remaining resources will be implemented. In order to obtain access to v2 of the Dyte API please contact the Dyte team.
5
5
 
6
- Bugs reports and pull requests are welcome! ❤️
6
+ Issues and pull requests are welcome! ❤️
7
7
 
8
8
  ## Installation
9
9
 
@@ -25,15 +25,30 @@ Or install it yourself as:
25
25
  TODO: Write usage instructions here
26
26
 
27
27
  ## Resources
28
+
28
29
  ### Meetings
30
+
29
31
  ```ruby
32
+ # Returns all meetings in an organization.
30
33
  client.meetings.list
34
+
35
+ # Returns a meeting in an organization for the given meeting ID.
31
36
  client.meetings.fetch(meeting_id: "id")
37
+
38
+ # Creates a meeting in an organization.
32
39
  client.meetings.create({})
40
+
41
+ # Updates a meeting in an organization for the given meeting ID.
33
42
  client.meetings.update(meeting_id: "id", {})
43
+
44
+ # Regenerates participant's authentication token for the given meeting and participant ID.
34
45
  client.meetings.regenerate_token(meeting_id: "id", participant_id: "id")
46
+
47
+ # Returns all participants for the given meeting ID.
48
+ client.meetings.fetch_participants(meeting_id: "id")
35
49
  ```
36
50
  ### Presets
51
+
37
52
  ```ruby
38
53
  client.presets.list
39
54
  client.presets.fetch(preset_id: "id")
@@ -41,6 +56,7 @@ client.presets.create({})
41
56
  client.presets.update(preset_id: "id", {})
42
57
  ```
43
58
  ### Sessions
59
+
44
60
  ```ruby
45
61
  client.sessions.list
46
62
  client.sessions.fetch(session_id: "id")
@@ -52,9 +68,7 @@ client.sessions.chat_messages(session_id: "id")
52
68
 
53
69
  ## Development
54
70
 
55
- After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
56
-
57
- To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and the created tag, and push the `.gem` file to [rubygems.org](https://rubygems.org).
71
+ 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.
58
72
 
59
73
  ## Contributing
60
74
 
@@ -24,5 +24,14 @@ module Dyte
24
24
  def regenerate_token(meeting_id:, participant_id:, **attributes)
25
25
  Meeting.new post_request("meetings/#{meeting_id}/participants/#{participant_id}/token", body: attributes).body.dig("data")
26
26
  end
27
+
28
+ def fetch_participants(meeting_id:)
29
+ response = get_request("meetings/#{meeting_id}/participants")
30
+ Collection.from_response(response, type: Participant)
31
+ end
32
+
33
+ def delete_participant(meeting_id:, participant_id:)
34
+ delete_request("meetings/#{meeting_id}/participants/#{participant_id}")
35
+ end
27
36
  end
28
37
  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.3.0"
4
+ VERSION = "0.4.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.3.0
4
+ version: 0.4.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-06 00:00:00.000000000 Z
11
+ date: 2023-08-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday
@@ -87,7 +87,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
87
87
  - !ruby/object:Gem::Version
88
88
  version: '0'
89
89
  requirements: []
90
- rubygems_version: 3.4.10
90
+ rubygems_version: 3.4.19
91
91
  signing_key:
92
92
  specification_version: 4
93
93
  summary: A simple wrapper for the Dyte API.