Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

v.0.2.4 #18

Merged
merged 32 commits into from
Jan 15, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
457c7a4
chore: Add credits and thanks
omarciovsena Nov 25, 2018
098832e
fix(docs): update version
omarciovsena Nov 25, 2018
256be0d
fix: change the sample user
omarciovsena Nov 25, 2018
5504136
chore: add sample test env
omarciovsena Nov 25, 2018
c6f37ca
fix: set props on package.json
omarciovsena Nov 25, 2018
1783b1f
fix: move dependencies
omarciovsena Nov 25, 2018
b58afe5
fix: circle ci (#1)
omarciovsena Nov 25, 2018
33f2d3a
chore: remove plans (#2)
omarciovsena Nov 25, 2018
d8b10cb
feature: add seeds on migrations (#3)
omarciovsena Nov 25, 2018
13f301e
feat: add patreon button (#7)
omarciovsena Nov 30, 2018
3e61c02
v.0.2.1
omarciovsena Nov 30, 2018
3dfb7e0
fix: set node version
omarciovsena Nov 30, 2018
4b1ca0e
fix: remove unused nodemon
omarciovsena Nov 30, 2018
acb2332
feat: posting new homepage
omarciovsena Nov 30, 2018
6bfbaf8
chore: ignore file
omarciovsena Nov 30, 2018
ac0c5af
v0.2.2
omarciovsena Nov 30, 2018
90222c7
v0.2.2
omarciovsena Nov 30, 2018
2e719bd
Merge branch 'master' into dev
omarciovsena Nov 30, 2018
d832a83
chore: remove unused dependencie
omarciovsena Nov 30, 2018
3fdad7a
fix: copy and menu links on homepage (#11)
omarciovsena Nov 30, 2018
303aca9
feat: add requests stats (#12)
omarciovsena Dec 26, 2018
5201fe6
fix: logger tests (#13) v.0.2.3
omarciovsena Dec 27, 2018
c670c38
fix: requests logger (#14)
omarciovsena Dec 27, 2018
1e3efe4
fix: remove requests tests (#15)
omarciovsena Dec 27, 2018
680d462
Merge branch 'master' into dev
omarciovsena Dec 27, 2018
e395d0a
fix: migrations on production (#17)
omarciovsena Dec 27, 2018
1fa3bca
chore: update description
omarciovsena Dec 27, 2018
4b45939
fix: remove unused page
omarciovsena Dec 27, 2018
c0d804c
fix: comment column
omarciovsena Jan 11, 2019
1661a7c
chore: Increase the limit on allowed requests within 3 minutes
omarciovsena Jan 11, 2019
f1ec961
feat: add comment on getBook
omarciovsena Jan 11, 2019
4045eea
Merge branch 'master' into dev
omarciovsena Jan 15, 2019
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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'
)