This app is a tiny RESTful system implemented as an API that follows the JSON API spec, with this API you can scraping a given website through its url.
git clone [email protected]:jorge627/jsonapi-restful.git
cd jsonapi-restful
bundle install
rake db:create
rake db:migrate
rails s
You can add new record like this
curl -i -H "Accept: application/vnd.api+json" -H 'Content-Type:application/vnd.api+json' -X POST -d '{"data": {"type":"pages", "attributes":{"url":"http://www.google.com"}}}' http://localhost:3000/pages
Then you can list all urls saved and its content
curl -i -H "Accept: application/vnd.api+json" -H 'Content-Type:application/vnd.api+json' http://localhost:3000/pages
- Ruby version
2.3.1
- How to run the test suite
bundle exec rspec