Coder Social home page Coder Social logo

gitfrosh / lotr-api Goto Github PK

View Code? Open in Web Editor NEW
229.0 11.0 63.0 13.09 MB

This repository holds the code base of the API to rule them all, the Lord of the Rings api, which provides you with book, character, movie and quotes data.

Home Page: https://the-one-api.dev

CSS 3.76% HTML 4.88% TypeScript 90.56% Shell 0.16% Makefile 0.63%
lord-of-the-rings rest-api hacktoberfest

lotr-api's Introduction

Logo

Hi there, I'm Rike

  • Working: as a Software Developer & Consultant at IAV in Berlin, Germany
  • Languages : Javascript, Typescript, Python, Solidity ๐Ÿ’ป
  • Teaching: web development, React, Web3/Blockchain, see rike.dev

Ant-Design Ethereum Bootstrap Express.js Flask Gatsby JWT Next JS NodeJS React DigitalOcean Visual Studio Code CSS3 HTML5 JavaScript Python TypeScript Ubuntu Raspberry Pi Testing-Library Jest GitHub

โ€œGo where you must go, and hope!โ€œ ๐ŸŽฏ

"Buy Me A Coffee"

lotr-api's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

lotr-api's Issues

Blocking spam / bulk registrations

Sometimes we monitor bulk registrations on the-one-api.dev, triggered by the same IP within a very short period if time. It would be great to implement a basic security mechanism, that prevents spam registrations like that.

Feel free to create a pull request! ๐Ÿš€

Add default sort order for chapters

Currently the book chapters are returned in no particular order and cannot be sorted according to any information that the API contains. The only way to sort them is to already know the correct order and sort against it.

Option 1: The id's are given chronologically to each chapter, so the chapters can be sorted by id.

Option 2: Adding a chapter column, where each chapter receives a number. LotR is divided into several books, so it would have to be non unique, as there will be multiple chapter 1, but could still be sorted, if given a book id as well.

Problems when signing up/login in using long passwords

I signed up using a generated 256 character password. I received a positive feedback submitting, but when I tried to log in, a message appeared, informing me, that the password would be incorrect. As I was using a password storage and tried it multiple times, this should not be the case.
Afterwards, I signed up, using another email and a shorter password and everything worked fine.

Add GraphQL support

Although REST is doing great for The one API, it would be nice to add and expose a GraphQL endpoint in the future.

Any help is appreciated. ๐Ÿš€

Add a basic CI/CD pipeline

Having a basic CI/CD pipeline for tests and deployments would be beneficial. It would make reviewing PRs easier and help ensure the project is in a stable state.

Something like Travis, CircleCI or GitHub Actions would suffice.

Forgot password

Hello there... this may be silly, but I forgot my login password. I get an error but no "retrieve new password" option. Am I missing it? Thanks!

Get rid of multiple excessive blanks in 'quote' API

When you made request to 'quote' API you get a response with quotes which contains a lot of excessive blanks before quote, after quote or in the middle.
Should we handle this situation and remove them before sending to client?

Examples:
{ "_id": "5cd96e05de30eff6ebcce925", "dialog": " It is the road to the Dimholt, the door under the mountain. ", "movie": "5cd95395de30eff6ebccde5d", "character": "5cd99d4bde30eff6ebccfd81" },
{ "_id": "5cd96e05de30eff6ebcce928", "dialog": "My sons are spent! , My line has ended! ย ", "movie": "5cd95395de30eff6ebccde5d", "character": "5cd99d4bde30eff6ebccfca1" }

First and Second Age

It would be interesting if the API included information about the First and Second Age of Middle-earth. I'm curious if I can contribute this information or if it would be limited by copyright.

Rings of Power

Just wondering if there were any plans to add Rings of Power content to the API or not?

Add Tests

This Repo is entirely non-tested. ๐Ÿ˜ญ
Pull requests including

  • a CRA / jest / react-testing-library setup and some unit tests for the frontend
  • a test setup for the backend

are very welcome.

v2 API Change in naming

I'd like to say a BIG thank you for this API (bought you a coffee). I'm a volunteer for a hospice charity that has a geeky fund-raising team - the LOTR API is called from a messenger chatbot. I cut over to the V2 api and I noted a couple of small differences - the JSON now returns with characters with the tag 'Name' instead of 'name', and 'Url' instead of 'wikiUrl'.
Screenshot 2020-08-31 at 21 57 29

Text in the documentation table is truncated with elipsis

This issue is related to the way the documentation is displayed on page https://the-one-api.dev/documentation.
Some of the endpoints urls are truncated with elipses which prevents the user from seeing all of it (unless they change the width of the window - works fine in narrow screens).

This should be easy to fix by removing the text-overflow: ellipsis and using overflow-wrap or word-break (not sure which would work best here).

Another option would be to add a tooltip on hover containing the full text when it gets truncated.

Screenshots taken on width of 1440px:

Screenshot 2021-05-24 at 09 42 40

Screenshot 2021-05-24 at 09 43 02

Access to the server was blocked in Chrome and Mozilla by CORS policy.

Hi! Thanks for your API - cool stuff.

But I can't use it in Chrome and Mozilla (latest versions) because of the CORPS policy.

You can retrieve more info from the console log.
Copy: Access to fetch at 'https://the-one-api.herokuapp.com/v1/character/' from origin 'http://localhost:3000' has been blocked by CORS policy: Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource. If an opaque response serves your needs, set the request's mode to 'no-cors' to fetch the resource with CORS disabled.
image

As I get it the server response is missing the following property: Access-Control-Allow-Origin: *
The GET request with an API key is not a simple request in Chrome, so the browser blocks it.

Improve developer experience with better environment configuration

I'm creating this issue as I plan to work on it myself, and I'm writing it out as one might in an agile-ish workflow for demo purposes elsewhere. Ignore to your heart's content.

User Story

As a consumer of the Lord of the Rings API
I want developers of the API to have a smoother barrier of entry
So that the ongoing maintenance and improvement of the API can have a broader community of contributors

Acceptance Criteria

  • Some form of development automation is configured in the project
  • Documentation explains how to manage the running of the environment

Scope of Work

  • Determine which virtualization technology is better: docker containers or the ??? configuration to automate a VM setup
    • Preferably docker
  • Add readme documentation to build, run, and stop the environment

Blueprint

  • TBD

Improve password validation

At the moment we allow any password with min 1 character length which is not ideal.
So this needs to be changed and we should allow at least 8 characters long passwords with special characters, numbers, small and capital letters etc.

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.