Skip to content

online retail website ๐Ÿค Made with ruby on rails ๐Ÿ’Ž

Notifications You must be signed in to change notification settings

Y-Info/LeBonCoin

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

Project ads aka "leboncoin"

School project aiming at the creation of a classified ad site such as for example: https://www.leboncoin.fr/

Production site

Deploy with heroku

Getting Started

Start serveur

rails s

Some Help

Modification of the database

rails g migration 

rails db:migrate

Data loading

rails db:seed

Create database + data loading

rails db:setup

Connection as Admin

Mail : [email protected]
Password : password

Connection as User

Mail : [email protected]
Password : password

UseFull link

Prerequisites

Work with PostgreSQL database

Install & lunch

bundle install

rails db:setup

rails s

Running the tests

Run test

spring rails test

API Documentation

This part describe all interaction you can have whith the API

Request possible Without connection token

You can access the list of ads,

https://app-ruby-listing-al-ap.herokuapp.com/api/v1/annonces

And the list of categories

https://app-ruby-listing-al-ap.herokuapp.com/api/v1/categories

Getting a connection token

to have a connection token you just have to connect with your account by sending a post request

For example

https://app-ruby-listing-al-ap.herokuapp.com/api/[email protected]&password=password

This request will send you a connection token

   "success": true,
   "token": "316ff99f-2657-4329-b585-c5d2af96a1ab"

You must keep this token that you can pass during the next requests in the header with the key: TOKEN

Request possible With connection token

You can access to account information,

https://app-ruby-listing-al-ap.herokuapp.com/api/v1/account

messages receive

https://app-ruby-listing-al-ap.herokuapp.com/api/v1/msgreceive

and all messages send

https://app-ruby-listing-al-ap.herokuapp.com/api/v1/msgsent

You can also create an ads
The params require are : category_id, content, price and title

https://app-ruby-listing-al-ap.herokuapp.com/api/v1/create-annonce?category_id=2&content=I'm the content&price=100&title=Test

You can send a message for an ads
The params require are : annonce_id and message

https://app-ruby-listing-al-ap.herokuapp.com/api/v1/create-message?annonce_id=1&message=Hello i'm a new message

Authors

About

online retail website ๐Ÿค Made with ruby on rails ๐Ÿ’Ž

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published