From a4ee2914f0132f24110f166d6ceab85aaaef8236 Mon Sep 17 00:00:00 2001 From: Yuriy Shevchuk Date: Fri, 18 Jul 2014 18:59:06 +0200 Subject: [PATCH 1/2] Updated documentation on how to get user icons via REST API --- doc/CHANNELING-API.txt | 6 ++++++ doc/REST-API.txt | 17 +++++++++++++++++ 2 files changed, 23 insertions(+) diff --git a/doc/CHANNELING-API.txt b/doc/CHANNELING-API.txt index d9cfc1fb..e65d7bc6 100644 --- a/doc/CHANNELING-API.txt +++ b/doc/CHANNELING-API.txt @@ -309,6 +309,12 @@ Additional types for session listing and notifications } + 'buddyPicture' can be in two formats: + 1. image of the user as Base64 encoded string of an image. + Example: data:image/jpeg;base64,/9j/4... + 2. url subpath to query REST API. Please refer to REST API for more info + Example: img:8nG33oDk8Yv8fvK6IphL/6vjI2NLigcET/picture.jpg + Note: buddyPicture content needs to be in the format of HTML data urls'. Rev is the status update sequence for this status update entry. It diff --git a/doc/REST-API.txt b/doc/REST-API.txt index 72155326..7e51d09c 100644 --- a/doc/REST-API.txt +++ b/doc/REST-API.txt @@ -148,6 +148,23 @@ Available end points with request methods and content-type: Please see the implementation on exact fields of Runtime and Hub stats. + /static/img/buddy/{flags}/{imageid}/{idx:.*} + + This endpoint provides application with user icons + + GET application/x-www-form-urlencoded + details: + flags: at the moment the only know flag is s{icon_size_in_pixels}, + the icons are always squares so only one dimension is needed + example: s46 + imageid and idx: image id received via Channeling API (please refer to Channeling API for details) + example: https://example.com/static/img/buddy/s46/8nG33oDk8Yv8fvK6IphL/6vjI2NLigcET/picture.jpg + Response 200: + {image} + + + + End of REST API. For latest version of Spreed WebRTC check From 51f47e36b0439682bee12a1ffae1fa50040e8b39 Mon Sep 17 00:00:00 2001 From: Yuriy Shevchuk Date: Fri, 18 Jul 2014 19:07:52 +0200 Subject: [PATCH 2/2] Fixed wording in previous commit --- doc/CHANNELING-API.txt | 6 +++--- doc/REST-API.txt | 7 +++---- 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/doc/CHANNELING-API.txt b/doc/CHANNELING-API.txt index e65d7bc6..60606947 100644 --- a/doc/CHANNELING-API.txt +++ b/doc/CHANNELING-API.txt @@ -309,10 +309,10 @@ Additional types for session listing and notifications } - 'buddyPicture' can be in two formats: - 1. image of the user as Base64 encoded string of an image. + 'buddyPicture' can be in next formats: + 1. Base64 encoded string of an image. Example: data:image/jpeg;base64,/9j/4... - 2. url subpath to query REST API. Please refer to REST API for more info + 2. url subpath to query REST API. Please refer to REST API for more information Example: img:8nG33oDk8Yv8fvK6IphL/6vjI2NLigcET/picture.jpg Note: buddyPicture content needs to be in the format of HTML data urls'. diff --git a/doc/REST-API.txt b/doc/REST-API.txt index 7e51d09c..7f278ba5 100644 --- a/doc/REST-API.txt +++ b/doc/REST-API.txt @@ -154,13 +154,12 @@ Available end points with request methods and content-type: GET application/x-www-form-urlencoded details: - flags: at the moment the only know flag is s{icon_size_in_pixels}, + flags: at the moment the only known flag is s{icon_size_in_pixels}, the icons are always squares so only one dimension is needed example: s46 - imageid and idx: image id received via Channeling API (please refer to Channeling API for details) + imageid and idx: image id received via channeling API (please refer to channeling API for details) example: https://example.com/static/img/buddy/s46/8nG33oDk8Yv8fvK6IphL/6vjI2NLigcET/picture.jpg - Response 200: - {image} + Response 200: image