Reputation: 2479
I am trying to access the google webasters data into my web application using there API but I am not able to find any relevant resources on this or any specific gem by which I can access the webmaster data. I have also imported the google analytics data using gem gattica (link). And trying similar for accessing the webmasters data.
Any Suggestions?
Upvotes: 0
Views: 852
Reputation: 731
I was looking for the same answer, what I ended up doing, it is a little more than I would hope: First, download the file from Google Webmaster Tools. Place that file in /app/views/static and rename to .html.erb, also take note of the random text after google, we'll use it int he next steps. Create a static_controller.rb in /app/controllers:
class StaticController < ApplicationController
def google[random code from filename here]
render :layout => false
end
end
Add this to your routes.rb in /config/:
get 'google[random code from filename here].html' => 'static#google[random code from filename here]'
This better follows the MVC setup preferred for Rails, even if it is a little more... requiring than just dropping in an html file.
Upvotes: 2
Reputation: 1189
Google webmaster tools api for Ruby:
https://developers.google.com/gdata/articles/using_ruby
Upvotes: 0
Reputation: 898
I had quick look in the google for ruby gems for Google Webmaster tool and couldn't find dedicated gem for Google Webmaster Tools.
In this case you always can use one of many ruby HTTP or REST clients. For example this one.
And you can find more information about Google Webmaster Tools API in here.
Upvotes: 1