Hraesvel / AirBnB_clone

@Ostoyae and I are building Airbnb from scratch

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

๐Ÿก Airbnb Clone ๐Ÿ”ง

@OHraesvel and I are building an Airbnb clone. This first repo is the console for object management.

High Level Overview: C.R.U.D.D Sandbox

๐ŸŽฅ Create - Handles creating instances of objects such as Users, Places, Reviews, etc.

๐Ÿถ Retrieve - Handles reading data from a file or database such as finding users who staying in Toyko this week.

๐Ÿ”ง Update - Handles changing data/features such as adding a user to a host's home.

๐Ÿšฎ Destroy - Handles removal of objects such as deleting an inappropriate review.

๐Ÿƒ Do - Handles general operations such as calculating average review, trip price, etc.

๐Ÿ“œ Table of Contents

๐ŸŒŽ Environment

โฌ‡๏ธ Installation

  • Install Script - Installation Script
  • See examples of use for interactive vs. non-interactive mode

๐Ÿ“ Descriptions

Supported commands:

  • EOF - exits console
  • quit - exits console
  • <emptyline> - overwrites default emptyline method and does nothing
  • create - Creates a new instance ofBaseModel, saves it (to the JSON file) and prints the id
  • destroy - Deletes an instance based on the class name and id (save the change into the JSON file).
  • show - Prints the string representation of an instance based on the class name and id.
  • all - Prints all string representation of all instances based or not on the class name.
  • update - Updates an instance based on the class name and id by adding or updating attribute (save the change into the JSON file).

๐Ÿซ Examples

โžœ  AirBnB_clone git:(master) โœ—/console.py
(hbnb) helpDocumented commands (type help <topic>):
========================================
EOF  all  create  destroy  help  quit  show  update(hbnb) all MyModel
** class doesn't exist **
(hbnb) create BaseModel
bf183ab2-3719-477f-87a7-22f0209b0653
(hbnb) all BaseModel
[[BaseModel] (bf183ab2-3719-477f-87a7-22f0209b0653) {'created_
at': datetime.datetime(2019, 2, 20, 16, 8, 57, 823535), 'update
d_at': datetime.datetime(2019, 2, 20, 16, 8, 57, 823535), 'id':
 'bf183ab2-3719-477f-87a7-22f0209b0653'}]
(hbnb) show BaseModel bf183ab2-3719-477f-87a7-22f0209b0653
[BaseModel] (bf183ab2-3719-477f-87a7-22f0209b0653) {'created_at
': datetime.datetime(2019, 2, 20, 16, 8, 57, 823535), 'updated_
at': datetime.datetime(2019, 2, 20, 16, 8, 57, 823535), 'id': '
bf183ab2-3719-477f-87a7-22f0209b0653'}
(hbnb) destroy BaseModel bf183ab2-3719-477f-87a7-22f0209b0653
(hbnb) show BaseModel d094af47-b450-4cef-92ae-84f3c975b183
** no instance found **
(hbnb) quit

๐Ÿ› Bugs

None known at the this time. Please open a case should you find any.

:octocat: Authors :octocat:

๐Ÿ” License

This project is licensed under the MIT License - see the LICENSE.md file for details

About

@Ostoyae and I are building Airbnb from scratch

License:MIT License


Languages

Language:Python 74.8%Language:HTML 16.9%Language:CSS 8.0%Language:Shell 0.3%