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 +4 -4
- data/lib/appwrite/client.rb +1 -1
- data/lib/appwrite/enums/project_key_scopes.rb +0 -1
- data/lib/appwrite/models/video.rb +9 -4
- data/lib/appwrite/services/videos.rb +27 -28
- 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: 33d0e80cc05e1783003373d16a2e4b2e4792df6738318f6de5b95b1fd2e3a6ad
|
|
4
|
+
data.tar.gz: 3fcf50635cf5869d9a4a31c14887e1dc2837e77b4d6ee5b48122bb72ddbee380
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: dd2b47ccf0bceea18a33da99dbd9977ac67779f3c8f096f8dfea53cd29e60720cdda76cb6acc2c9b76d932a0cea00b0965e8fabee972cc5aa78985610592c557
|
|
7
|
+
data.tar.gz: a78cff62ff03d97cfc47cef916ae4e4e0ab1c02cc5261ec3d2d2783771f1848e35e0f5bbaf18efbda688e267af19b9515c448f02b74857ff34fe4b5ed012e84e
|
data/lib/appwrite/client.rb
CHANGED
|
@@ -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.
|
|
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
|
|
10
|
-
# they can read according to each video's `$permissions`. API
|
|
11
|
-
# receive the full project catalog.
|
|
12
|
-
#
|
|
13
|
-
#
|
|
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
|
|
59
|
-
#
|
|
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.
|
|
475
|
-
#
|
|
476
|
-
#
|
|
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.
|
|
515
|
-
#
|
|
516
|
-
#
|
|
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.
|
|
555
|
-
#
|
|
556
|
-
#
|
|
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.
|
|
595
|
-
#
|
|
596
|
-
#
|
|
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.
|
|
634
|
-
#
|
|
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.
|
|
878
|
-
#
|
|
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.
|
|
934
|
-
#
|
|
935
|
-
#
|
|
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.
|
|
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
|
+
date: 2026-12-01 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: mime-types
|