List posts by a user
GET
/users/{user_id}/posts
users
Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request GET 'https://trashnothing.com/api/v1.2/users//posts?types=&sources='
Response Response Example
200 - Example 1
{
"end_index": 0,
"group_ids": [
"string"
],
"last_listings_view": "2019-08-24T14:15:22Z",
"num_pages": 0,
"num_posts": 0,
"page": 0,
"per_page": 0,
"posts": [
{
"content": "This ultrasonic diffuser creates an aroma in your home. It comes with two essential oils - mint and lavender.",
"date": "2018-02-05T15:10:21",
"footer": null,
"group_id": 6,
"latitude": 43.653226,
"longitude": -79.383184,
"outcome": "satisfied",
"photos": [
{
"images": [
{
"height": 120,
"url": "https://trashnothing.com/img/2018-02-05/cfsbfm-39051735845_379baab73f.90x120.jpg",
"width": 90
},
{
"height": 240,
"url": "https://trashnothing.com/img/2018-02-05/cfsbfm-39051735845_379baab73f.180x240.jpg",
"width": 180
},
{
"height": 360,
"url": "https://trashnothing.com/img/2018-02-05/cfsbfm-39051735845_379baab73f.270x360.jpg",
"width": 270
},
{
"height": 500,
"url": "https://trashnothing.com/img/2018-02-05/cfsbfm-39051735845_379baab73f.375x500.jpg",
"width": 375
}
],
"photo_id": "695624-768616",
"thumbnail": "https://trashnothing.com/img/2018-02-05/cfsbfm-39051735845_379baab73f.90x120.jpg",
"url": "https://trashnothing.com/img/2018-02-05/cfsbfm-39051735845_379baab73f.375x500.jpg"
}
],
"post_id": 3171898,
"title": "Ultrasonic diffuser (Downtown Toronto)",
"type": "offer",
"user_id": 2933
}
],
"start_index": 0
}
Request
Path Params
user_id
stringÂ
required
Query Params
sort_by
stringÂ
optional
Date sorting will sort posts from newest to oldest. Active sorting will sort active posts before satisfied, withdrawn and expired posts and then sort by date. Distance sorting will sort the closest posts first.
types
stringÂ
required
sources
stringÂ
required
NOTE: For requests using an api key instead of oauth, passing the trashnothing source or the open_archive_groups source makes the latitude, longitude and radius parameters required.
group_ids
stringÂ
optional
NOTE: For requests using an api key instead of oauth, this field is required if the 'groups' source is passed. In addition, only posts from groups that have open_archives set to true will be used (the group IDS of other groups will be silently discarded*).
*To determine which group IDs were used and which were discarded, use the group_ids field in the response.
per_page
integerÂ
optional
The number of posts to return per page (must be >= 1 and <= 100).
page
integerÂ
optional
device_pixel_ratio
numberÂ
optional
latitude
numberÂ
optional
longitude
numberÂ
optional
radius
numberÂ
optional
date_min
stringÂ
optional
date_max
stringÂ
optional
outcomes
stringÂ
optional
There are also a couple special values that can be passed. If set to an empty string (the default), only posts that are not satisfied and not withdrawn and not expired are returned. If set to 'all', all posts will be returned no matter what outcome the posts have.
Responses
Modified at 2022-09-11 18:59:48