https://github.com/tegon/content-indexer
Indexes tags and links of a given webpage
https://github.com/tegon/content-indexer
Last synced: about 2 months ago
JSON representation
Indexes tags and links of a given webpage
- Host: GitHub
- URL: https://github.com/tegon/content-indexer
- Owner: tegon
- License: mit
- Created: 2016-08-08T16:21:36.000Z (almost 10 years ago)
- Default Branch: master
- Last Pushed: 2016-08-09T15:21:33.000Z (almost 10 years ago)
- Last Synced: 2025-03-11T08:51:19.111Z (over 1 year ago)
- Language: Ruby
- Size: 39.1 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# content-indexer
Indexes tags and links of a given webpage
## API endpoints
### POST pages
This endpoint accepts a url parameter, which is the page were the content will be indexed.
Curl Example:
```bash
curl "http://localhost:3000/pages" -d "page[url]=https://tegon.github.io"
```
The page will be stored in the database, and his id will be returned
```json
{"id":1,"url":"https://tegon.github.io"}
```
### GET pages/:id
This endpoint will return the details of the page, incluid its links and tags
Curl Example:
```bash
curl "http://localhost:3000/pages/1"
```
Response
```json
{
"id":1,
"url":"https://tegon.github.io",
"links":[
{
"href":"https://github.com/little-dice-games/velha-mania"
},
{
"href":"https://github.com/tegon/TrucoMarreco"
},
{
"href":"https://github.com/tegon/cineminha-bot"
},
{
"href":"https://github.com/tegon/clone-org-repos"
},
{
"href":"https://github.com/tegon/traktflix"
},
{
"href":"https://play.google.com/store/apps/details?id=br.com.clickjogos"
},
{
"href":"https://www.carrinhoemcasa.com.br/"
},
{
"href":"http://www.minhaserie.com.br/"
},
{
"href":"http://www.joguinhos.com.br"
},
{
"href":"http://www.jogosdemeninas.com.br"
},
{
"href":"http://www.clickjogos.com.br"
},
{
"href":"https://play.google.com/store/apps/dev?id=7812285483653318759"
},
{
"href":"https://twitter.com/tegonl"
},
{
"href":"https://br.linkedin.com/in/tegon"
},
{
"href":"https://github.com/tegon"
}
],
"tags":[
{
"type":"h1",
"content":"Leonardo Tegon"
},
{
"type":"h2",
"content":"Work"
},
{
"type":"h2",
"content":"Open Source"
},
{
"type":"h3",
"content":"Click Jogos"
},
{
"type":"h3",
"content":"Jogos de Meninas"
},
{
"type":"h3",
"content":"Joguinhos"
},
{
"type":"h3",
"content":"Minha Série"
},
{
"type":"h3",
"content":"Carrinho em Casa"
},
{
"type":"h3",
"content":"Click Jogos Android"
},
{
"type":"h3",
"content":"traktflix"
},
{
"type":"h3",
"content":"clone-org-repos"
},
{
"type":"h3",
"content":"cineminha-bot"
},
{
"type":"h3",
"content":"TrucoMarreco"
},
{
"type":"h3",
"content":"velha-mania"
}
]
}
```
### GET pages
This endpoint will returned all pages previous indexed
Curl Example:
```bash
curl "http://localhost:3000/pages"
```
The response is an array of pages
```json
[{"id":1,"url":"https://tegon.github.io"}]
```
## Development
First of all, clone this project in your local machine, then install the dependecies
```bash
cd content-indexer/
bundle install
```
Start the development server with
```bash
rails server
```