Code Monkey home page Code Monkey logo

tyrannosaurus.rest's Introduction

๐Ÿฆ• tyrannosaurus.rest ๐Ÿฆ–

Build Status

The Dinosaur Rest API, because why the hell not?

The word 'dinosaur' originates from the Greek words deinos meaning 'terrible' and sauros meaning 'lizard'. Hence the word 'dinosaur' actually means 'terrible lizard'. That said, there are a lot of misconceptions today regarding the actual creatures that the general public mislabel as 'dinosaur' (e.g. ichthyosaurs, mosasaurs, pterosaurs etc. are not actually 'dinosaurs' at all.)

I hope by categorizing information in this API through endpoints, a clearer picture can be painted regarding their mislabeling.

Usage & Deploying

Assuming you've got npm and Node installed on your machine:

  1. git clone https://github.com/rakhadjo/tyrannosaurus.rest.git
  2. cd tyrannosaurus.rest
  3. npm install
  4. npm start

By default I set the app to run on localhost port 1212

Endpoints

tyrannosaurus.rest only accepts GET requests. No authentication has been planned yet for this project. Simply perform an HTTP GET request on the following endpoints to receive your content requests. Data will be returned in the json format. More on this later.

Dinosaur Information

There are two ways of getting the dinosaur information.

Unordered, uncategorized

The first way is to simply substitute the dinosaur name: GET (host)/dinosaur/{dino-name}

Currently supported endpoints to substitute {dino-name} can be found in static_content/endpoints.js

Categorized by Era

...needs work...

Return Type

In most cases, the return type will be as follows:

{ 
   "name": "",
   "is_dino": "",
   "diet": "",
   "era": "",
   "found": "",
   "avg_weight_kg": "",
   "avg_length_m": "",
   "movement": ""
}

Data is retrieved from dinosaurs.js supposedly located in the root directory.

Developer

/about

Some meta-information of the API, developer, etc.

/endpoints

Returns the endpoints, and their descriptions.

Random

/movies

List of Movies containing the general public understanding of what dinosaurs are ๐Ÿ˜’

/random

Returns some random dinosaur entry

/dinobots

Transformers Reference, they're essentially Autobots that can transform to prehistoric creatures.

/sounds/{identifier}

Me trying my best to represent each of their sounds with what I can do with my keyboard. Will return 404 if empty

tyrannosaurus.rest's People

Contributors

rakhadjo avatar

Stargazers

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

Watchers

 avatar

tyrannosaurus.rest's Issues

This repo is broken :(

index.js:3

import dinobase from "./dinosaurs.js";

dinosaur.js doesn't exist :(

I've read through the instructions as I wondered if it was supposed to be generated using the python but I can't see any reference and looking at the python code I think this is something you used manually.

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.