2023-03-12 18:00:57 +03: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 19:07:05 +03:00
|
|
|
|
2021-05-08 15:25:55 +03:00
|
|
|
package model
|
2021-03-13 19:07:05 +03:00
|
|
|
|
2023-05-25 11:37:38 +03:00
|
|
|
// List represents a user-created list of accounts that the user follows.
|
|
|
|
//
|
|
|
|
// swagger:model list
|
2021-03-13 19:07:05 +03:00
|
|
|
type List struct {
|
2023-05-25 11:37:38 +03:00
|
|
|
// The ID of the list.
|
2021-03-13 19:07:05 +03:00
|
|
|
ID string `json:"id"`
|
|
|
|
// The user-defined title of the list.
|
|
|
|
Title string `json:"title"`
|
2023-05-25 11:37:38 +03:00
|
|
|
// RepliesPolicy for this list.
|
|
|
|
// followed = Show replies to any followed user
|
2021-03-13 19:07:05 +03:00
|
|
|
// list = Show replies to members of the list
|
|
|
|
// none = Show replies to no one
|
|
|
|
RepliesPolicy string `json:"replies_policy"`
|
|
|
|
}
|
2023-05-25 11:37:38 +03:00
|
|
|
|
|
|
|
// ListCreateRequest models list creation parameters.
|
|
|
|
//
|
|
|
|
// swagger:parameters listCreate
|
|
|
|
type ListCreateRequest struct {
|
|
|
|
// Title of this list.
|
2024-03-06 20:05:45 +03:00
|
|
|
// Sample: Cool People
|
2023-05-25 11:37:38 +03: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 20:05:45 +03:00
|
|
|
// Sample: list
|
2023-05-25 11:37:38 +03:00
|
|
|
// default: list
|
|
|
|
// in: formData
|
2024-03-06 20:05:45 +03:00
|
|
|
// enum:
|
|
|
|
// - followed
|
|
|
|
// - list
|
|
|
|
// - none
|
2023-05-25 11:37:38 +03:00
|
|
|
RepliesPolicy string `form:"replies_policy" json:"replies_policy" xml:"replies_policy"`
|
|
|
|
}
|
|
|
|
|
|
|
|
// ListUpdateRequest models list update parameters.
|
|
|
|
//
|
2024-03-06 20:05:45 +03:00
|
|
|
// swagger:ignore
|
2023-05-25 11:37:38 +03:00
|
|
|
type ListUpdateRequest struct {
|
|
|
|
// Title of this list.
|
2024-03-06 20:05:45 +03:00
|
|
|
// Sample: Cool People
|
2023-05-25 11:37:38 +03: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 20:05:45 +03:00
|
|
|
// Sample: list
|
2023-05-25 11:37:38 +03:00
|
|
|
// in: formData
|
|
|
|
RepliesPolicy *string `form:"replies_policy" json:"replies_policy" xml:"replies_policy"`
|
|
|
|
}
|
|
|
|
|
2024-03-06 20:05:45 +03:00
|
|
|
// ListAccountsChangeRequest is a list of account IDs to add to or remove from a list.
|
|
|
|
//
|
2023-05-25 11:37:38 +03:00
|
|
|
// swagger:ignore
|
|
|
|
type ListAccountsChangeRequest struct {
|
|
|
|
AccountIDs []string `form:"account_ids[]" json:"account_ids" xml:"account_ids"`
|
|
|
|
}
|