Giter Site home page Giter Site logo

madfoodtruck's Introduction

Food Truck: A SF Food Truck Tracker

A Console Application which utilizes City of San Francisco's Food Truck API provided by DataSF to list open food trucks at the time of use in the San Francisco area.

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development purposes.

Prerequisites

You can obtain an optional token to make API calls here

(Note: You can still make a limited amount of API calls without obtaining one)

Installing

  • Clone repository
  • Install needed gems using the Gemfile
    • run bundle install in the /FoodTuck directory
  • If you obtain your own token, place in a .env file
    • TOKEN = "YOUR-TOKEN"

Running the CLI

  • Run ruby main.rb
  • As the first call is made to print results, you may continue by typing 'Y' or 'y'
  • Press any other key to exit the program

Resources Used

Future Features to Implement

  • Edge Case: Not getting all Open Times filtering through the API request with time filters.

    • Ex. When trucks were open 8pm - 2am and the user checked for available trucks at around 1:30am, they would miss on these open ones due to the current implementation. As filtering would show that the start time (8pm) is technically not less than the supposed current time (1:30am)
    • Create a TimeRange class to check for edge cases.
    • Trade off loading less data by loading only with the DAY_OF_WEEK filter to get more correct information by including any ones that meet the edge case.
  • Web App:

    • To expand this to a Ruby on Rails MVC based web app, I would:
      • Discard the main.rb file
      • Create a food_truck_controller.rb and correlating html view file which would have an index method calling my SodaApiWrapper class and get_open_trucks(offset) method to display a list of trucks.
      • The pagination would be implemented in the controller

madfoodtruck's People

Contributors

madaleines avatar

Stargazers

 avatar

Watchers

James Cloos 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.