summaryrefslogtreecommitdiff
path: root/sdk/index.js
blob: 0c92f0ce326b2595428dd98991a4bd6087b92ee1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
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
}