diff options
| author | Jules Laplace <julescarbon@gmail.com> | 2020-04-04 20:57:43 +0200 |
|---|---|---|
| committer | Jules Laplace <julescarbon@gmail.com> | 2020-04-04 20:57:43 +0200 |
| commit | 932fe6e61b0f7d1a94a9dd9b965637d0b3a699e4 (patch) | |
| tree | c8f3e496e454e89149384b32e437ecec87d1dfdf /sdk/index.js | |
| parent | 400cdb804dc0fe967393edd338ec8c094c4b0998 (diff) | |
stub sdk. add keywords fix. stub users
Diffstat (limited to 'sdk/index.js')
| -rw-r--r-- | sdk/index.js | 28 |
1 files changed, 28 insertions, 0 deletions
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 +} + |
