Code Monkey home page Code Monkey logo

wol-api's People

Contributors

dependabot[bot] avatar j-koziel avatar jd1355 avatar judedavis1 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

wol-api's Issues

Bent broke :/

For some reason after I refactored getting the html into it's own function bent does not work anymore and I get a weird issue which completely breaks the server somehow....

image

I have not yet tried doing it as I was doing it before but I am just putting this issue out there to see for your opinion @JudeDavis1

TASKS:

  • Check if it still works the previous method -> Me :)

Of course can't forget the logs!

[nodemon] restarting due to changes...
[nodemon] restarting due to changes...
[nodemon] restarting due to changes...
[nodemon] restarting due to changes...
[nodemon] restarting due to changes...
[nodemon] starting node ./build/server.js
Server running on http://localhost:3000
StatusError: Not Found
at ClientRequest. (H:\wol-api\src\backend\node_modules\bent\src\nodejs.js:133:23)
at Object.onceWrapper (node:events:628:26)
at ClientRequest.emit (node:events:513:28)
at HTTPParser.parserOnIncomingClient [as onIncoming] (node:_http_client:693:27)
at HTTPParser.parserOnHeadersComplete (node:_http_common:117:17)
at TLSSocket.socketOnData (node:_http_client:534:22)
at TLSSocket.emit (node:events:513:28)
at addChunk (node:internal/streams/readable:324:12)
at readableAddChunk (node:internal/streams/readable:297:9)
at Readable.push (node:internal/streams/readable:234:10) {
statusCode: 404,
json: [AsyncFunction (anonymous)],
text: [Function (anonymous)],
arrayBuffer: [Function (anonymous)],
headers: {
'content-type': 'text/html; charset=utf-8',
'content-length': '7101',
'x-frame-options': 'SAMEORIGIN',
'x-content-type-options': 'nosniff',
'x-xss-protection': '1;mode=block',
'last-modified': 'Wed, 02 Nov 2022 04:07:08 GMT',
etag: 'W/"bbc36ba44946a224148bb31b890bea59"',
'content-encoding': 'gzip',
'cache-control': 'public, max-age=21600, s-maxage=21600',
expires: 'Sun, 13 Nov 2022 02:35:55 GMT',
date: 'Sat, 12 Nov 2022 20:35:55 GMT',
connection: 'close',
vary: 'Accept-Encoding',
'strict-transport-security': 'max-age=31536000'
}
}
StatusError: Not Found
at ClientRequest. (H:\wol-api\src\backend\node_modules\bent\src\nodejs.js:133:23)
at Object.onceWrapper (node:events:628:26)
at ClientRequest.emit (node:events:513:28)
at HTTPParser.parserOnIncomingClient [as onIncoming] (node:_http_client:693:27)
at HTTPParser.parserOnHeadersComplete (node:_http_common:117:17)
at TLSSocket.socketOnData (node:_http_client:534:22)
at TLSSocket.emit (node:events:513:28)
at addChunk (node:internal/streams/readable:324:12)
at readableAddChunk (node:internal/streams/readable:297:9)
at Readable.push (node:internal/streams/readable:234:10) {
statusCode: 404,
json: [AsyncFunction (anonymous)],
text: [Function (anonymous)],
arrayBuffer: [Function (anonymous)],
headers: {
'content-type': 'text/html; charset=utf-8',
'content-length': '7101',
'x-frame-options': 'SAMEORIGIN',
'x-content-type-options': 'nosniff',
'x-xss-protection': '1;mode=block',
'last-modified': 'Wed, 02 Nov 2022 04:07:08 GMT',
etag: 'W/"bbc36ba44946a224148bb31b890bea59"',
'content-encoding': 'gzip',
'cache-control': 'public, max-age=21600, s-maxage=21600',
expires: 'Sun, 13 Nov 2022 02:35:55 GMT',
date: 'Sat, 12 Nov 2022 20:35:55 GMT',
connection: 'close',
vary: 'Accept-Encoding',
'strict-transport-security': 'max-age=31536000'
}
}
StatusError: Not Found
at ClientRequest. (H:\wol-api\src\backend\node_modules\bent\src\nodejs.js:133:23)
at Object.onceWrapper (node:events:628:26)
at ClientRequest.emit (node:events:513:28)
at HTTPParser.parserOnIncomingClient [as onIncoming] (node:_http_client:693:27)
at HTTPParser.parserOnHeadersComplete (node:_http_common:117:17)
at TLSSocket.socketOnData (node:_http_client:534:22)
at TLSSocket.emit (node:events:513:28)
at addChunk (node:internal/streams/readable:324:12)
at readableAddChunk (node:internal/streams/readable:297:9)
at Readable.push (node:internal/streams/readable:234:10)

Get all verses in a chapter

If we could add an endpoint to scrape all verses in a single chapter (all at once) and return it, that would speed up my transformer process.

Deprecated request package

The request package we are using seems to be heavily deprecated and I was wondering if we could implement an alternative.

I have found one which I haven't yet tested.
It's called got

Let me know what you think.
I think however that although it is deprecated it seems to be fast and if there is not suitable alternative which is just as fast or even faster we should just stick with request for now.

Support for other languages

Is your feature request related to a problem? Please describe.
I was hoping that the URLs we're using to make requests to wol-api would only require the locale to change, however other parts of the url also change...

This is the url for english
image

The url for another language (this is polish as an example)
image

As you can see, other than the locale things like the "lp-e" and the "r1" tag have changed to "lp-p" and "r12"

Describe the solution you'd like
I'm guessing some kind of index which has all this other "metadata" which can be plugged into the req url

TODO

To Do

Completed

  • Migrate to Java

  • #226

  • Find a new way to get the verse from the html, current solution doesn't even work ๐Ÿ˜ญ๐Ÿคฆโ€โ™‚๏ธ -> Jonathan

  • Make endpoint to get all verses in a single chapter #99

  • Fix tests

  • Create React app for the front end... -> Jonathan

  • Create route for getting the verse, and exporting previously made function into its own module in a controllers folder -> Jonathan

  • Create route generator -> Jude

  • #15

  • Test other http request packages -> Jonathan/Jude

  • Frontend from TS -> JS

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.