action trashnothing_get_post_and_related_data {
label: "Retrieve post display data"
description: "Retrieve a post and other data related to the post that is useful for displaying the post such as data about the user who posted the post and the groups the post was posted on.\n"
provider: trashnothing
method: GET
path: "/posts/{post_id}/display"
encoding: json
input: {
type: "object"
properties: {
post_id: {
type: "string"
}
}
required: ["post_id"]
additionalProperties: false
}
output: {
type: "object"
properties: {
author: {
type: "object"
properties: {
about_me: {
type: "string"
description: "A short bio a user has written about themselves to help other members get to know them better. May be null if the user has not written anything about themselves.\n"
}
country: {
type: "string"
description: "A 2 letter country code for the country that has been automatically detected for the user (see https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2 ). May be null if no country has been set.\n"
}
feedback: {
type: "object"
properties: {
percent_positive: {
type: "number"
description: "The percent of feedback that this user has received in the last year that was positive. May be null if a user has not received enough feedback to calculate a percentage.\n"
}
restriction: {
type: "string"
description: "If the current user can leave positive or negative feedback on this user then restriction is null.
Otherwise, restriction is set to a string that explains why feedback is currently restricted and what type of feedback is restricted. The string will be one of the following: no-recent-messages, negative-score, moderator, [days]-day-wait-for-negative
- **no-recent-messages**: The current user has not received any messages from this user in the last 30 days.
- **negative-score**: The current user has a negative feedback and will not be able to leave feedback until their score is >= 0.
- **moderator**: The user is a moderator and leaving feedback on moderators is not currently supported.
- **[days]-day-wait-for-negative**: Positive feedback is not restricted but the current user must wait\n some number of days before they will be able to leave negative feedback on this user. This string can \n change depending on the number of days. For example, when the current user must wait one day, the\n string will be '1-day-wait-for-negative'. A wait is necessary because a lot of negative feedback results\n from communication issues that are resolved with more time.\n"
}
score: {
type: "integer"
description: "The feedback score of this user. Higher scores are better. Scores are calculated by substracting the total number of negative feedback from the total number of positive feedback that a user has received. May be null if a user has not received enough feedback to calculate a score.\n"
}
}
}
firstname: {
type: "string"
description: "The first name of the user (may be null)."
}
lastname: {
type: "string"
description: "The last name of the user (may be null)."
}
member_since: {
type: "string"
description: "The date and time when the user first became publicly active on a group (the date may be older than when the user signed up)."
}
profile_image: {
type: "string"
description: "A URL to a profile image for the user. Profile images sizes vary based on the source (Google, Facebook, Gravatar, etc) and some can be as small as 64px by 64px. Will be null for api key requests and requests where the oauth user doesn't belong to any of the same groups as this user.\n"
}
reply_time: {
type: "integer"
description: "An estimate of how many seconds it takes this user to reply to messages. May be null when there is not enough data to calculate an estimate.\n"
}
user_id: {
type: "string"
}
username: {
type: "string"
description: "A username that can be displayed for the user (the username is NOT guaranteed to be unique). Will be null for api key requests and requests where the oauth user doesn't belong to any of the same groups as this user.\n"
}
}
}
author_offer_count: {
type: "integer"
description: "Count of offer posts made by the post author in the last 90 days."
}
author_posts: {
type: "array"
description: "Other active posts from the post author in the last 90 days. A maximum of 30 posts will be returned.\n"
items: {
type: "object"
description: "An offer, wanted, admin, taken or received post."
properties: {
content: {
type: "string"
}
date: {
type: "string"
format: "date-time"
description: "The UTC date and time when the post was published."
}
expiration: {
type: "string"
format: "date-time"
description: "The UTC date and time when the post will expire. Currently only offer and wanted posts expire. For all other posts, expiration is always null.\n"
}
footer: {
type: "string"
description: "Some groups add footers to posts that are separate and sometimes unrelated to the post itself - such as reminders about group rules or features (may be null)."
}
group_id: {
type: "string"
description: "The group ID of the post. For public posts, this is always null.\n"
}
latitude: {
type: "number"
description: "May be null if a post hasn't been mapped."
}
longitude: {
type: "number"
description: "May be null if a post hasn't been mapped."
}
outcome: {
type: "string"
description: "For offer and wanted posts, this indicates the outcome of the post which is null if no outcome has been set yet.
Offer post outcomes will be one of: satisfied, withdrawn, promised, expired
Wanted post outcomes will be one of: satisfied, withdrawn, expired
For all other posts, outcome is always null.\n"
}
photos: {
type: "array"
description: "Details about the photos associated with this post (may be null if there are no photos)."
items: {
type: "object"
properties: {
blurhash: {
type: "string"
description: "A blurhash of the photo that can be used as a placeholder while the photo is loading (see: https://github.com/woltapp/blurhash). May be null if no blurhash is available and the length of the blurhash can vary based on the photo.\n"
}
images: {
type: "array"
description: "All the versions of this photo ordered from smallest to largest. This list is guaranteed to include the photos specified by the above thumbnail and url properties."
items: {
type: "object"
properties: {
height: {
type: "integer"
}
url: {
type: "string"
}
width: {
type: "integer"
}
}
}
}
photo_id: {
type: "string"
}
thumbnail: {
type: "string"
description: "A URL to a thumbnail of this photo. The size of the thumbnail depends on the device_pixel_ratio parameter and it is not guaranteed to be square."
}
url: {
type: "string"
description: "A URL to a large version of this photo (but not necessarily the largest size available)."
}
}
}
}
post_id: {
type: "string"
}
repost_count: {
type: "integer"
description: "The count of how many times this post has been reposted in the last 90 days. A value of zero is used to indicate that the post is not a repost. The count is specific to the source of the post (eg. the specific group the post is on). If a post is crossposted to multiple groups, the repost_count of the post on each group may be different for each group depending on how many times the post has been posted on that group in the last 90 days.\n"
}
reselling: {
type: "boolean"
description: "For wanted posts, whether the item is being requested in order to resell it or not. Will be null for all posts that are not wanted posts and for wanted posts where the poster hasn't indicated whether or not they intend to resell the item they are requesting.\n"
}
source: {
type: "string"
description: "The source of the post. One of: groups, trashnothing, open_archive_groups. A value of groups or open_archive_groups indicates the post is from a group and the group_id field will contain the ID of the group. A value of trashnothing indicates the post is a public post not associated with any group.\n"
}
title: {
type: "string"
}
type: {
type: "string"
description: "The type of post. One of: offer, taken, wanted, received, admin\n"
}
url: {
type: "string"
description: "The link to use to view the post on the trash nothing site."
}
user_id: {
type: "string"
}
}
}
}
author_wanted_count: {
type: "integer"
description: "Count of wanted posts made by the post author in the last 90 days."
}
bookmarked: {
type: "boolean"
description: "Whether or not the current user has bookmarked this post. Will be null for api key requests and for the current users' posts."
}
feedback: {
type: "array"
description: "Feedback the current user has left on the post author."
items: {
type: "object"
properties: {
content: {
type: "string"
description: "A comment written by the reviewer about the user (may be null)."
}
date: {
type: "string"
format: "date-time"
description: "Date when the feedback was submitted."
}
feedback_id: {
type: "string"
}
positive: {
type: "boolean"
description: "Set to true for positive feedback and false for negative feedback."
}
reviewer_user_id: {
type: "string"
description: "The user ID of the user that submitted the feedback."
}
user_id: {
type: "string"
description: "The user ID of the user that the feedback is about."
}
}
}
}
groups: {
type: "array"
description: "The groups the post is published on."
items: {
type: "object"
description: "Groups are run by volunteer moderators and provide a way to group activity in a specific location. Because each group is usually run by different people, there can be variations in rules from group to group (eg. who is allowed to join, what is allowed to be posted, how often reposts are allowed).\n"
properties: {
country: {
type: "object"
description: "Provides information about the country that is associated with a group. May be null."
properties: {
abbreviation: {
type: "string"
description: "A 2 letter country code for the country (see https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2 ).\n"
}
name: {
type: "string"
description: "The name of the country."
}
}
}
group_id: {
type: "string"
}
has_questions: {
type: "boolean"
description: "When true, anyone requesting membership to this group will be required to answer a new membership questionnaire."
}
homepage: {
type: "string"
description: "A URL to the group homepage."
}
identifier: {
type: "string"
description: "A unique identifier for the group that is used in URLs."
}
latitude: {
type: "number"
}
longitude: {
type: "number"
}
member_count: {
type: "integer"
description: "The number of members who belong to the group."
}
membership: {
type: "object"
description: "Provides information about the current users' active or pending membership to this group (if any). Will be null if there is no active or pending membership to this group.\n"
properties: {
date: {
type: "string"
format: "date-time"
description: "The UTC date and time when the membership was last updated.\n"
}
questionnaire: {
type: "object"
description: "Membership questionnaire data. Will be null unless the membership status is pending-questions."
properties: {
message: {
type: "string"
description: "A message from the group moderators to be displayed above the questions (may be null)."
}
questions: {
type: "array"
description: "The list of questions."
items: {
type: "string"
}
}
}
}
status: {
type: "string"
description: "One of: subscribed, pending, pending-questions\n"
}
}
}
name: {
type: "string"
description: "The name of the group (not guaranteed to be unique)."
}
open_archives: {
type: "boolean"
description: "When true, the group posts are viewable by anyone. When false, the group posts can only be viewed by members of the group."
}
open_membership: {
type: "boolean"
description: "When true, the group allows anyone to join. When false, the group moderators review and approve applicants."
}
region: {
type: "object"
description: "Provides information about an area within a country that a group is associated with (eg. a state in the US or a province in Canada). May be null."
properties: {
abbreviation: {
type: "string"
description: "A 2 letter abbreviation for the region (is not guaranteed to be globally unique but is unique among all the regions in the country)."
}
name: {
type: "string"
description: "The name of the region."
}
}
}
timezone: {
type: "string"
description: "The timezone that the group is in (eg. America/New_York)."
}
}
}
}
post: {
type: "object"
additionalProperties: true
}
replied: {
type: "boolean"
description: "Whether or not the current user has replied to this post. Will be null for api key requests and for the current users' posts."
}
user_can_reply: {
type: "boolean"
description: "Whether or not the current user (if any) can reply to this post. Unverified users cannot reply to posts until they verify their account.\n"
}
viewed: {
type: "boolean"
description: "Whether or not the current user has previously viewed this post. Will be null for api key requests and for the current users' posts."
}
}
}
}