Bluemage/schemas/proto/subreddits/v1/list.proto

52 lines
1.3 KiB
Protocol Buffer
Raw Normal View History

2024-08-09 15:22:54 +07:00
syntax = "proto3";
package subreddits.v1;
2024-08-15 14:13:40 +07:00
import "subreddits/v1/types.proto";
2024-08-09 15:22:54 +07:00
message ListSubredditsRequest {
2024-08-15 14:13:40 +07:00
// Searches the name of the Subreddit.
// case insensitive.
2024-08-09 15:22:54 +07:00
//
2024-08-15 14:13:40 +07:00
// If empty or not given, lists all devices.
// (Limit, Offset, Order, Sort still applies).
//
// default: empty string.
string search = 1;
// disabled, if true, limit the listing subreddits to only
// to disabled subreddits.
//
// if enabled, lists only enabled subreddits.
//
// If unspecified, subreddits with either status will be received.
DisabledFilter disabled = 2;
// limits the number of results.
//
// if value is 0, negative value, or not given, limit is set to 25.
//
// if limit is higher than 100, it is clamped to 100.
int64 limit = 3;
// offset for the given data.
//
// If offset is 0, negative value, or not given, the query begins from start.
int64 offset = 4;
// order_by is the field to order the subreddits by.
//
// If unspecified, the default is `created_at` and sort is forced to DESC.
// regardless even if `sort` is set.
OrderBy order_by = 5;
// sort is the direction of the order_by result.
//
// If unspecified, the default is `ascending`.
Sort sort = 6;
2024-08-09 15:22:54 +07:00
}
message ListSubredditsResponse {
2024-08-15 14:13:40 +07:00
repeated Subreddit subreddits = 1;
2024-08-09 15:22:54 +07:00
}