Module: Yahoo::SE
- Defined in:
- lib/yahoo-se.rb,
lib/yahoo-se/ping.rb,
lib/yahoo-se/pages.rb,
lib/yahoo-se/result.rb,
lib/yahoo-se/inlinks.rb,
lib/yahoo-se/request.rb,
lib/yahoo-se/version.rb,
lib/yahoo-se/response.rb,
lib/yahoo-se/paginator.rb,
lib/yahoo-se/exceptions.rb,
lib/yahoo-se/update_notification.rb
Defined Under Namespace
Modules: Paginator Classes: ApplicationIDNotSet, Inlinks, Pages, Ping, Request, Response, ResponseError, Result, UpdateNotification
Constant Summary collapse
- VERSION =
"1.1.0"
- SERVICE_PATH =
"#{API_DOMAIN}/SiteExplorerService/#{VERSION}"
Class Attribute Summary collapse
-
.application_id ⇒ Object
Returns the value of attribute application_id.
Class Method Summary collapse
- .all(obj) ⇒ Object
-
.inlinks(domain, options = {}) ⇒ Object
Shows the pages from other sites linking in to a page.
-
.pages(domain, options = {}) ⇒ Object
Shows a list of all pages belonging to a domain in the Yahoo! index.
-
.ping(sitemap) ⇒ Object
Allows you to notify Yahoo! of changes to your site.
-
.update_notification(url) ⇒ Object
The Update Notification service allows you to notify Yahoo! when your site changes.
Class Attribute Details
.application_id ⇒ Object
Returns the value of attribute application_id.
9 10 11 |
# File 'lib/yahoo-se.rb', line 9 def application_id @application_id end |
Class Method Details
.all(obj) ⇒ Object
11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 |
# File 'lib/yahoo-se.rb', line 11 def all(obj) obj.[:start] = 1 obj.[:results] = 100 # First page of results results = obj.results if obj.total_results_available > 100 # The rest of the page results begin (obj.total_results_available/100).ceil.times do |i| results += obj.next end rescue ResponseError => e # error output ensure results end end results end |
.inlinks(domain, options = {}) ⇒ Object
Shows the pages from other sites linking in to a page.
backlinks = Yahoo::SE.inlinks(“rubyskills.com”, :results => 100)
backlinks.results
backlinks.next
10 11 12 |
# File 'lib/yahoo-se/inlinks.rb', line 10 def self.inlinks(domain, ={}) Yahoo::SE::Inlinks.new(domain, ) end |
.pages(domain, options = {}) ⇒ Object
Shows a list of all pages belonging to a domain in the Yahoo! index
page_data = Yahoo::SE.pages(“rubyskills.com”, :results => 100)
page_data.results
page_data.next
10 11 12 |
# File 'lib/yahoo-se/pages.rb', line 10 def self.pages(domain, ={}) Yahoo::SE::Pages.new(domain, ) end |
.ping(sitemap) ⇒ Object
Allows you to notify Yahoo! of changes to your site. No appid required
ping = Yahoo::SE.pages(“rubyskills.com”)
ping.response
sitemap: The URL of the page to be submitted, or the URL of a feed containing site data.
10 11 12 |
# File 'lib/yahoo-se/ping.rb', line 10 def self.ping(sitemap) Yahoo::SE::Ping.new(sitemap) end |
.update_notification(url) ⇒ Object
The Update Notification service allows you to notify Yahoo! when your site changes. You may notify us about a single page, or a set of pages that need attention.
update_notification = Yahoo::SE.update_notification(“rubyskills.com”)
page_data.response
url: The URL of the page to be submitted, or the URL of a feed containing site data.
10 11 12 |
# File 'lib/yahoo-se/update_notification.rb', line 10 def self.update_notification(url) Yahoo::SE::UpdateNotification.new(url) end |