Closed cyanCYMK closed 9 years ago
Response to API endpoint /api/items/user/:userId (GET) is array with item and borrower/lender. Example response:
/api/items/user/:userId
[ { "id": 2, "title": "turmeric", "description": "Turmeric turmeric, it's good for your heart, turmeric turmeric, it'll make you fart", "beebucks": 80, "borrowed": false, "city": "San Francisco", "street": "944 Market", "state": "CA", "country": "USA", "imageurl": "http://authoritynutrition.com/wp-content/uploads/2014/03/a-pile-of-fresh-turmeric-roots.jpg", "createdAt": "2015-03-05T17:53:32.000Z", "updatedAt": "2015-03-05T17:53:32.000Z", "borrower_id": 4, "lender_id": 1, "borrower": { "id": 4, "fbid": null, "username": "samin", "firstname": "Samin", "lastname": "Sepasi", "fbprofile": null, "rating": 0, "beebucks": 20, "city": "San Francisco", "state": "CA", "street": "890 Market", "country": "USA", "zipcode": 94103, "fbpicture": null, "createdAt": "2015-03-02T19:26:38.000Z", "updatedAt": "2015-03-02T19:26:38.000Z" }, "lender": { "id": 1, "fbid": null, "username": "devin", "firstname": "Devin", "lastname": "Otway", "fbprofile": null, "rating": 4.5, "beebucks": 20, "city": "San Francisco", "state": "CA", "street": "60 Rausch", "country": "USA", "zipcode": 94103, "fbpicture": null, "createdAt": "2015-03-02T19:26:30.000Z", "updatedAt": "2015-03-02T19:29:08.000Z" } } ]
Response to API endpoint
/api/items/user/:userId
(GET) is array with item and borrower/lender. Example response: