Giter VIP home page Giter VIP logo

traidr's Introduction

Marketplace API Project - Traidr

Table of Contents

About

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.

Usage

  • Test the API thorough this Swagger Interactive Docs - here
  • You can also find the API Specifications Docs here

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes.

Prerequisites

ruby
rails
postgres

Setting up a development environment

Step 1: Clone the repository

git clone https://github.com/benessilfie/traidr.git

or with Github CLI

gh repo clone benessilfie/traidr

Step 2: Run Bundle install

bundle install

Step 3: start the server

rails start

Test the API (Locally)

  • 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

Example

Creating a user account

  • curl
curl --request POST \
  --url https://traidr.onrender.com/api/v1/users \
  --header 'Content-Type: application/json' \
  --data '{
    "user": {
      "email": "[email protected]",
      "password": "password"
    }
  }'
  • httpie
http https://traidr.onrender.com/api/v1/users \
user:='{"email":"[email protected]","password":"password"}'
{
    "user": {
        "email": "[email protected]",
        "password": "password"
    }
}

Response

{
    "data": {
        "id": "1",
        "type": "user",
        "attributes": {
            "email": "[email protected]"
        },
        "relationships": {
            "products": {
                "data": []
            }
        }
    }
}

Run the Mini Tests

To run the tests, just run the rails test command

rails test

Author

Benjamin Essilfie Quansah

traidr's People

Contributors

benessilfie avatar

Stargazers

Nana K. avatar Tiboah 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.