https://github.com/petruki/skimming-api
Skimming API is a RESTful API that uses Skimming and Oak Middleware modules to deliver a simple and efficient search engine.
https://github.com/petruki/skimming-api
deno search-engine skimming
Last synced: 4 months ago
JSON representation
Skimming API is a RESTful API that uses Skimming and Oak Middleware modules to deliver a simple and efficient search engine.
- Host: GitHub
- URL: https://github.com/petruki/skimming-api
- Owner: petruki
- License: mit
- Created: 2020-04-28T02:51:15.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2023-07-14T02:35:41.000Z (about 2 years ago)
- Last Synced: 2025-02-06T05:34:58.625Z (5 months ago)
- Topics: deno, search-engine, skimming
- Language: TypeScript
- Homepage:
- Size: 52.7 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
[](https://github.com/petruki/skimming-api/actions/workflows/master.yml)
[](https://opensource.org/licenses/MIT)# `Skimming API `
Skimming API is a RESTful API that uses [Skimming](https://github.com/petruki/skimming) and [Oak Middleware](https://github.com/oakserver/oak) modules to deliver a simple and efficient search engine.
## Usage
### Lockup API info
```
Request (GET)
{{url}}/config
```
**Sample response**
```json
{
"message": "Success",
"url": "https://raw.githubusercontent.com/petruki/skimming/master/",
"files": [
"README.md"
],
"cacheDuration": "60s",
"cacheSize": 100
}
```### Invoking API - Local configuration
```
Request (GET)
{{url}}/skim?query=Usage&previewLength=-1&ignoreCase=false&trimContent=true
```
- query: value to search
- previewLength: ength of the content to be displayed
- When 0: it display only the query value
- When -1: it display the content until its first found line break
- ignoreCase: ignore case
- trimContent: prettify the content, basically
- regex: enable regular expression searching method
- skipCache: skip cache
**Sample response**
```json
{
"message": "Success",
"query": "Sk",
"result": [
{
"file": "README.md",
"segment": [
"Skimming is a data fetcher for Deno. The idea is to provide a simple and efficient module to fetch content.",
"Skimming from \"https://raw.githubusercontent.com/petruki/skimming/v1.0.0/mod.ts\";",
"Skimming({ expireDuration: 10, size: 10 });"
],
"found": 3,
"cache": true
}
]
}
```### Invoking API - External content
```
Request (GET)
{{url}}/skim?url=https://deno.land/std/&files=manual.md
```
- url: Endpoint to be fetched
- files: artifacts to be fetched## Contributing
Please do open an issue or PR if you feel you have something cool to add.