Code Monkey home page Code Monkey logo

benandjerrys_api's Introduction

Ben & Jerry's API

A JSON API for finding which stores sell Ben & Jerry's ice cream and what flavors they stock.

This API was built using the data collected with the Ben & Jerry's scraper.

Using the API

Stores

All stores

Send a GET request to /api/v1/stores to get a collection of all stores rendered in JSON:

[
  {
    "id": 1,
    "name": "SAFEWAY",
    "address": "2227 S SHORE CENTER, ALAMEDA, CA 94501"
  },
  {
    "id": 2,
    "name": "LUCKY",
    "address": "815 MARINA VILLAGE PKWY, ALAMEDA, CA 94501"
  },
  ...
]

Individual stores

Send a GET request to /api/v1/stores/:store_id to get an individual store, including flavors sold, rendered in JSON:

{
  "id": 34,
  "name": "WALGREENS",
  "address": "301 E 18TH ST, OAKLAND, CA 94606",
  "flavors": [
    {
      "id": 11,
      "name": "Chocolate Chip Cookie Dough"
    },
    {
      "id": 12,
      "name": "Chocolate Fudge Brownie™"
    },
    {
      "id": 16,
      "name": "Chunky Monkey®"
    },
    ...
  ]
}

Flavors

All flavors

Send a GET request to /api/v1/flavors to get a collection of all flavors rendered in JSON:

[
  {
    "id": 1,
    "name": "Liz Lemon"
  },
  {
    "id": 2,
    "name": "Coffee"
  },
  {
    "id": 3,
    "name": "Coffee BuzzBuzzBuzz!"
  },
  ...
]

Individual flavors

Send a GET request to /api/v1/flavors/:flavor_id to get an individual flavor, including the description, ingredients and image url, rendered in JSON:

{
  "id": 30,
  "name": "Phish Food®",
  "description": "Chocolate Ice Cream with Gooey Marshmallow Swirls, Caramel Swirls & Fudge Fish",
  "ingredients": "Cream, Water, Skim Milk, Liquid Sugar (Sugar, Water), Corn Syrup, Sugar, Cocoa (Processed With
  Alkali), Coconut Oil, Butter (Cream, Salt), Egg Whites, Egg Yolks, Vanilla Extract, Corn Syrup Solids, Guar
  Gum, Cocoa, Milk Fat, Salt, Natural Flavor, Pectin, Carrageenan, Sodium Bicarbonate, Soy Lecithin."
  "img_url": "http://www.benjerry.com/templates/global-mobile-templates/assets/images/flavors/us/detail/7684010098.png"
}

benandjerrys_api's People

Contributors

fab avatar

Watchers

 avatar  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.