1 # Pleroma: A lightweight social networking server
2 # Copyright © 2017-2020 Pleroma Authors <https://pleroma.social/>
3 # SPDX-License-Identifier: AGPL-3.0-only
5 defmodule Pleroma.Web.ApiSpec.Schemas.Status do
6 alias OpenApiSpex.Schema
7 alias Pleroma.Web.ApiSpec.Schemas.Account
8 alias Pleroma.Web.ApiSpec.Schemas.AccountEmoji
9 alias Pleroma.Web.ApiSpec.Schemas.Poll
10 alias Pleroma.Web.ApiSpec.Schemas.VisibilityScope
16 description: "Response schema for a status",
23 name: %Schema{type: :string},
24 website: %Schema{type: :string, nullable: true}
27 bookmarked: %Schema{type: :boolean},
32 type: %Schema{type: :string},
33 provider_name: %Schema{type: :string},
34 provider_url: %Schema{type: :string},
35 url: %Schema{type: :string},
36 image: %Schema{type: :string},
37 title: %Schema{type: :string},
38 description: %Schema{type: :string}
41 content: %Schema{type: :string},
42 created_at: %Schema{type: :string, format: "date-time"},
43 emojis: %Schema{type: :array, items: AccountEmoji},
44 favourited: %Schema{type: :boolean},
45 favourites_count: %Schema{type: :integer},
46 id: %Schema{type: :string},
47 in_reply_to_account_id: %Schema{type: :string, nullable: true},
48 in_reply_to_id: %Schema{type: :string, nullable: true},
49 language: %Schema{type: :string, nullable: true},
50 media_attachments: %Schema{
55 id: %Schema{type: :string},
56 url: %Schema{type: :string},
57 remote_url: %Schema{type: :string},
58 preview_url: %Schema{type: :string},
59 text_url: %Schema{type: :string},
60 description: %Schema{type: :string},
61 type: %Schema{type: :string, enum: ["image", "video", "audio", "unknown"]},
64 properties: %{mime_type: %Schema{type: :string}}
74 id: %Schema{type: :string},
75 acct: %Schema{type: :string},
76 username: %Schema{type: :string},
77 url: %Schema{type: :string}
81 muted: %Schema{type: :boolean},
82 pinned: %Schema{type: :boolean},
86 content: %Schema{type: :object, additionalProperties: %Schema{type: :string}},
87 conversation_id: %Schema{type: :integer},
88 direct_conversation_id: %Schema{type: :string, nullable: true},
89 emoji_reactions: %Schema{
94 name: %Schema{type: :string},
95 count: %Schema{type: :integer},
96 me: %Schema{type: :boolean}
100 expires_at: %Schema{type: :string, format: "date-time", nullable: true},
101 in_reply_to_account_acct: %Schema{type: :string, nullable: true},
102 local: %Schema{type: :boolean},
103 spoiler_text: %Schema{type: :object, additionalProperties: %Schema{type: :string}},
104 thread_muted: %Schema{type: :boolean}
107 poll: %Schema{type: Poll, nullable: true},
109 allOf: [%OpenApiSpex.Reference{"$ref": "#/components/schemas/Status"}],
112 reblogged: %Schema{type: :boolean},
113 reblogs_count: %Schema{type: :integer},
114 replies_count: %Schema{type: :integer},
115 sensitive: %Schema{type: :boolean},
116 spoiler_text: %Schema{type: :string},
122 name: %Schema{type: :string},
123 url: %Schema{type: :string}
127 uri: %Schema{type: :string},
128 url: %Schema{type: :string},
129 visibility: VisibilityScope
135 "avatar" => "http://localhost:4001/images/avi.png",
136 "avatar_static" => "http://localhost:4001/images/avi.png",
138 "created_at" => "2020-04-07T19:48:51.000Z",
139 "display_name" => "Test テスト User 6",
142 "followers_count" => 1,
143 "following_count" => 0,
144 "header" => "http://localhost:4001/images/banner.png",
145 "header_static" => "http://localhost:4001/images/banner.png",
146 "id" => "9toJCsKN7SmSf3aj5c",
148 "note" => "Tester Number 6",
150 "background_image" => nil,
151 "confirmation_pending" => false,
152 "hide_favorites" => true,
153 "hide_followers" => false,
154 "hide_followers_count" => false,
155 "hide_follows" => false,
156 "hide_follows_count" => false,
158 "is_moderator" => false,
160 "blocked_by" => false,
162 "domain_blocking" => false,
164 "followed_by" => false,
166 "id" => "9toJCsKN7SmSf3aj5c",
168 "muting_notifications" => false,
169 "requested" => false,
170 "showing_reblogs" => true,
171 "subscribing" => false
173 "skip_thread_containment" => false,
178 "note" => "Tester Number 6",
179 "pleroma" => %{"actor_type" => "Person", "discoverable" => false},
182 "statuses_count" => 1,
183 "url" => "http://localhost:4001/users/nick6",
184 "username" => "nick6"
186 "application" => %{"name" => "Web", "website" => nil},
187 "bookmarked" => false,
189 "content" => "foobar",
190 "created_at" => "2020-04-07T19:48:51.000Z",
192 "favourited" => false,
193 "favourites_count" => 0,
194 "id" => "9toJCu5YZW7O7gfvH6",
195 "in_reply_to_account_id" => nil,
196 "in_reply_to_id" => nil,
198 "media_attachments" => [],
203 "content" => %{"text/plain" => "foobar"},
204 "conversation_id" => 345_972,
205 "direct_conversation_id" => nil,
206 "emoji_reactions" => [],
208 "in_reply_to_account_acct" => nil,
210 "spoiler_text" => %{"text/plain" => ""},
211 "thread_muted" => false
215 "reblogged" => false,
216 "reblogs_count" => 0,
217 "replies_count" => 0,
218 "sensitive" => false,
219 "spoiler_text" => "",
221 "uri" => "http://localhost:4001/objects/0f5dad44-0e9e-4610-b377-a2631e499190",
222 "url" => "http://localhost:4001/notice/9toJCu5YZW7O7gfvH6",
223 "visibility" => "private"