action trashnothing_get_conversations {
label: "List conversations"
provider: trashnothing
method: GET
path: "/conversations"
encoding: json
input: {
type: "object"
properties: {
category: {
type: "string"
}
device_pixel_ratio: {
type: "number"
}
include_num_unread: {
type: "integer"
}
num_messages: {
type: "integer"
}
page: {
type: "integer"
}
per_page: {
type: "integer"
}
}
additionalProperties: false
}
output: {
type: "object"
properties: {
conversations: {
type: "array"
items: {
type: "object"
description: "A conversation between the current user and another user."
properties: {
archived: {
type: "boolean"
description: "Whether or not this conversation is archived."
}
blocked: {
type: "boolean"
description: "Whether or not this conversation is blocked."
}
conversation_id: {
type: "string"
}
last_message_date: {
type: "string"
format: "date-time"
description: "The UTC date and time of the last message in this conversation."
}
messages: {
type: "array"
description: "The latest messages in this conversation."
items: {
type: "object"
description: "A message between two users."
properties: {
content: {
type: "string"
description: "The content of the message."
}
date: {
type: "string"
format: "date-time"
description: "The UTC date and time when the message was sent."
}
email_attachments: {
type: "array"
description: "Every message a user receives is made available via the API and is sent to the user by email. Some messages may contain unsupported attachments that are not available by the API but are emailed to the user (eg. documents, videos, zip files). The email_attachments field provides the names of all the unsupported attachments that were emailed to the user (will be null if there are no unsupported attachments).\n"
items: {
type: "string"
}
}
from_user_id: {
type: "string"
description: "The ID of the user that sent the message (the sender)."
}
message_id: {
type: "string"
}
photos: {
type: "array"
description: "Details about the photos associated with this message (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"
additionalProperties: true
}
}
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: {
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"
additionalProperties: true
}
}
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"
}
}
}
subject: {
type: "string"
description: "Because many messages are received by email, all messages have a subject. The subject is often useful to allow the recipient to determine which post a message may be referring to. In rare cases, some senders send emails with a subject and but no email body which causes the message content to be an empty string.\n"
}
to_user_id: {
type: "string"
description: "The ID of the user that received the message (the recipient)."
}
}
}
}
num_unread_messages: {
type: "integer"
description: "The count of how many unread messages this conversation has."
}
user: {
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"
}
}
}
}
}
}
num_unread: {
type: "integer"
description: "If the include_num_unread parameter is set to 1, this will be set to the total number of conversations that have unread messages matching the query parameters of the request. If the include_num_unread parameter is set to 0, this will be null.\n"
}
page: {
type: "integer"
}
per_page: {
type: "integer"
}
}
}
}