Class: Yahoo::SE::Inlinks
- Inherits:
-
Object
- Object
- Yahoo::SE::Inlinks
- Includes:
- Paginator
- Defined in:
- lib/yahoo-se/inlinks.rb
Constant Summary collapse
- SERVICE_PATH =
"#{Yahoo::SE::SERVICE_PATH}/inlinkData"
Instance Attribute Summary collapse
-
#options ⇒ Object
Returns the value of attribute options.
-
#request ⇒ Object
readonly
Returns the value of attribute request.
Instance Method Summary collapse
-
#initialize(domain, options = {}) ⇒ Inlinks
constructor
A new instance of Inlinks.
-
#results ⇒ Object
Displays the results for inlinks data.
Methods included from Paginator
#last?, #method_missing, #next, #response, #total_results_available
Constructor Details
#initialize(domain, options = {}) ⇒ Inlinks
Returns a new instance of Inlinks.
21 22 23 24 25 26 27 |
# File 'lib/yahoo-se/inlinks.rb', line 21 def initialize(domain, ={}) @domain = domain @options = @options[:query] = domain @options[:results] = @options[:results] ||= 50 @options[:start] = @options[:start] ||= 1 end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class Yahoo::SE::Paginator
Instance Attribute Details
#options ⇒ Object
Returns the value of attribute options.
19 20 21 |
# File 'lib/yahoo-se/inlinks.rb', line 19 def @options end |
#request ⇒ Object (readonly)
Returns the value of attribute request.
18 19 20 |
# File 'lib/yahoo-se/inlinks.rb', line 18 def request @request end |
Instance Method Details
#results ⇒ Object
Displays the results for inlinks data
30 31 32 33 34 |
# File 'lib/yahoo-se/inlinks.rb', line 30 def results raise ApplicationIDNotSet if Yahoo::SE.application_id.nil? @request = Yahoo::SE::Request.new(Yahoo::SE::Inlinks::SERVICE_PATH, @options) @results = @request.results end |