diff options
| author | pep <yes@peepee.me> | 2020-07-21 20:46:56 +0000 |
|---|---|---|
| committer | pep <yes@peepee.me> | 2020-07-21 20:46:56 +0000 |
| commit | 97bee7fe1a48acb4c34e207863af56894c198151 (patch) | |
| tree | 7a03bacd383319f2e4af70beb57ff0f9ae31b010 /sdk | |
| parent | d93c099733afff27fbf7c172a40eca87519d38b7 (diff) | |
| parent | 8a3178339ad407ec85ef0cd014a6ad13bfb4cadd (diff) | |
attempt at merge
Diffstat (limited to 'sdk')
| -rw-r--r-- | sdk/auth.js | 1 | ||||
| -rw-r--r-- | sdk/index.js | 28 |
2 files changed, 29 insertions, 0 deletions
diff --git a/sdk/auth.js b/sdk/auth.js new file mode 100644 index 0000000..72d38f1 --- /dev/null +++ b/sdk/auth.js @@ -0,0 +1 @@ +auth.js
\ No newline at end of file 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 +} + |
