@@ -183,46 +183,46 @@ service API {
183183 // STREAM ENDPOINTS (./stream.go)
184184
185185 rpc getStream (GetStreamRequest ) returns (CourseStream ) {
186- option (google.api.http ) = {get : "/streams/{stream_id}" };
186+ option (google.api.http ) = {get : "/streams/{slug}/{ stream_id}" };
187187 option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation ) = {
188188 tags : "Streams"
189- summary : "Get stream and course by stream ID."
189+ summary : "Get stream and course by course slug and stream ID."
190190 description : "Retrieves a stream and its course by its stream ID."
191191 };
192192 }
193193
194194 rpc getVideoSections (GetVideoSectionsRequest ) returns (GetVideoSectionsResponse ) {
195- option (google.api.http ) = {get : "/streams/{stream_id}/sections" };
195+ option (google.api.http ) = {get : "/streams/{slug}/{ stream_id}/sections" };
196196 option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation ) = {
197197 tags : "Streams"
198- summary : "Get video sections."
198+ summary : "Get video sections by course slug and stream ID ."
199199 description : "Retrieves the video sections for a stream."
200200 };
201201 }
202202
203203 rpc getStreamPlaylist (GetStreamPlaylistRequest ) returns (GetStreamPlaylistResponse ) {
204- option (google.api.http ) = {get : "/streams/{stream_id}/playlist" };
204+ option (google.api.http ) = {get : "/streams/{slug}/{ stream_id}/playlist" };
205205 option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation ) = {
206206 tags : "Streams"
207- summary : "Get stream playlist."
207+ summary : "Get stream playlist by course slug and stream ID ."
208208 description : "Retrieves the playlist for a stream including watch progress."
209209 };
210210 }
211211
212212 rpc getSubtitles (GetSubtitlesRequest ) returns (google.api.HttpBody ) {
213- option (google.api.http ) = {get : "/streams/{stream_id}/subtitles/{lang}" };
213+ option (google.api.http ) = {get : "/streams/{slug}/{ stream_id}/subtitles/{lang}" };
214214 option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation ) = {
215215 tags : "Streams"
216- summary : "Get subtitles."
216+ summary : "Get subtitles by course slug, stream ID, and language ."
217217 description : "Retrieves the subtitles for a stream in a specific language."
218218 };
219219 }
220220
221221 rpc getThumbs (GetThumbsRequest ) returns (google.api.HttpBody ) {
222- option (google.api.http ) = {get : "/streams/{stream_id}/thumbs" };
222+ option (google.api.http ) = {get : "/streams/{slug}/{ stream_id}/thumbs" };
223223 option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation ) = {
224224 tags : "Streams"
225- summary : "Get thumbs."
225+ summary : "Get thumbs by course slug, stream ID, and optional thumb type ."
226226 description : "Retrieves the thumbs for a stream."
227227 };
228228 }
@@ -644,24 +644,29 @@ enum VideoType {
644644
645645message GetStreamRequest {
646646 uint32 stream_id = 1 ;
647+ string slug = 2 ;
647648}
648649
649650message GetVideoSectionsRequest {
650651 uint32 stream_id = 1 ;
652+ string slug = 2 ;
651653}
652654
653655message GetSubtitlesRequest {
654656 uint32 stream_id = 1 ;
655657 string lang = 2 ;
658+ string slug = 3 ;
656659}
657660
658661message GetStreamPlaylistRequest {
659662 uint32 stream_id = 1 ;
663+ string slug = 2 ;
660664}
661665
662666message GetThumbsRequest {
663667 uint32 stream_id = 1 ;
664668 optional VideoType thumb_type = 2 ;
669+ string slug = 3 ;
665670}
666671
667672///////////////////////////////
0 commit comments