41 lines
898 B
Protocol Buffer
41 lines
898 B
Protocol Buffer
syntax = "proto3";
|
|
|
|
// This is for posting a paragraph.
|
|
message Post {
|
|
string content = 1;
|
|
// reply to a post, like a mail chat.
|
|
optional int64 ref = 2;
|
|
repeated bytes files = 3;
|
|
}
|
|
|
|
enum Status {
|
|
Failed = 0;
|
|
Success = 1;
|
|
}
|
|
|
|
// The response of the posting, defining what should return.
|
|
message PostResponse {
|
|
Status status = 1;
|
|
string hash = 2;
|
|
uint64 id = 3;
|
|
optional string failed_message = 4;
|
|
}
|
|
|
|
message FetchResponse {
|
|
message Message {
|
|
uint64 id = 1;
|
|
string content = 2;
|
|
// reply to a post, like a mail chat.
|
|
optional uint64 ref = 3;
|
|
// request files through /article/file/<id> with MIME type.
|
|
// See it as a BLOB url;
|
|
repeated uint64 files_id = 4;
|
|
optional string hash = 5;
|
|
string igid = 6;
|
|
string mark = 7;
|
|
optional string ip = 8;
|
|
repeated uint64 comments_id = 9;
|
|
}
|
|
// Several post info
|
|
repeated Message posts = 1;
|
|
} |