Skip to content

Instantly share code, notes, and snippets.

@ajaykumar97
Last active November 19, 2019 03:10
Show Gist options
  • Save ajaykumar97/fb0e9af687be09b0115e29cc3872c4a9 to your computer and use it in GitHub Desktop.
Save ajaykumar97/fb0e9af687be09b0115e29cc3872c4a9 to your computer and use it in GitHub Desktop.
Dummy request readme
baseUrl: http://0:0:0:0:8888/dummy1/v1/
imagesPath: http://0:0:0:0:8888/dummy1/v1/thumbnail/(image_name)/width/height
Notes:
--> Send token in header in APIs like:
access_token: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VySWQiOjExLCJpYXQiOjE1MzExMjM3NDAsImV4cCI6MTUzMzcxNTc0MH0.ARupD0Y3bvzvCVDHeZtTFNU_6cFjNmwTMrqsIjD_C7M
=========================== Request Status Codes =======================
ACTION_COMPLETE: 200
CLIENT_ERROR: 400
INTERNAL_SERVER_ERROR: 500
SESSION_EXPIRED: 403
1) baseUrl/dummy1/:lang/addContractorReview
Request Type-: POST
--> Headers <--
access_token*
Content-type-: application/json
--> Parameters <--
contractor_id(string)*
rating(number)*
review(string)
--> Response <--
{
"message": "Successful.",
"status": 200,
"data": {
"review": "oiwjiodsfnsdlfks",
"is_enabled": 1,
"last_modified": "2019-10-12T06:47:37.139Z",
"created_on": "2019-10-12T06:47:37.139Z",
"_id": "5da1771023aa252ad8830c92",
"rating": 5,
"reviewed_to": "5d9614d5f569050d00769975",
"reviewed_by": {
"profile_pic": "",
"_id": "5d9cd05ae2c31b167081f420",
"username": "ajay homeowner4"
},
"__v": 0
}
}
1) baseUrl/dummy1/:lang/getContractorByName
Request Type-: GET
--> Headers <--
access_token*
--> Query Parameters <--
contractor_name(string)*
count(number) <-- number of results to be returned; defaults to 20
last_contractor_id(string)
--> Response <--
{
"message": "Successful.",
"status": 200,
"data": [
{
"profile_pic": "ziJe1570360535951-Batmanwallpaper.jpg",
"_id": "5d9614d5f569050d00769975",
"username": "username1",
"email": "ajay2@gmail.com",
"phone": "3947892"
},
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment