-
Notifications
You must be signed in to change notification settings - Fork 8
/
core_curation_service.proto
106 lines (96 loc) · 4.17 KB
/
core_curation_service.proto
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
syntax = "proto3";
/**
* @FileArticle ⚙︎ CurationService
*/
package stroeer.curation.v1;
import "google/protobuf/timestamp.proto";
import "stroeer/core/v1/article.proto";
option go_package = "github.com/stroeer/go-tapir/curation/v1;core";
/**
* This services allows to query curations within the CMS. In the CMS domain
* this is implemented as `Lists` which usually contain one ore more `Articles`.
*
* @CodeBlockStart protobuf
*/
service CurationService {
rpc GetCuration(GetCurationRequest) returns (GetCurationResponse) {}
rpc BatchGetCuration(BatchGetCurationRequest) returns (BatchGetCurationResponse) {}
}
/** @CodeBlockEnd */
/**
* # `⚙︎ GetCuration`
*
* Fetch a curation by its id and return the [`repeated stroeer.core.v1.Article`](Article.html) this
* curation contains. The response may be empty in case the curation does not contain any items.
*
* a `NOT_FOUND` status code will indicate the curation `id` does not exist.
*
* ## GetCurationRequest
*
* | Field name | Type | Description |
* |------------------|----------|-------------------------------------------------------------|
* | `id` | `int64` | [required] id of the list to be fetched |
*
* @CodeBlockStart protobuf
*/
message GetCurationRequest {
int64 id = 1;
}
/** @CodeBlockEnd */
/**
* ## GetCurationResponse
*
* | Field name | Type | Description |
* |------------------|-------------------------------------|-----------------------------------------------------------------------------------------------------------------|
* | `id` | `int64` | the _id_ of this list |
* | `label` | `string` | the _label_ of this list |
* | `update_time` | [`Timestamp`][ts] | Technical timestamp at which the curation was updated in seconds UTC time since Unix epoch. |
* | `articles` | `repeated` [`Article`][article] | curated items of this list |
*
* [article]: article.html
* [ts]: https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#google.protobuf.Timestamp
*
* @CodeBlockStart protobuf
*/
message GetCurationResponse {
int64 id = 1;
string label = 2;
google.protobuf.Timestamp update_time = 3;
repeated stroeer.core.v1.Article articles = 4;
}
/** @CodeBlockEnd */
/**
* # `⚙︎ BatchGetCuration`
*
* Fetch multiple curations by their id and return the [`repeated stroeer.core.v1.Article`](Article.html) those
* curations contain. The response may be empty in case the curation does not contain any items.
* The ordering of items will the same ordering as the `ids` requested.
*
*
* ## BatchGetCurationRequest
*
* | Field name | Type | Description |
* |------------------|-------------------------------------|--------------------------------------|
* | `ids` | `repeated int64` | the _ids_ of the lists to be fetched |
*
* @CodeBlockStart protobuf
*/
message BatchGetCurationRequest {
repeated int64 ids = 1;
}
/** @CodeBlockEnd */
/**
* ## BatchGetCurationResponse
*
* | Field name | Type | Description |
* |------------------|-------------------------------------|--------------------------------------------------------------------------------|
* | `curations` | [`GetCurationResponse`][cr] | a single response item that corresponds to _ids_ this service was called with. |
*
* [cr]: #getcurationresponse
*
* @CodeBlockStart protobuf
*/
message BatchGetCurationResponse {
repeated GetCurationResponse curations = 1;
}
/** @CodeBlockEnd */