Skip to content

Commit

Permalink
v.0.2.4 (#18)
Browse files Browse the repository at this point in the history
* chore: Add credits and thanks

* fix(docs): update version

* fix: change the sample user

* chore: add sample test env

* fix: set props on package.json

* fix: move dependencies

* fix: circle ci (#1)

* fix: remove filter on config

* fix: back filters

* fix: add .env.testing - circleci

* chore: remove plans (#2)

Remove plans

* feature: add seeds on migrations (#3)

* chore: remove plans

* feature: add seeds on migrations

* fix: change precommit script

* fix: update script

* fix: add adonijs on circleci

* fix: add adonisjs on circleci

* fix: add .env.testing

* chore: add seed instructions

* feat: add patreon button (#7)

feat: add patreon button

* v.0.2.1

* fix: set node version

* fix: remove unused nodemon

* feat: posting new homepage

* chore: ignore file

* v0.2.2

* v0.2.2

* chore: remove unused dependencie

* fix: copy and menu links on homepage (#11)

* fix: copy and menu links on homepage

* fix: link on readme

* feat: add requests stats (#12)

* feat: add requests stats

* fix: requests test

* v0.2.3

* chore: update version

* fix: logger tests (#13) v.0.2.3

* feat: add requests stats

* fix: requests test

* chore: update version

* fix: request tests

* v0.2.3

* fix: requests logger (#14)

* feat: add requests stats

* fix: requests test

* v0.2.3

* chore: update version

* fix: request tests

* fix: request tests

* fix: remove requests tests (#15)

* feat: add requests stats

* fix: requests test

* v0.2.3

* chore: update version

* fix: migrations on production (#17)

* chore: update description

* fix: remove unused page

* fix: comment column

* chore: Increase the limit on allowed requests within 3 minutes

* feat: add comment on getBook
  • Loading branch information
omarciovsena authored Jan 15, 2019
1 parent 000f9fe commit ad28d89
Show file tree
Hide file tree
Showing 12 changed files with 1,674 additions and 141 deletions.
803 changes: 802 additions & 1 deletion apidoc/api_data.js

Large diffs are not rendered by default.

803 changes: 802 additions & 1 deletion apidoc/api_data.json

Large diffs are not rendered by default.

25 changes: 24 additions & 1 deletion apidoc/api_project.js
Original file line number Diff line number Diff line change
@@ -1 +1,24 @@
define({ "name": "bibleAPI", "version": "0.2.0", "description": "A RESTful API for Bible", "title": "bibleAPI", "url": "https://bibleapi.co/", "header": { "title": "bibleAPI", "index": "Home", "indexHref": "https://bibleapi.co" }, "template": { "forceLanguage": "en" }, "sampleUrl": false, "defaultVersion": "0.0.0", "apidoc": "0.3.0", "generator": { "name": "apidoc", "time": "2018-12-08T23:25:23.298Z", "url": "http://apidocjs.com", "version": "0.17.6" }});
define({
"name": "bibleAPI",
"version": "0.2.0",
"description": "A RESTful API for Bible",
"title": "bibleAPI",
"url": "https://bibleapi.co/",
"header": {
"title": "bibleAPI",
"index": "Home",
"indexHref": "https://bibleapi.co"
},
"template": {
"forceLanguage": "en"
},
"sampleUrl": false,
"defaultVersion": "0.0.0",
"apidoc": "0.3.0",
"generator": {
"name": "apidoc",
"time": "2019-01-15T11:06:53.593Z",
"url": "http://apidocjs.com",
"version": "0.17.6"
}
});
25 changes: 24 additions & 1 deletion apidoc/api_project.json
Original file line number Diff line number Diff line change
@@ -1 +1,24 @@
{ "name": "bibleAPI", "version": "0.2.0", "description": "A RESTful API for Bible", "title": "bibleAPI", "url": "https://bibleapi.co/", "header": { "title": "bibleAPI", "index": "Home", "indexHref": "https://bibleapi.co" }, "template": { "forceLanguage": "en" }, "sampleUrl": false, "defaultVersion": "0.0.0", "apidoc": "0.3.0", "generator": { "name": "apidoc", "time": "2018-12-08T23:25:23.298Z", "url": "http://apidocjs.com", "version": "0.17.6" }}
{
"name": "bibleAPI",
"version": "0.2.0",
"description": "A RESTful API for Bible",
"title": "bibleAPI",
"url": "https://bibleapi.co/",
"header": {
"title": "bibleAPI",
"index": "Home",
"indexHref": "https://bibleapi.co"
},
"template": {
"forceLanguage": "en"
},
"sampleUrl": false,
"defaultVersion": "0.0.0",
"apidoc": "0.3.0",
"generator": {
"name": "apidoc",
"time": "2019-01-15T11:06:53.593Z",
"url": "http://apidocjs.com",
"version": "0.17.6"
}
}
4 changes: 2 additions & 2 deletions app/Controllers/Http/RequestController.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ class RequestController {
* "date": "2018-12-08T22:16:52.000Z"
* }]
*
* @apiError TooManyRequests When performing more than 3 requests at the same endpoint in an interval less than 5 minutes
* @apiError TooManyRequests When performing more than 50 requests at the same endpoint in an interval less than 5 minutes
*
* @apiErrorExample {text} Error-Response:
* HTTP/1.1 429 Too Many Requests
Expand Down Expand Up @@ -82,7 +82,7 @@ class RequestController {
* "count": "3",
* }]
*
* @apiError TooManyRequests When performing more than 3 requests at the same endpoint in an interval less than 5 minutes
* @apiError TooManyRequests When performing more than 50 requests at the same endpoint in an interval less than 5 minutes
*
* @apiErrorExample {text} Error-Response:
* HTTP/1.1 429 Too Many Requests
Expand Down
12 changes: 7 additions & 5 deletions app/Controllers/Http/SearchController.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ class SearchController {
* "text": "No princípio Deus criou os céus e a terra."
* }
*
* @apiError TooManyRequests When performing more than 3 requests at the same endpoint in an interval less than 5 minutes
* @apiError TooManyRequests When performing more than 50 requests at the same endpoint in an interval less than 5 minutes
* @apiError VerseNotFound When the verse was not found
*
* @apiErrorExample {text} Error-Response:
Expand Down Expand Up @@ -162,7 +162,7 @@ class SearchController {
]
}
*
* @apiError TooManyRequests When performing more than 3 requests at the same endpoint in an interval less than 5 minutes
* @apiError TooManyRequests When performing more than 50 requests at the same endpoint in an interval less than 5 minutes
* @apiError VerseNotFound When the verse was not found
*
* @apiErrorExample {text} Error-Response:
Expand Down Expand Up @@ -273,7 +273,7 @@ class SearchController {
...
]
*
* @apiError TooManyRequests When performing more than 3 requests at the same endpoint in an interval less than 5 minutes
* @apiError TooManyRequests When performing more than 50 requests at the same endpoint in an interval less than 5 minutes
*
* @apiErrorExample {text} Error-Response:
* HTTP/1.1 429 Too Many Requests
Expand Down Expand Up @@ -315,13 +315,14 @@ class SearchController {
{
"abbrev": "gn",
"author": "Moisés",
"comment": "Uma vez que este livro anônimo integra o Pentateuco unificado",
"chapters": 50,
"group": "Pentateuco",
"name": "Gênesis",
"testament": "VT"
}
*
* @apiError TooManyRequests When performing more than 3 requests at the same endpoint in an interval less than 5 minutes
* @apiError TooManyRequests When performing more than 50 requests at the same endpoint in an interval less than 5 minutes
* @apiError VerseNotFound When the verse was not found
*
* @apiErrorExample {text} Error-Response:
Expand All @@ -346,6 +347,7 @@ class SearchController {
abbrev: book.abbrev,
author: book.author,
chapters: book.chapters,
comment: book.comment,
group: book.group,
name: book.name,
testament: book.testament
Expand Down Expand Up @@ -395,7 +397,7 @@ class SearchController {
]
}
*
* @apiError TooManyRequests When performing more than 3 requests at the same endpoint in an interval less than 5 minutes
* @apiError TooManyRequests When performing more than 50 requests at the same endpoint in an interval less than 5 minutes
* @apiError VerseNotFound When the verse was not found
* @apiError BadRequest When the required parameters are not sent
*
Expand Down
2 changes: 1 addition & 1 deletion database/migrations/1532136697805_book_schema.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ class BookSchema extends Schema {
table.increments()
table.integer('chapters').notNullable()
table.string('abbrev').notNullable()
table.string('comment').notNullable()
table.text('comment').notNullable()
table.string('group').notNullable()
table.string('testament').notNullable()
table.string('name').notNullable()
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"node": "10.7.0"
},
"scripts": {
"build": "webpack --mode production",
"build": "webpack --mode production && ENV_SILENT=true node ace migration:run --force",
"doc": "apidoc -i app/ -o apidoc/ -t ../apidoc-bs3-template/template",
"migrations": "adonis migration:reset && adonis migration:run && adonis seed --files='Seeder.js'",
"prestart": "yarn build",
Expand Down
2 changes: 1 addition & 1 deletion resources/locales/en/general.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"description": "RESTful API with multiple versions of the Holy Bible in more than 10 languages",
"description": "Bible API - RESTful API with multiple versions of the Holy Bible in more than 10 languages",
"english": "English",
"portuguese": "Portuguese",
"statusPage": "Status page",
Expand Down
2 changes: 1 addition & 1 deletion resources/locales/pt/general.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"description": "API REST com múltiplas versões da Bíblia Sagrada em mais de 10 idiomas",
"description": "Bíblia API - API REST com múltiplas versões da Bíblia Sagrada em mais de 10 idiomas",
"english": "Inglês",
"portuguese": "Português",
"statusPage": "Página de status",
Expand Down
117 changes: 0 additions & 117 deletions resources/views/home.edge

This file was deleted.

18 changes: 9 additions & 9 deletions start/routes.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,39 +15,39 @@ Route.post('api/users', 'UserController.create')
Route.post('api/sessions', 'SessionController.create')

Route.get('api/requests/count/:period?', 'RequestController.count').middleware(
'throttle:3:300'
'throttle:50:300'
)

Route.get('api/requests/:period?', 'RequestController.show').middleware(
'throttle:3:300'
'throttle:50:300'
)

Route.get('api/requests/month', 'RequestController.month').middleware(
'throttle:3:300'
'throttle:50:300'
)

Route.get('api/requests/week', 'RequestController.week').middleware(
'throttle:3:300'
'throttle:50:300'
)

Route.get('api/books/', 'SearchController.getBooks').middleware(
'throttle:3:300'
'throttle:50:300'
)

Route.get('api/books/:book', 'SearchController.getBook').middleware(
'throttle:3:300'
'throttle:50:300'
)

Route.get(
'api/verses/:version/:book/:chapter',
'SearchController.getChapter'
).middleware('throttle:3:300')
).middleware('throttle:50:300')

Route.get(
'api/verses/:version/:book/:chapter/:number',
'SearchController.getVerse'
).middleware('throttle:3:300')
).middleware('throttle:50:300')

Route.post('api/search/', 'SearchController.search').middleware(
'throttle:3:300'
'throttle:50:300'
)

0 comments on commit ad28d89

Please sign in to comment.