Class: Vimeo::Advanced::Test

Inherits:
Base
  • Object
show all
Defined in:
lib/vimeo/advanced/test.rb

Instance Method Summary collapse

Methods inherited from Base

#initialize, #login_link, #upload_sig

Constructor Details

This class inherits a constructor from Vimeo::Advanced::Base

Instance Method Details

#echo(options = {}) ⇒ Object

An echo test. Echoes all parameters. Options can be anything except method, api_key, and api_sig – if any of these options are present they will be overwritten by the proper values.



10
11
12
13
14
15
# File 'lib/vimeo/advanced/test.rb', line 10

def echo(options={})
  options.merge!(:method => "vimeo.test.echo")
  api_sig = generate_api_sig options
  options.merge!(:api_sig => api_sig)
  self.class.post("/api/rest", :query => options)
end

#login(auth_token) ⇒ Object

Tests if the user associated to this token is able to make authenticated calls.



29
30
31
32
33
34
35
36
# File 'lib/vimeo/advanced/test.rb', line 29

def (auth_token)
  sig_options = {
    :auth_token => auth_token,
    :method => "vimeo.test.login"
  }
  
  make_request sig_options
end

#null(auth_token) ⇒ Object

A null test.



18
19
20
21
22
23
24
25
# File 'lib/vimeo/advanced/test.rb', line 18

def null(auth_token)
  sig_options = {
    :auth_token => auth_token,
    :method => "vimeo.test.null"
  }
  
  make_request sig_options
end