2023-03-12 16:00:57 +01:00
|
|
|
// GoToSocial
|
|
|
|
// Copyright (C) GoToSocial Authors admin@gotosocial.org
|
|
|
|
// SPDX-License-Identifier: AGPL-3.0-or-later
|
|
|
|
//
|
|
|
|
// This program is free software: you can redistribute it and/or modify
|
|
|
|
// it under the terms of the GNU Affero General Public License as published by
|
|
|
|
// the Free Software Foundation, either version 3 of the License, or
|
|
|
|
// (at your option) any later version.
|
|
|
|
//
|
|
|
|
// This program is distributed in the hope that it will be useful,
|
|
|
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
// GNU Affero General Public License for more details.
|
|
|
|
//
|
|
|
|
// You should have received a copy of the GNU Affero General Public License
|
|
|
|
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
2021-03-13 17:07:05 +01:00
|
|
|
|
2021-05-08 14:25:55 +02:00
|
|
|
package model
|
2021-03-13 17:07:05 +01:00
|
|
|
|
2023-05-25 10:37:38 +02:00
|
|
|
// List represents a user-created list of accounts that the user follows.
|
|
|
|
//
|
|
|
|
// swagger:model list
|
2021-03-13 17:07:05 +01:00
|
|
|
type List struct {
|
2023-05-25 10:37:38 +02:00
|
|
|
// The ID of the list.
|
2021-03-13 17:07:05 +01:00
|
|
|
ID string `json:"id"`
|
|
|
|
// The user-defined title of the list.
|
|
|
|
Title string `json:"title"`
|
2023-05-25 10:37:38 +02:00
|
|
|
// RepliesPolicy for this list.
|
|
|
|
// followed = Show replies to any followed user
|
2021-03-13 17:07:05 +01:00
|
|
|
// list = Show replies to members of the list
|
|
|
|
// none = Show replies to no one
|
|
|
|
RepliesPolicy string `json:"replies_policy"`
|
2024-09-10 00:56:58 +02:00
|
|
|
// Exclusive setting for this list.
|
|
|
|
// If true, hide posts from members of this list from your home timeline.
|
|
|
|
Exclusive bool `json:"exclusive"`
|
2021-03-13 17:07:05 +01:00
|
|
|
}
|
2023-05-25 10:37:38 +02:00
|
|
|
|
|
|
|
// ListCreateRequest models list creation parameters.
|
|
|
|
//
|
|
|
|
// swagger:parameters listCreate
|
|
|
|
type ListCreateRequest struct {
|
|
|
|
// Title of this list.
|
2024-03-06 18:05:45 +01:00
|
|
|
// Sample: Cool People
|
2023-05-25 10:37:38 +02:00
|
|
|
// in: formData
|
|
|
|
// required: true
|
|
|
|
Title string `form:"title" json:"title" xml:"title"`
|
|
|
|
// RepliesPolicy for this list.
|
|
|
|
// followed = Show replies to any followed user
|
|
|
|
// list = Show replies to members of the list
|
|
|
|
// none = Show replies to no one
|
2024-03-06 18:05:45 +01:00
|
|
|
// Sample: list
|
2023-05-25 10:37:38 +02:00
|
|
|
// default: list
|
|
|
|
// in: formData
|
2024-03-06 18:05:45 +01:00
|
|
|
// enum:
|
|
|
|
// - followed
|
|
|
|
// - list
|
|
|
|
// - none
|
2023-05-25 10:37:38 +02:00
|
|
|
RepliesPolicy string `form:"replies_policy" json:"replies_policy" xml:"replies_policy"`
|
2024-09-10 00:56:58 +02:00
|
|
|
// Exclusive setting for this list.
|
|
|
|
// If true, hide posts from members of this list from your home timeline.
|
|
|
|
// default: false
|
|
|
|
// in: formData
|
|
|
|
Exclusive bool `form:"exclusive" json:"exclusive" xml:"exclusive"`
|
2023-05-25 10:37:38 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
// ListUpdateRequest models list update parameters.
|
|
|
|
//
|
2024-03-06 18:05:45 +01:00
|
|
|
// swagger:ignore
|
2023-05-25 10:37:38 +02:00
|
|
|
type ListUpdateRequest struct {
|
|
|
|
// Title of this list.
|
2024-03-06 18:05:45 +01:00
|
|
|
// Sample: Cool People
|
2023-05-25 10:37:38 +02:00
|
|
|
// in: formData
|
|
|
|
Title *string `form:"title" json:"title" xml:"title"`
|
|
|
|
// RepliesPolicy for this list.
|
|
|
|
// followed = Show replies to any followed user
|
|
|
|
// list = Show replies to members of the list
|
|
|
|
// none = Show replies to no one
|
2024-03-06 18:05:45 +01:00
|
|
|
// Sample: list
|
2023-05-25 10:37:38 +02:00
|
|
|
// in: formData
|
|
|
|
RepliesPolicy *string `form:"replies_policy" json:"replies_policy" xml:"replies_policy"`
|
2024-09-10 00:56:58 +02:00
|
|
|
// Exclusive setting for this list.
|
|
|
|
// If true, hide posts from members of this list from your home timeline.
|
|
|
|
// in: formData
|
|
|
|
Exclusive *bool `form:"exclusive" json:"exclusive" xml:"exclusive"`
|
2023-05-25 10:37:38 +02:00
|
|
|
}
|
|
|
|
|
2024-03-06 18:05:45 +01:00
|
|
|
// ListAccountsChangeRequest is a list of account IDs to add to or remove from a list.
|
|
|
|
//
|
2023-05-25 10:37:38 +02:00
|
|
|
// swagger:ignore
|
|
|
|
type ListAccountsChangeRequest struct {
|
|
|
|
AccountIDs []string `form:"account_ids[]" json:"account_ids" xml:"account_ids"`
|
|
|
|
}
|