Skip to content

Yet another simple HTML indexer with JSON-API resources

Notifications You must be signed in to change notification settings

realleoman/indexer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

README

Yet Another Simple JSON-API Indexer

This file is intended to explain the use of this Simple HTML Indexer

## Requisites:

  • Ruby 2.4.2

  • Rails 4.2.10

  • JSOAPI-response 0.9

## Installation: After you git clone the repo, follow the next steps on yout terminal or console:</b>

  • bundle install (install all required gems)

  • open database.yml and change you local mysql password

  • rake db:setup (to create empty database structure)

  • rake db:migrate (to update database schema)

  • rails server

The API is built under the next namespace

“‘ localhost:3000/api/v1/ “`

## Usage:

Show all the URLS in the database and the relationships “‘ localhost:3000/api/urls “`

Show data from a specific entry “‘ localhost:3000/api/urls/1 “`

Show the related items for a specific URL “‘ localhost:3000/api/v1/urls/1?include=h1s,h2s,h3s,links “`

## Saving Data Passing the URL as part of the JSON String will create an entry into the Urls table.

Example:

“‘ curl -i -H “Accept: application/vnd.api+json” -H ’Content-Type:application/vnd.api+json’ -X POST -d ‘{“data”: {“type”:“urls”, “attributes”:{“url”:“www.microsoft.com”}}}’ 0.0.0.0:3001/api/v1/urls “‘

H1,H2,H3 and Links parsing (Work in progress)

About

Yet another simple HTML indexer with JSON-API resources

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published