Giter VIP home page Giter VIP logo

item-catalog's Introduction

item-catalog

The purpose of the project is to understand the concepts Python framework Flask along with implementing third-party OAuth authentication and to develop a RESTful web application to display categories and items and gives logined user to edit or add items.

Getting Started

Prerequesites

Below software needs to be installed

Installing

To download the virtual machine using vagrant file

git clone https://github.com/udacity/fullstack-nanodegree-vm.git

To install downloaded virtual machine

cd fullstack-nanodegree-vm
vagrant up

To login to vagrant virtual machine

vagrant ssh

How to Run

git clone https://github.com/rajashekar/item-catalog.git
cd item-catalog
python catalog_views.py

open http://localhost:5000/

Demo

Available json endpoints

http://localhost:5000/catalog.json

{
  "categories": [
    {
      "id": 1, 
      "items": [
        {
          "category": "TV", 
          "description": "Samsung TV 55 inch 4K", 
          "id": 1, 
          "modified_date": "Sun, 15 Apr 2018 06:40:28 GMT", 
          "title": "Samsung TV", 
          "user_id": 1
        }, 
        {
          "category": "TV", 
          "description": "LG TV 55 inch 4K", 
          "id": 2, 
          "modified_date": "Sun, 15 Apr 2018 06:40:28 GMT", 
          "title": "LG TV", 
          "user_id": 1
        }
      ], 
      "name": "TV"
    }, 
    {
      "id": 2, 
      "items": [
        {
          "category": "Gaming Console", 
          "description": "Console game by Sony", 
          "id": 3, 
          "modified_date": "Sun, 15 Apr 2018 06:40:28 GMT", 
          "title": "Sony playstation 4", 
          "user_id": 1
        }, 
        {
          "category": "Gaming Console", 
          "description": "Console game by Microsoft", 
          "id": 4, 
          "modified_date": "Sun, 15 Apr 2018 06:40:28 GMT", 
          "title": "Xbox one", 
          "user_id": 1
        }, 
        {
          "category": "Gaming Console", 
          "description": "Console game by Nintendo", 
          "id": 5, 
          "modified_date": "Sun, 15 Apr 2018 06:40:28 GMT", 
          "title": "Nintendo", 
          "user_id": 1
        }
      ], 
      "name": "Gaming Console"
    }
  ]
}

http://localhost:5000/items.json

{
  "items": [
    {
      "category": "TV", 
      "description": "Samsung TV 55 inch 4K", 
      "id": 1, 
      "modified_date": "Sun, 15 Apr 2018 06:40:28 GMT", 
      "title": "Samsung TV", 
      "user_id": 1
    }, 
    {
      "category": "TV", 
      "description": "LG TV 55 inch 4K", 
      "id": 2, 
      "modified_date": "Sun, 15 Apr 2018 06:40:28 GMT", 
      "title": "LG TV", 
      "user_id": 1
    }, 
    {
      "category": "Gaming Console", 
      "description": "Console game by Sony", 
      "id": 3, 
      "modified_date": "Sun, 15 Apr 2018 06:40:28 GMT", 
      "title": "Sony playstation 4", 
      "user_id": 1
    }, 
    {
      "category": "Gaming Console", 
      "description": "Console game by Microsoft", 
      "id": 4, 
      "modified_date": "Sun, 15 Apr 2018 06:40:28 GMT", 
      "title": "Xbox one", 
      "user_id": 1
    }, 
    {
      "category": "Gaming Console", 
      "description": "Console game by Nintendo", 
      "id": 5, 
      "modified_date": "Sun, 15 Apr 2018 06:40:28 GMT", 
      "title": "Nintendo", 
      "user_id": 1
    }
  ]
}

http://localhost:5000/catalog/\/items/json

Example - http://localhost:5000/catalog/TV/items/json

{
  "items": [
    {
      "category": "TV", 
      "description": "Samsung TV 55 inch 4K", 
      "id": 1, 
      "modified_date": "Sun, 15 Apr 2018 06:40:28 GMT", 
      "title": "Samsung TV", 
      "user_id": 1
    }, 
    {
      "category": "TV", 
      "description": "LG TV 55 inch 4K", 
      "id": 2, 
      "modified_date": "Sun, 15 Apr 2018 06:40:28 GMT", 
      "title": "LG TV", 
      "user_id": 1
    }
  ]
}

http://localhost:5000/catalog/\/<item>/json

http://localhost:5000/catalog/TV/LG%20TV/json

{
  "item": {
    "category": "TV", 
    "description": "LG TV 55 inch 4K", 
    "id": 2, 
    "modified_date": "Sun, 15 Apr 2018 06:40:28 GMT", 
    "title": "LG TV", 
    "user_id": 1
  }
}

item-catalog's People

Contributors

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