From ee0746bac66dbe98fd73258817210e4efd7e64c0 Mon Sep 17 00:00:00 2001 From: Niko Diamadis Date: Mon, 28 Feb 2022 17:11:44 +0100 Subject: [PATCH] Proto Update: Avatar, YouTube (#390) * Update avatar.proto Shorten texts, correct mistakes, replace Micro with M3O, set colons * Update youtube.proto Remove example links, set colons --- avatar/proto/avatar.proto | 17 ++++++++--------- youtube/proto/youtube.proto | 8 ++++---- 2 files changed, 12 insertions(+), 13 deletions(-) diff --git a/avatar/proto/avatar.proto b/avatar/proto/avatar.proto index 792d967..3a9e6ed 100644 --- a/avatar/proto/avatar.proto +++ b/avatar/proto/avatar.proto @@ -10,22 +10,21 @@ service Avatar { // Generate an unique avatar message GenerateRequest { - // avatar's gender, `male` or `female`, default is `male` + // avatar's gender: `male` or `female`; default is `male` string gender = 1; - // avatar's username, unique username will generates the unique avatar; - // if username == "", will generate a random avatar in every request - // if upload == true, username will be used as CDN filename rather than a random uuid string + // avatar's username, unique username will generate the unique avatar; + // if empty, every request generates a random avatar; + // if upload == true, username will be the CDN filename rather than a random uuid string string username = 2; - // encode format of avatar image, `png` or `jpeg`, default is `jpeg` + // encode format of avatar image: `png` or `jpeg`; default is `jpeg` string format = 3; - // if upload to m3o CDN, default is `false` - // if update = true, then it'll return the CDN url + // set to true to upload to the M3O CDN and receive the url bool upload = 4; } message GenerateResponse { - // Micro's CDN url of the avatar image + // M3O's CDN url of the avatar image string url = 1; - // base64encode string of the avatar image + // base64 encoded string of the avatar image string base64 = 2; } diff --git a/youtube/proto/youtube.proto b/youtube/proto/youtube.proto index 4448a88..022fed9 100644 --- a/youtube/proto/youtube.proto +++ b/youtube/proto/youtube.proto @@ -11,7 +11,7 @@ service Youtube { // Embed a YouTube video message EmbedRequest { - // provide the youtube url e.g https://www.youtube.com/watch?v=GWRWZu7XsJ0 + // provide the youtube url string url = 1; } @@ -20,7 +20,7 @@ message EmbedResponse { string long_url = 1; // the short url string short_url = 2; - // the embeddable link e.g https://www.youtube.com/watch?v=GWRWZu7XsJ0 + // the embeddable link string embed_url = 3; // the script code string html_script = 4; @@ -29,7 +29,7 @@ message EmbedResponse { message SearchResult { // id of the result string id = 1; - // kind of result; "video", "channel", "playlist" + // kind of result: "video", "channel", "playlist" string kind = 2; // title of the result string title = 3; @@ -41,7 +41,7 @@ message SearchResult { string channel_title = 6; // published at time string published_at = 7; - // if live broadcast then indicates activity. + // if live broadcast then indicates activity: // none, upcoming, live, completed string broadcasting = 8; // the associated url