Traidr is a marketplace API that allows users to seamlessly buy and sell products. Users can basically create their own store upload products to sell or place orders on the platform.
- Test the API thorough this Swagger Interactive Docs - here
- You can also find the API Specifications Docs here
These instructions will get you a copy of the project up and running on your local machine for development and testing purposes.
ruby
rails
postgres
git clone https://github.com/benessilfie/traidr.git
or with Github CLI
gh repo clone benessilfie/traidr
bundle install
rails start
-
You can either go to the interactive swagger documentation locally at
http://api.lvh.me:3000/v1/docs
or the deployed version here -
Alternatively you can also use the API testing tool of your choice. You'll find the API documentation with the base URL and various endpoints here
- curl
curl --request POST \
--url https://traidr.onrender.com/api/v1/users \
--header 'Content-Type: application/json' \
--data '{
"user": {
"email": "test@example.com",
"password": "password"
}
}'
- httpie
http https://traidr.onrender.com/api/v1/users \
user:='{"email":"test@example.com","password":"password"}'
- postman
- URL - https://traidr.onrender.com/api/v1/users
- Method - POST
{
"user": {
"email": "test@example.com",
"password": "password"
}
}
{
"data": {
"id": "1",
"type": "user",
"attributes": {
"email": "test@example.com"
},
"relationships": {
"products": {
"data": []
}
}
}
}
To run the tests, just run the rails test
command
rails test