Code Monkey home page Code Monkey logo

quote-verifier's Introduction

Quote Verifier API

This is the API for the Quote Verifier Chrome extension. This API uses WikiQuote as its source for quote verification, and is only as accurate as Wikiquote is.

Usage

domain.com/api?author=Abraham Lincoln&quote=Four score and seven years ago...

quote-verifier's People

Contributors

jakec1020 avatar ryanrouleau avatar

Watchers

James Cloos avatar  avatar  avatar

quote-verifier's Issues

Code Review

  • constructor names should be capitalized (#L5)
  • quote usage should be consistent (#L21-L22, #L31-L33)
  • variables declared in methods should not have global scope (#L12, #L122, #L131)
  • loop counters should not have global scope (#L27)
  • empty cases should be omitted (#L36)
  • indentation is missing (#L85-L88)
  • excessive nesting should be avoided (#L63-L80)
  • dead logic should be corrected (#L85-L88)
  • spelling (#L61, #L64)
  • consider following a column limit convention
  • strict type comparison is preferable (#L63, #L67)
  • unused modules should be omitted (#L3-L5)
  • error should also dispatch HTTP 500 (#L44)
  • consider using res.json() instead of manually setting headers

Scraper.js not functioning

There are errors with callbacks when trying to access /api?auth.....
I might have written variables wrong (not 100% sure when to use var and when not to use it) that may be the problem.
I believe that if we can get it working, then it should be finished (for now)!

Scrape function is pretty ugly. Could be refactored at some point.

Wikiquote URLs are sometimes case sensitive.

It seems that some articles (for example, Albert Einstein) automatically correct for trying to access wikiquote.org/wiki/albert_einstein (note the lower case name), while others do not (for example, Carl Sagan). This means to access Carl Sagan's page, the URL has to be wikiquote.org/wiki/Carl_Sagan, and not wikiquote.org/wiki/carl_sagan. We have to make the first letter capitalized and the letter after a space capitalized in cleanName().

Refactor scraper()

scraper() in lib/scraper.js is pretty big and not very clear. It could use some cleaning up at some point.

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.