class Pexels::Client::Videos

Public Class Methods

new(client) click to toggle source
# File lib/pexels/client/videos.rb, line 6
def initialize(client)
  @client = client
end

Public Instance Methods

[](id) click to toggle source
# File lib/pexels/client/videos.rb, line 10
def [](id)
  response = @client.request("/videos/videos/#{id}")
  Pexels::Video.new(response.body)
end
Also aliased as: find
find(id)
Alias for: []

Private Instance Methods

validate_search_params(orientation, size) click to toggle source
# File lib/pexels/client/videos.rb, line 47
def validate_search_params(orientation, size)
  validate_orientation(orientation) &&
    validate_size(size)
end