appwrite 30.7.0 → 30.8.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: aa89c91c10cf108a838123f7c9ffaadd5e19644dedb73929746e85815f378f09
4
- data.tar.gz: 548cea4bad55f57ba3159ecb59eed887ec1322ccf61c72e08dd84e9c552e7cf2
3
+ metadata.gz: 33d0e80cc05e1783003373d16a2e4b2e4792df6738318f6de5b95b1fd2e3a6ad
4
+ data.tar.gz: 3fcf50635cf5869d9a4a31c14887e1dc2837e77b4d6ee5b48122bb72ddbee380
5
5
  SHA512:
6
- metadata.gz: fd4fddd0a94e3d6d90daed745e72aee0a25987f0fe0b01f64a069f9e5f8d83b9c95cf3208000932bf7e9405ac9bdae3bee3a5de137e930b65ff9327435ca24eb
7
- data.tar.gz: acb6232e4855a83daf6300e9bbdecff156f084e186b23f3643f81ed2c38420aad55e50f554c712f78cd153acb8cdeb4f42ceedab7f415f07fa0f9ff4f7720e0f
6
+ metadata.gz: dd2b47ccf0bceea18a33da99dbd9977ac67779f3c8f096f8dfea53cd29e60720cdda76cb6acc2c9b76d932a0cea00b0965e8fabee972cc5aa78985610592c557
7
+ data.tar.gz: a78cff62ff03d97cfc47cef916ae4e4e0ab1c02cc5261ec3d2d2783771f1848e35e0f5bbaf18efbda688e267af19b9515c448f02b74857ff34fe4b5ed012e84e
@@ -14,7 +14,7 @@ module Appwrite
14
14
  'x-sdk-name' => 'Ruby',
15
15
  'x-sdk-platform' => 'server',
16
16
  'x-sdk-language' => 'ruby',
17
- 'x-sdk-version' => '30.7.0',
17
+ 'x-sdk-version' => '30.8.0',
18
18
  'X-Appwrite-Response-Format' => '2.7.2'
19
19
  }
20
20
  @endpoint = 'https://cloud.appwrite.io/v1'
@@ -115,7 +115,6 @@ module Appwrite
115
115
  REVIEWS_WRITE = 'reviews.write'
116
116
  PRESENCES_READ = 'presences.read'
117
117
  PRESENCES_WRITE = 'presences.write'
118
- VIDEOS_PLAY = 'videos.play'
119
118
  VIDEOS_READ = 'videos.read'
120
119
  VIDEOS_WRITE = 'videos.write'
121
120
  DEDICATEDDATABASES_EXECUTE = 'dedicatedDatabases.execute'
@@ -28,6 +28,7 @@ module Appwrite
28
28
  attr_reader :audio_sample_rate
29
29
  attr_reader :timeline_status
30
30
  attr_reader :timeline_error
31
+ attr_reader :renditions
31
32
 
32
33
  def initialize(
33
34
  id:,
@@ -54,7 +55,8 @@ module Appwrite
54
55
  audio_bit_rate:,
55
56
  audio_sample_rate:,
56
57
  timeline_status:,
57
- timeline_error:
58
+ timeline_error:,
59
+ renditions: []
58
60
  )
59
61
  @id = id
60
62
  @created_at = created_at
@@ -81,10 +83,11 @@ module Appwrite
81
83
  @audio_sample_rate = audio_sample_rate
82
84
  @timeline_status = validate_timeline_status(timeline_status)
83
85
  @timeline_error = timeline_error
86
+ @renditions = renditions
84
87
  end
85
88
 
86
89
  def self.from(map:)
87
- map = { "$id" => "", "$createdAt" => "", "$updatedAt" => "", "$permissions" => [], "bucketId" => "", "fileId" => "", "name" => "", "size" => 0, "format" => "", "duration" => 0, "width" => 0, "height" => 0, "aspectRatio" => "", "videoCodec" => "", "videoFormat" => "", "videoFormatProfile" => "", "videoBitRate" => 0, "videoFrameRate" => 0, "videoFrameRateMode" => "", "audioCodec" => "", "audioFormat" => "", "audioBitRate" => 0, "audioSampleRate" => 0, "timelineStatus" => "pending", "timelineError" => "" }.merge(map)
90
+ map = { "$id" => "", "$createdAt" => "", "$updatedAt" => "", "$permissions" => [], "bucketId" => "", "fileId" => "", "name" => "", "size" => 0, "format" => "", "duration" => 0, "width" => 0, "height" => 0, "aspectRatio" => "", "videoCodec" => "", "videoFormat" => "", "videoFormatProfile" => "", "videoBitRate" => 0, "videoFrameRate" => 0, "videoFrameRateMode" => "", "audioCodec" => "", "audioFormat" => "", "audioBitRate" => 0, "audioSampleRate" => 0, "timelineStatus" => "pending", "timelineError" => "", "renditions" => [] }.merge(map)
88
91
  Video.new(
89
92
  id: map["$id"],
90
93
  created_at: map["$createdAt"],
@@ -110,7 +113,8 @@ module Appwrite
110
113
  audio_bit_rate: map["audioBitRate"],
111
114
  audio_sample_rate: map["audioSampleRate"],
112
115
  timeline_status: map["timelineStatus"],
113
- timeline_error: map["timelineError"]
116
+ timeline_error: map["timelineError"],
117
+ renditions: map["renditions"].map { |it| VideoRendition.from(map: it) }
114
118
  )
115
119
  end
116
120
 
@@ -140,7 +144,8 @@ module Appwrite
140
144
  "audioBitRate": @audio_bit_rate,
141
145
  "audioSampleRate": @audio_sample_rate,
142
146
  "timelineStatus": @timeline_status,
143
- "timelineError": @timeline_error
147
+ "timelineError": @timeline_error,
148
+ "renditions": @renditions.map { |it| it.to_map }
144
149
  }
145
150
  end
146
151
 
@@ -6,12 +6,11 @@ module Appwrite
6
6
  @client = client
7
7
  end
8
8
 
9
- # Get a list of videos in the current project. Sessions receive only videos
10
- # they can read according to each video's `$permissions`. API keys and admins
11
- # receive the full project catalog. Playback uses the same document read ACL
12
- # plus the `videos.play` (or `videos.read`) scope: a guest can stream a video
13
- # that grants `read("any")` or `read("guests")` even though guests lack
14
- # `videos.read` and will not see it in this list.
9
+ # Get a list of videos in the current project. Sessions and guests receive
10
+ # only videos they can read according to each video's `$permissions`. API
11
+ # keys and admins receive the full project catalog. Each video includes its
12
+ # ready renditions. Guests hold `videos.read`, so a video that grants
13
+ # `read("any")` or `read("guests")` appears in this list and can be streamed.
15
14
  #
16
15
  #
17
16
  # @param [Array] queries Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: bucketId, fileId, name, size, format, duration, width, height, videoCodec, videoBitRate, audioCodec, audioBitRate, search
@@ -55,8 +54,8 @@ module Appwrite
55
54
  # `permissions` array sets the video document ACL (list, get, update, delete,
56
55
  # manage child resources, and playback). By default, only the current user is
57
56
  # granted all permissions; API keys and admins create with empty permissions
58
- # when omitted. Guests with `videos.play` can stream when the video grants
59
- # them read (`read("any")` or `read("guests")`).
57
+ # when omitted. Guests can stream when the video grants them read
58
+ # (`read("any")` or `read("guests")`).
60
59
  #
61
60
  # Uploaded caption files stay listed alongside auto-extracted tracks for the
62
61
  # same language; when the current default is an auto-extracted track with
@@ -140,7 +139,7 @@ module Appwrite
140
139
  end
141
140
 
142
141
  # Get a video by its unique ID. This endpoint response returns a JSON object
143
- # with the video metadata.
142
+ # with the video metadata, including ready renditions.
144
143
  #
145
144
  #
146
145
  # @param [String] video_id Video unique ID.
@@ -471,9 +470,9 @@ module Appwrite
471
470
  # playlist (`master.m3u8`) or a DASH MPD (`master.mpd`). Hand this URL to a
472
471
  # player to begin adaptive playback.
473
472
  #
474
- # Guests can request this URL when they hold `videos.play` (or `videos.read`)
475
- # **and** the video document grants them read. A video with `read("any")` or
476
- # `read("guests")` is playable without a session.
473
+ # Guests can request this URL when they hold `videos.read` **and** the video
474
+ # document grants them read. A video with `read("any")` or `read("guests")`
475
+ # is playable without a session.
477
476
  #
478
477
  # For CMAF renditions, use `getCmafHlsManifest` or `getCmafDashManifest`.
479
478
  # Both masters point at the same fMP4 segment set.
@@ -511,9 +510,9 @@ module Appwrite
511
510
  # playlist (`master.m3u8`) or a DASH MPD (`master.mpd`). Hand this URL to a
512
511
  # player to begin adaptive playback.
513
512
  #
514
- # Guests can request this URL when they hold `videos.play` (or `videos.read`)
515
- # **and** the video document grants them read. A video with `read("any")` or
516
- # `read("guests")` is playable without a session.
513
+ # Guests can request this URL when they hold `videos.read` **and** the video
514
+ # document grants them read. A video with `read("any")` or `read("guests")`
515
+ # is playable without a session.
517
516
  #
518
517
  # For CMAF renditions, use `getCmafHlsManifest` or `getCmafDashManifest`.
519
518
  # Both masters point at the same fMP4 segment set.
@@ -551,9 +550,9 @@ module Appwrite
551
550
  # playlist (`master.m3u8`) or a DASH MPD (`master.mpd`). Hand this URL to a
552
551
  # player to begin adaptive playback.
553
552
  #
554
- # Guests can request this URL when they hold `videos.play` (or `videos.read`)
555
- # **and** the video document grants them read. A video with `read("any")` or
556
- # `read("guests")` is playable without a session.
553
+ # Guests can request this URL when they hold `videos.read` **and** the video
554
+ # document grants them read. A video with `read("any")` or `read("guests")`
555
+ # is playable without a session.
557
556
  #
558
557
  # For CMAF renditions, use `getCmafHlsManifest` or `getCmafDashManifest`.
559
558
  # Both masters point at the same fMP4 segment set.
@@ -591,9 +590,9 @@ module Appwrite
591
590
  # playlist (`master.m3u8`) or a DASH MPD (`master.mpd`). Hand this URL to a
592
591
  # player to begin adaptive playback.
593
592
  #
594
- # Guests can request this URL when they hold `videos.play` (or `videos.read`)
595
- # **and** the video document grants them read. A video with `read("any")` or
596
- # `read("guests")` is playable without a session.
593
+ # Guests can request this URL when they hold `videos.read` **and** the video
594
+ # document grants them read. A video with `read("any")` or `read("guests")`
595
+ # is playable without a session.
597
596
  #
598
597
  # For CMAF renditions, use `getCmafHlsManifest` or `getCmafDashManifest`.
599
598
  # Both masters point at the same fMP4 segment set.
@@ -630,8 +629,8 @@ module Appwrite
630
629
  # Get the playable caption resource for a video output: an HLS captions
631
630
  # playlist, or the WebVTT file itself for DASH.
632
631
  #
633
- # Guests can request this URL when they hold `videos.play` (or `videos.read`)
634
- # **and** the video document grants them read.
632
+ # Guests can request this URL when they hold `videos.read` **and** the video
633
+ # document grants them read.
635
634
  #
636
635
  #
637
636
  # @param [String] video_id Video unique ID.
@@ -874,8 +873,8 @@ module Appwrite
874
873
  # Get a single thumbnail sheet from a video's timeline as an image. You can
875
874
  # resize the returned image and choose its output format.
876
875
  #
877
- # Guests can request this URL when they hold `videos.play` (or `videos.read`)
878
- # **and** the video document grants them read.
876
+ # Guests can request this URL when they hold `videos.read` **and** the video
877
+ # document grants them read.
879
878
  #
880
879
  #
881
880
  # @param [String] video_id Video unique ID.
@@ -930,9 +929,9 @@ module Appwrite
930
929
  # Audio-only sources produce no timeline and this endpoint returns
931
930
  # `video_timelines_not_found`.
932
931
  #
933
- # Guests can request this URL when they hold `videos.play` (or `videos.read`)
934
- # **and** the video document grants them read. A video with `read("any")` or
935
- # `read("guests")` is playable without a session.
932
+ # Guests can request this URL when they hold `videos.read` **and** the video
933
+ # document grants them read. A video with `read("any")` or `read("guests")`
934
+ # is playable without a session.
936
935
  #
937
936
  #
938
937
  # @param [String] video_id Video unique ID.
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: appwrite
3
3
  version: !ruby/object:Gem::Version
4
- version: 30.7.0
4
+ version: 30.8.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Appwrite Team
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2026-11-28 00:00:00.000000000 Z
11
+ date: 2026-12-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: mime-types