diff options
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 +} + |
