Class: Forem::Video

Inherits:
APIResource show all
Extended by:
APIOperations::List
Defined in:
lib/forem/resources/video.rb

Overview

Represents an article with an associated video on a Forem instance.

Video articles are a special content type where the primary content is a video rather than text. The public API supports listing video articles, returned ordered by publication date.

Returns published articles with video, ordered by descending popularity. Default: 24 per page.

Available operations (via mixins):

- +List+ — GET /api/videos

Examples:

List video articles

videos = client.videos.list(per_page: 10)
videos.data.each { |v| puts v.title }

Iterate over all video articles using auto-pagination

client.videos.list.auto_paging_each { |v| puts "#{v.title}: #{v.video_source_url}" }

See Also:

Constant Summary collapse

OBJECT_NAME =
"video"
RESOURCE_PATH =
"/api/videos"

Instance Attribute Summary

Attributes inherited from ForemObject

#requestor

Method Summary

Methods included from APIOperations::List

list

Methods inherited from APIResource

#refresh, resource_path, #resource_url

Methods inherited from ForemObject

#==, #[], #[]=, construct_from, cursor_list, #initialize, #inspect, #method_missing, paginated_list, #respond_to_missing?, #to_hash

Methods included from APIOperations::Request

included, #request

Constructor Details

This class inherits a constructor from Forem::ForemObject

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class Forem::ForemObject