Created BestSeller & BestSellerList models for fetching books from New York Times REST API. See http://developer.nytimes.com

rails g model BestSellerList
rails g model BestSeller
rake db:migrate

Output:

== 20140916110146 CreateBestSellerLists: migrating ============================
-- create_table(:best_seller_lists)
   -> 0.0575s
Creating best seller lists
..............................
Done.
== 20140916110146 CreateBestSellerLists: migrated (5.4741s) ===================

== 20140916110153 CreateBestSellers: migrating ================================
-- create_table(:best_sellers)
   -> 0.0208s
Creating best seller books
Fetching Advice, How-To & Miscellaneous books 20
....................
Fetching Business Books books 10
.........
Fetching Children's Chapter Books books 10
..........
Fetching Children's Middle Grade books 15
..............
Fetching Children's Paperback Books books 10
.........
Fetching Children's Picture Books books 10
..........
Fetching Children's Series books 10
..........
Fetching Combined Hardcover & Paperback Fiction books 20
....................
Fetching Combined Hardcover & Paperback Nonfiction books 20
...................
Fetching Combined Print & E-Book Fiction books 20
....................
Fetching Combined Print & E-Book Nonfiction books 20
................
Fetching E-Book Fiction books 20
.....
Fetching E-Book Nonfiction books 20
........
Fetching Food and Fitness books 20
..............
Fetching Hardcover Advice & Misc. books 15
..............
Fetching Hardcover Business Books books 15
.............
Fetching Hardcover Fiction books 20
..................
Fetching Hardcover Graphic Books books 10
..........
Fetching Hardcover Nonfiction books 20
...........
Fetching Manga books 10
..........
Fetching Paperback Advice & Misc. books 15
.........
Fetching Paperback Business Books books 10
........
Fetching Paperback Graphic Books books 10
..........
Fetching Paperback Mass-Market Fiction books 20
.................
Fetching Paperback Nonfiction books 20
.............
Fetching Paperback Trade Fiction books 20
...................
Fetching Politics books 10
..
Fetching Science books 20
.............
Fetching Sports books 20
..................
Fetching Young Adult books 15
...........

Done.
== 20140916110153 CreateBestSellers: migrated (31.0696s) ======================
Added Best Seller index view.
Added a REST API for fetching company data. The API can be called e.g. with curl

curl http://localhost:3000/api/1/companies.json
curl http://localhost:3000/api/1/companies.json?limit=10

curl http://localhost:3000/api/1/companies.xml
curl http://localhost:3000/api/1/companies.xml?limit=10
Added a REST API for creating and updating companies. The API can be called e.g. with curl

Create new company:

curl -H "Accept: application/json" -H "Content-type: application/json" -X POST -d '{"name":"My Great New Company","company_type_id":2}' http://localhost:3000/api/1/companies

Update existing company:

curl -H "Accept: application/json" -H "Content-type: application/json" -X PUT -d '{"company":{"name":"My Great Updated Company"}}' http://localhost:3000/api/1/companies/1002