Project

serpbook

0.0
No commit activity in last 3 years
No release in over 3 years
Interact with the serpbook api
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

Runtime

 Project Readme

Serpbook

Installation

Add this line to your application's Gemfile:

gem 'serpbook'

And then execute:

$ bundle

Or install it yourself as:

$ gem install serpbook

Usage

  1. Configure your master key and email

    Serpbook.config do |conf|
        conf.master_key = 'my_key'
        conf.email = 'my email'
    end
  2. Interact with a category

    cat = Serpbook::Category.new(name: 'My Category name')
    
    # get your rankings
    cat.rankings
    
    #convinience methods to drill down
    cat.rankings.for_keyword('my keyword')
    cat.rankings.for_url('myurl.com')
    
    # add a new keyword - note various options that can be included. see code at lib/serpbook/category.rb
    cat.create('myurl.com', 'my keyword')
    
    # delete a keyword
    cat.delete('myurl.com', 'my keyword')

Development

After checking out the repo, run bin/setup to install dependencies. Then, run rake spec to run the tests. You can also run bin/console for an interactive prompt that will allow you to experiment.

Currently specs are setup to read in a spec/.env.rb file with your master_key and email. (See the spec_helper file.)

TODO: make tests general enough to allow others to contribute without changing values. Perhaps reading in a valid category name from the .env.rb file.

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/kosh-jelly/serpbook.