Code Monkey home page Code Monkey logo

thecocktaildb-downloader's Introduction

Build

TheCocktailDB Downloader

TheCocktailDB API offers over 500 drink recipes in JSON format. The API is great for many projects, but some need an offline version of the data. This project fetches data from TheCocktailDB for offline use.

How to get the data?

For most uses, here are dumps of the data returned by TheCocktailDB API on the 23rd of May, 2021:

Directory Content
without-images TypeScript typing (types.ts) and an array of all of the drinks (drinks.ts).
with-images As above, but includes images of the drinks. The thumbnailFilename property in the drink points to the matching image.

Please support TheCocktailDB when using the data for commercial purposes.

Getting fresh data

If the above data is too old for you, run the downloader to get fresh data:

  1. Install Node.js and Yarn
  2. yarn in the root project directory to fetch all dependencies
  3. yarn start to start the download process

Converting drinks.js to SQL

If you'd rather have the data in SQL format, perform these steps after running the downloader:

  1. Open drinks.ts with a text editor.
  2. Remove the following from the beginning of the file:
import { Drink } from "./types";

export const drinks: Drink[] =
  1. The file should now start with [{ and end with }]
  2. Save the file.
  3. Feed the file to a conversion tool, e.g. Convert JSON to SQL, to create the CREATE TABLE and INSERT statements to enter the data to your database.

Feature requests and bug reports

Both are welcome, just open an issue.

Projects using this data

If you've built a public project with this data and want the project mentioned here, make a PR.

thecocktaildb-downloader's People

Contributors

lauriharpf avatar dependabot[bot] avatar

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.