Skip to content

jorge627/jsonapi-restful

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

jsonAPI RESTful: A demo of JSONAPI-Resources

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.

Steps to run this app

Clone the app

git clone [email protected]:jorge627/jsonapi-restful.git

Enter to the project

cd jsonapi-restful

Run bundle

bundle install

Create the databases

rake db:create

Migrate the database

rake db:migrate

Run the server

rails s

Test the API with CURL

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

Things you may want to cover:

  • Ruby version
2.3.1
  • How to run the test suite
bundle exec rspec

About

RESTful Json API to index a page's content

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published