v1
latestSwagger 2.02026-07-1312672.0 KBList posts by a user
Path parameters
The user ID of the user whose posts will be retrieved. Using 'me' as the user_id will return the posts for the current user.
Query parameters
How to sort the posts that are returned. One of: date, active, distance <br /><br /> 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.
A comma separated list of the post types to return. The available post types are: offer, wanted, admin
A comma separated list of the post sources to retrieve posts from. The available sources are: groups, trashnothing, open_archive_groups. The trashnothing source is for public posts that are posted on Trash Nothing but are not associated with any group. The open_archive_groups source provides a way to easily request posts from groups that have open_archives set to true without having to pass a group_ids parameter. When passed, it will automatically return posts from open archive groups that are within the area specified by the latitude, longitude and radius parameters (or all the open archive groups the requested user has posted to if latitude, longitude and radius aren't passed). <br /><br /> 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.
A comma separated list of the group IDs to retrieve posts from. This parameter is only used if the 'groups' source is passed in the sources parameter and only groups that the current user is a member of or that are open archives groups will be used (the group IDs of other groups will be silently discarded*). <br /><br /> 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*). <br /><br/> *To determine which group IDs were used and which were discarded, use the group_ids field in the response.
The number of posts to return per page (must be >= 1 and <= 100).
The page of posts to return.
Client device pixel ratio used to determine thumbnail size (default 1.0).
The latitude of a point around which to return posts.
The longitude of a point around which to return posts.
The radius in meters of a circle centered at the point defined by the latitude and longitude parameters. When latitude, longitude and radius are passed, only posts within the circle defined by these parameters will be returned.
Only posts newer than or equal to this UTC date and time will be returned.
Only posts older than this UTC date and time will be returned.
A comma separated list of the post outcomes to return. The available post outcomes are: satisfied, withdrawn <br /><br /> 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. If set to 'not-promised', only posts that are not satisfied ant not withdrawn and not expired and not promised are returned.
If set to 1 (the default), posts that are reposts will be included. If set to 0, reposts will be excluded. See the repost_count field of post objects for details about how reposts are identified.
Response
The posts and paging data.
Example response
{
"posts": [
{
"post_id": 3171898,
"group_id": 6,
"user_id": 2933,
"title": "Ultrasonic diffuser (Downtown Toronto)",
"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",
"type": "offer",
"outcome": "satisfied",
"latitude": 43.653226,
"longitude": -79.383184,
"footer": null,
"photos": [
{
"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",
"images": [
{
"url": "https://trashnothing.com/img/2018-02-05/cfsbfm-39051735845_379baab73f.90x120.jpg",
"width": 90,
"height": 120
},
{
"url": "https://trashnothing.com/img/2018-02-05/cfsbfm-39051735845_379baab73f.180x240.jpg",
"width": 180,
"height": 240
},
{
"url": "https://trashnothing.com/img/2018-02-05/cfsbfm-39051735845_379baab73f.270x360.jpg",
"width": 270,
"height": 360
},
{
"url": "https://trashnothing.com/img/2018-02-05/cfsbfm-39051735845_379baab73f.375x500.jpg",
"width": 375,
"height": 500
}
]
}
],
"expiration": "2018-03-05T15:10:21",
"reselling": false,
"url": "https://trashnothing.com/post/3171898/ultrasonic-diffuser-downtown-torronto",
"repost_count": 1
}
]
}