Skip to content

sean7218/ubereats-api

Repository files navigation

Uber Eats API - Express.js

Bitrise node version Follow me Github Followers Test Coverage

Table of Contents

  1. User
  2. Endpionts
  3. CI/CD

User

  • URL

    https://api.zxsean.com/user/register

  • Method:

    POST

  • URL Params

    Required:

    name=[string] , email=[string] , password=[string] , phone=[integer]

    Optional:

    id=[integer]

  • Data Params

    {
        "name": "Sean Zhang",
        "email": "sean@randomemail.com",
        "password": "psw123",
        "phone": 2023334444
    }
  • Success Response:

    • Code: 200
      Content: { id : 12 }
  • Error Response:

    • Code: 401 UNAUTHORIZED
      Content: { error : "registration error" }

  • URL

    https://api.zxsean.com/user/:id

  • Method:

    GET

  • URL Params

    Required:

    id=[integer]

  • Data Params

    {
        "id": 1,
    }
  • Success Response:

    • Code: 200
      Content: { id : 11 }
  • Error Response:

    • Code: 401 UNAUTHORIZED
      Content: { error : "can't find user" }

NONE

  • Success Response:

    • Code: 200
      Content:
      [
          {
              "id": 1,
              "name": "Kevin Hart",
              "email": "kevin@gmail.com",
              "password": "$2a$10$cVR6XquMOMHlKQzay8lErui3w6/.j2ZtVm5ai5IeeY90ZeYGXGGza",
              "phone": 1231231122,
              "createdAt": "2018-08-11",
              "updatedAt": "2018-08-11"
          },
          {
              "id": 2,
              "name": "2 Pac",
              "email": "twopac@gmail.com",
              "password": "$2a$10$5COzp14UCuBBPxqvxOAxNesRkbwLdtVdD24I9SJIat9Nxumg3z0WW",
              "phone": 1231231122,
              "createdAt": "2018-08-11",
              "updatedAt": "2018-08-11"
          }
      ]
  • Error Response:

    • Code: 401 UNAUTHORIZED
      Content: { error : "users can be listed" }

  • URL

    https://api.zxsean.com/yelp

  • Method:

    GET

  • URL Params

    term=[string], lat=[double], long=[double], x-access-token=[string]

  • Success Response:

    • Code: 200
      Content:
      [
          {
              "name": "Vero Pizza Napoletana",
              "url": "https://s3-media4.fl.yelpcdn.com/bphoto/OjoO-z3WBwRzlHifvP0vcA/o.jpg",
              "rating": 4,
              "price": "$$",
              "review_count": 156
          },
          {
              "name": "Dewey's Pizza",
              "url": "https://s3-media1.fl.yelpcdn.com/bphoto/iOboHiGvLgp24eOkVRyEiQ/o.jpg",
              "rating": 4.5,
              "price": "$$",
              "review_count": 147
          }
      ]
  • Error Response:

    • Code: 401 UNAUTHORIZED
      Content: { error : "business can be listed" }

Continous Integration

  • The api is build on Bitrise and deployed to the dev server
  • If you are contributing and want to build the dev server, please DM sean7218
  • The api test needs to be written and test needs to be running every day trigger on the Bitrise

login terminated

Releases

No releases published

Packages

No packages published