Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ahmedhamid13/ecommerce-api
https://api-ecomm.herokuapp.com
https://github.com/ahmedhamid13/ecommerce-api
api postgresql postman ruby-on-rails
Last synced: about 1 month ago
JSON representation
https://api-ecomm.herokuapp.com
- Host: GitHub
- URL: https://github.com/ahmedhamid13/ecommerce-api
- Owner: ahmedhamid13
- Created: 2020-07-10T21:18:55.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2022-08-12T13:02:36.000Z (over 2 years ago)
- Last Synced: 2023-03-04T11:13:23.356Z (almost 2 years ago)
- Topics: api, postgresql, postman, ruby-on-rails
- Language: Ruby
- Homepage: https://api-ecomm.herokuapp.com
- Size: 201 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# E-Commerce API
# Getting Start
1. Download the zipped file and unzip it or Clone it
```
git clone https://github.com/Ahmed-Abd-elhamid/ecommerce-api
```
2. cd inside the project
```sh
cd ecommerce-api
```
3. Run this command to install all gems we used
```sh
bundle install
```
4. run this command to create your database
```sh
rake db:create db:migrate
```
5. seed the database - generate dummy data
```sh
rake db:seed
```
6. get api-endpoints by
```sh
rake routes
```
7. Start your server
```sh
rails server
```# Production ecommece-api url
https://api-ecomm.herokuapp.com/# Postman Doc for ecommece-api url
https://documenter.getpostman.com/view/12318086/TVCcWTzB# API-EndPoints
1) categoreis end-points
* GET /categories
* GET /categories/:id
* POST /categories
>> params: title
* PUT /categories/:id
>> params: title
* DELETE /categories/:id2) sub_categoreis end-points
* GET /sub_categories
* GET /sub_categories/:id
* POST /sub_categories
>> params: title, category_id
* PUT /sub_categories/:id
>> params: title, category_id
* DELETE /sub_categories/:id3) items end-points
* GET /items
* GET /items
>> params: search
* GET /items/:id
* POST /items
>> params: title, brand, description, stock, price, sub_category_id, images[]
* PUT /items/:id
>> params: title, brand, description, stock, price, sub_category_id, images[]4) carts end-points
* GET /carts
* GET /carts/:id
* POST /carts
>> params: item_id, user_id, quantity
* POST /carts/items/:id
>> params: item_id
* DELETE /carts/:id5) orders end-points
* GET /orders
* GET /orders/:id
* POST /orders
>> params: user_id, country, city, address, telephone
* PUT /orders/:id
>> params: country, city, address, telephone
* PUT orders/deliver/:id
* DELETE /orders/:id6) users end-points
* GET /users
* GET /users/:id
* DELETE /users/:id
* POST /users
>> params: name, email, password, password_confirmation, avatar
* PUT /users
>> params: password, password_confirmation
* DELETE /users
* POST /users/sign_in
>> params: email, password
* DELETE /users/sign_out
>> params: uid, access-token, clientTo Authenticate all requests you should pass this params: uid, access-token, client, with every request in header.. but for now all request doesn't require authentication.
# By: Ahmed Abdelhamid