From 932fe6e61b0f7d1a94a9dd9b965637d0b3a699e4 Mon Sep 17 00:00:00 2001 From: Jules Laplace Date: Sat, 4 Apr 2020 20:57:43 +0200 Subject: stub sdk. add keywords fix. stub users --- sdk/index.js | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 sdk/index.js (limited to 'sdk/index.js') diff --git a/sdk/index.js b/sdk/index.js new file mode 100644 index 0000000..0c92f0c --- /dev/null +++ b/sdk/index.js @@ -0,0 +1,28 @@ +// bucky 3.0.0 sdk + +let env = 'development' +let endpoint = 'http://localhost:5000/' + +export function init(opt){ + env = opt.env || env + endpoint = opt.endpoint || endpoint + + switch (env) { + case 'test': + break + default: + case 'development': + break + case 'production': + break + } +} + +export function path(api){ + return endpoint + api +} + +export function image(file, size){ + return "https://" + sdk.opt.s3.bucket + sdk.opt.s3.path + "/data/" + file.thread + "/" + file.id +} + -- cgit v1.2.3-70-g09d2