QuickHelper Project home

URL

http://quickhelperserver-andyfengc.rhcloud.com/quickhelper

Get all tasks

GET /api/tasks

Response

[
  {
      "address": "201 bay street",
      "id": 2,
      "content": null,
      "startTime": null,
      "endTime": null,
      "author": {
          "id": 1,
          "createdTime": 1502206250000,
          "userName": "andyf",
          "password": "123",
          "avatar": "https://media.licdn.com/mpr/mpr/shrinknp_400_400/p/8/005/01e/0bd/31f0f9f.jpg",
          "nickName": "Andy",
          "phoneNumber": "647-123-1234",
          "email": "andyinbox3@gmail.com",
          "tasks": []
      },
      "authorId": 1,
      "categoryId": 1,
      "createdTime": "2017-08-05 12:13:01",
      "category": {
          "name": "接送",
          "id": 1,
          "tasks": []
      },
      "title": "请求接送",
      "price": 0
  },
  ...
]

Get tasks by id

GET /api/tasks/:id

Parameter

Response

{
    "address": "201 bay street",
    "id": 2,
    "content": null,
    "startTime": null,
    "endTime": null,
    "author": {
        "id": 1,
        "createdTime": 1502206250000,
        "userName": "andyf",
        "password": "123",
        "avatar": "https://media.licdn.com/mpr/mpr/shrinknp_400_400/p/8/005/01e/0bd/31f0f9f.jpg",
        "nickName": "Andy",
        "phoneNumber": "647-123-1234",
        "email": "andyinbox3@gmail.com",
        "tasks": []
    },
    "authorId": 1,
    "categoryId": 1,
    "createdTime": "2017-08-05 12:13:01",
    "category": {
        "name": "接送",
        "id": 1,
        "tasks": []
    },
    "title": "请求接送",
    "price": 0
}

add a task

POST /api/tasks

Request

{
	"title" : "找装修师傅",
	"address": "123 queen street",
	"createdTime" : "2017-08-10 12:13:01",
	"content": "本人打算装修地下室,面积300尺,预算5万左右,希望寻找一名有经验的装修师傅",
	"price" : 50000,
	"startTime" : "2017-09-01 12:00:00",
	"authorId" : "1",
	"categoryId" : "1"
}

Response

{
    "success": true
}

update a task

PUT /api/tasks/:id

Parameter

Request

{
	"title" : "找装修师傅",
	"address": "123 queen street",
	"createdTime" : "2017-08-10 12:13:01",
	"content": "本人打算装修地下室,面积300尺,预算5万左右,希望寻找一名有经验的装修师傅",
	"price" : 50000,
	"startTime" : "2017-09-01 12:00:00",
	"authorId" : "1",
	"categoryId" : "1"
}

Response

{
    "success": true
}

delete a task

DELETE /api/tasks/:id

Parameter

Request

{
    "success": true
}
Welcome to Andy's projects