Class: Forem::Services::VideoService

Inherits:
BaseService show all
Defined in:
lib/forem/services/video_service.rb

Overview

Service for interacting with the Forem Videos API.

Lists articles that contain video content. Access via Client#videos. All methods inject the client's requestor automatically so no additional configuration is required.

Examples:

client = Forem::Client.new("your-api-key")
videos = client.videos.list(page: 1)

See Also:

Instance Method Summary collapse

Methods inherited from BaseService

#initialize

Constructor Details

This class inherits a constructor from Forem::Services::BaseService

Instance Method Details

#list(params = {}, opts = {}) ⇒ Array<Video>

List articles that contain videos.

Examples:

client.videos.list(page: 2)

Parameters:

  • params (Hash) (defaults to: {})

    query parameters

  • opts (Hash) (defaults to: {})

    per-request options

Options Hash (params):

  • :page (Integer)

    page number (default: 1)

  • :per_page (Integer)

    number of results per page

Returns:

  • (Array<Video>)

    list of articles with video content

See Also:



28
29
30
# File 'lib/forem/services/video_service.rb', line 28

def list(params = {}, opts = {})
  Video.list(params, opts_with_requestor(opts))
end