{"files":{"SKILL.md":"---\nname: trash-nothing\ndescription: \"Trash Nothing API skill. Use when working with Trash Nothing for users, groups, posts. Covers 12 endpoints.\"\nversion: 1.0.0\ngenerator: lapsh\n---\n\n# Trash Nothing\nAPI version: 1.4\n\n## Auth\nApiKey api_key in query\n\n## Base URL\nhttps://trashnothing.com/api/v1.4\n\n## Setup\n1. Set your API key in the appropriate header\n2. GET /groups -- search groups\n3. Explore available endpoints below\n\n## Endpoints\n12 endpoints across 3 groups. See references/api-spec.lap for full details.\n\n### Users\n| Method | Path | Description |\n|--------|------|-------------|\n| GET | /users/{user_id}/posts | List posts by a user |\n| GET | /users/{user_id}/posts/search | Search posts by a user |\n\n### Groups\n| Method | Path | Description |\n|--------|------|-------------|\n| GET | /groups | Search groups |\n| GET | /groups/{group_id} | Retrieve a group |\n| GET | /groups/multiple | Retrieve multiple groups |\n\n### Posts\n| Method | Path | Description |\n|--------|------|-------------|\n| GET | /posts | List posts |\n| GET | /posts/search | Search posts |\n| GET | /posts/all | List all posts |\n| GET | /posts/all/changes | List all post changes |\n| GET | /posts/{post_id}/display | Retrieve post display data |\n| GET | /posts/{post_id} | Retrieve a post |\n| GET | /posts/multiple | Retrieve multiple posts |\n\n## Common Questions\nMatch user requests to endpoints in references/api-spec.lap. Key patterns:\n- \"List all posts?\" -> GET /users/{user_id}/posts\n- \"Search search?\" -> GET /users/{user_id}/posts/search\n- \"List all groups?\" -> GET /groups\n- \"Get group details?\" -> GET /groups/{group_id}\n- \"List all multiple?\" -> GET /groups/multiple\n- \"List all all?\" -> GET /posts/all\n- \"List all changes?\" -> GET /posts/all/changes\n- \"List all display?\" -> GET /posts/{post_id}/display\n- \"Get post details?\" -> GET /posts/{post_id}\n- \"How to authenticate?\" -> See Auth section above\n\n## Response Tips\n- Check response schemas in references/api-spec.lap for field details\n- Paginated endpoints accept limit/offset or cursor parameters\n- Error responses include status codes and descriptions in the spec\n\n## References\n- Full spec: See references/api-spec.lap for complete endpoint details, parameter tables, and response schemas\n\n> Generated from the official API spec by [LAP](https://lap.sh)\n","references/api-spec.lap":"@lap v0.3\n# Machine-readable API spec. Each @endpoint block is one API call.\n@api Trash Nothing\n@base https://trashnothing.com/api/v1.4\n@version 1.4\n@auth ApiKey api_key in query\n@endpoints 12\n@toc users(2), groups(3), posts(7)\n\n@group users\n@endpoint GET /users/{user_id}/posts\n@desc List posts by a user\n@required {user_id: any # 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., types: any # A comma separated list of the post types to return.  The available post types are: offer, wanted, admin, sources: any # 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).  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.}\n@optional {sort_by: any # How to sort the posts that are returned.  One of: date, active, distance  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., group_ids: any # 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*).  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: any # The number of posts to return per page (must be >= 1 and <= 100)., page: any # The page of posts to return., device_pixel_ratio: any # Client device pixel ratio used to determine thumbnail size (default 1.0)., latitude: any # The latitude of a point around which to return posts., longitude: any # The longitude of a point around which to return posts., radius: any # 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., date_min: any # Only posts newer than or equal to this UTC date and time will be returned., date_max: any # Only posts older than this UTC date and time will be returned., outcomes: any # A comma separated list of the post outcomes to return.  The available post outcomes are: satisfied, withdrawn  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., include_reposts: any # 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.}\n@returns(200) The posts and paging data.\n@errors {400: Missing or invalid parameters.}\n\n@endpoint GET /users/{user_id}/posts/search\n@desc Search posts by a user\n@required {user_id: any # 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., search: any # The search query used to find posts., types: any # A comma separated list of the post types to return.  The available post types are: offer, wanted, admin, sources: any # 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).  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.}\n@optional {sort_by: any # How to sort the posts that are returned.  One of: relevance, date, active, distance  Relevance sorting will sort the posts that best match the search query first. 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., group_ids: any # 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*).  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: any # The number of posts to return per page (must be >= 1 and <= 100)., page: any # The page of posts to return., device_pixel_ratio: any # Client device pixel ratio used to determine thumbnail size (default 1.0)., latitude: any # The latitude of a point around which to return posts., longitude: any # The longitude of a point around which to return posts., radius: any # 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., date_min: any # Only posts newer than or equal to this UTC date and time will be returned., date_max: any # Only posts older than this UTC date and time will be returned., outcomes: any # A comma separated list of the post outcomes to return.  The available post outcomes are: satisfied, withdrawn  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., include_reposts: any # 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.}\n@returns(200) The posts and paging data.\n@errors {400: Missing or invalid parameters.}\n\n@endgroup\n\n@group groups\n@endpoint GET /groups\n@desc Search groups\n@optional {name: any # Find groups that have the given text somewhere in their name (case insensitive)., latitude: any # Find groups near the given latitude and longitude., longitude: any # Find groups near the given latitude and longitude., distance: any # When latitude and longitude are passed, distance can optionally be passed to only return groups within a certain distance (in kilometers) from the point specified by the latitude and longitude.  The distance must be > 0 and <= 150 and will default to 100., country: any # Find groups in the given country where country is a 2 letter country code for the country (see https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2 )., region: any # For countries with regions (AU, CA, GB, US), search groups in a specific region as specified by the region abbreviation.  The supported regions and their abbreviations are listed below.  NOTE: The region and postal_code parameters cannot be used at the same time and if both are passed then the postal_code will take priority.  ---  **AU** - QLD: Queensland - SA: South Australia - TAS: Tasmania - VIC: Victoria - WA: Western Australia - NT: Northern Territory - NSW: New South Wales - ACT  **CA** - AB: Alberta - BC: British Columbia - MB: Manitoba - NB: New Brunswick - NL: Newfoundland and Labrador - NS: Nova Scotia - ON: Ontario - QC: Quebec - SK: Saskatchewan - PE: Prince Edward Island  **GB** - E: East - EM: East Midlands - LDN: London - NE: North East - NW: North West - NI: Northern Ireland - SC: Scotland - SE: South East - SW: South West - WA: Wales - WM: West Midlands - YH: Yorkshire and the Humber  **US** All 50 states and the District of Columbia are supported.  For the abbreviations, see: https://github.com/jasonong/List-of-US-States/blob/master/states.csv, postal_code: any # Find groups in the given postal code.  Only a few countries support postal code searches (US, CA, AU, GB).  The country parameter must be passed when the postal_code parameter is set.  NOTE: The region and postal_code parameters cannot be used at the same time and if both are passed then the postal_code will take priority., page: any # The page of groups to return., per_page: any # The number of groups to return per page (must be >= 1 and <= 100).}\n@returns(200) The groups and paging data.\n@errors {400: Missing or invalid parameters.}\n\n@endpoint GET /groups/{group_id}\n@desc Retrieve a group\n@required {group_id: any # The ID of the group to retrieve.}\n@returns(200) The group.\n@errors {404: Group not found.}\n\n@endpoint GET /groups/multiple\n@desc Retrieve multiple groups\n@required {group_ids: any # The IDs of the groups to retrieve.  If more than 20 group IDs are passed, only the first 20 groups will be returned.}\n@optional {latitude: any # If latitude and longitude are passed, each group returned will have a supported_point boolean property indicating whether the group supports the point., longitude: any # If latitude and longitude are passed, each group returned will have a supported_point boolean property indicating whether the group supports the point.}\n@returns(200) The groups.\n@errors {400: Missing or invalid parameters.}\n\n@endgroup\n\n@group posts\n@endpoint GET /posts\n@desc List posts\n@required {types: any # A comma separated list of the post types to return.  The available post types are: offer, wanted, admin, sources: any # 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 the current users' location if latitude, longitude and radius aren't passed).  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.}\n@optional {sort_by: any # How to sort the posts that are returned.  One of: date, active, distance  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., group_ids: any # 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*).  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: any # The number of posts to return per page (must be >= 1 and <= 100)., page: any # The page of posts to return., device_pixel_ratio: any # Client device pixel ratio used to determine thumbnail size (default 1.0)., latitude: any # The latitude of a point around which to return posts., longitude: any # The longitude of a point around which to return posts., radius: any # 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., date_min: any # Only posts newer than or equal to this UTC date and time will be returned.  If unset, defaults to the current date and time minus 90 days., date_max: any # Only posts older than this UTC date and time will be returned.  If unset, defaults to the current date and time., outcomes: any # A comma separated list of the post outcomes to return.  The available post outcomes are: satisfied, withdrawn  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., include_reposts: any # 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.}\n@returns(200) The posts and paging data.\n@errors {400: Missing or invalid parameters.}\n\n@endpoint GET /posts/search\n@desc Search posts\n@required {search: any # The search query used to find posts., types: any # A comma separated list of the post types to return.  The available post types are: offer, wanted, admin, sources: any # 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 the current users' location if latitude, longitude and radius aren't passed).  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.}\n@optional {sort_by: any # How to sort the posts that are returned.  One of: relevance, date, active, distance  Relevance sorting will sort the posts that best match the search query first. 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., group_ids: any # 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*).  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: any # The number of posts to return per page (must be >= 1 and <= 100)., page: any # The page of posts to return., device_pixel_ratio: any # Client device pixel ratio used to determine thumbnail size (default 1.0)., latitude: any # The latitude of a point around which to return posts., longitude: any # The longitude of a point around which to return posts., radius: any # 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., date_min: any # Only posts newer than or equal to this UTC date and time will be returned.  If unset, defaults to the current date and time minus 90 days., date_max: any # Only posts older than this UTC date and time will be returned.  If unset, defaults to the current date and time., outcomes: any # A comma separated list of the post outcomes to return.  The available post outcomes are: satisfied, withdrawn  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., include_reposts: any # 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.}\n@returns(200) The posts and paging data.\n@errors {400: Missing or invalid parameters.}\n\n@endpoint GET /posts/all\n@desc List all posts\n@required {types: any # A comma separated list of the post types to return.  The available post types are: offer, wanted, date_min: any # Only posts newer than or equal to this UTC date and time will be returned. The UTC date and time used must be within a day or less of date_max. And the date and time must be within the last 30 days. And the date and time must be rounded to the nearest second., date_max: any # Only posts older than this UTC date and time will be returned. The UTC date and time used must be within a day or less of date_min. And the date and time must be rounded to the nearest second.}\n@optional {per_page: any # The number of posts to return per page (must be >= 1 and <= 50)., page: any # The page of posts to return., device_pixel_ratio: any # Client device pixel ratio used to determine thumbnail size (default 1.0).}\n@returns(200) The posts.\n@errors {400: Missing or invalid parameters.}\n\n@endpoint GET /posts/all/changes\n@desc List all post changes\n@required {date_min: any # Only changes newer than or equal to this UTC date and time will be returned. The UTC date and time used must be within a day or less of date_max. And the date and time must be within the last 30 days. And the date and time must be rounded to the nearest second., date_max: any # Only changes older than this UTC date and time will be returned. The UTC date and time used must be within a day or less of date_min. And the date and time must be rounded to the nearest second.}\n@optional {per_page: any # The number of changes to return per page (must be >= 1 and <= 50)., page: any # The page of changes to return.}\n@returns(200) The changes.\n@errors {400: Missing or invalid parameters.}\n\n@endpoint GET /posts/{post_id}/display\n@desc Retrieve post display data\n@required {post_id: any # The ID of the post to retrieve.}\n@returns(200) The post and related data.\n@errors {403: The user doesn't have permission to access the post., 404: Post not found.}\n\n@endpoint GET /posts/{post_id}\n@desc Retrieve a post\n@required {post_id: any # The ID of the post to retrieve.}\n@returns(200) The post.\n@errors {403: The user doesn't have permission to access the post., 404: Post not found.}\n\n@endpoint GET /posts/multiple\n@desc Retrieve multiple posts\n@required {post_ids: any # A comma separated list of the post IDs. If more than 10 post IDs are passed, only the first 10 posts will be returned.}\n@returns(200) The posts.\n\n@endgroup\n\n@end\n"}}