Method: TreasureData::API::Schedule#create_schedule
- Defined in:
- lib/td/client/api/schedule.rb
#create_schedule(name, opts) ⇒ String
11 12 13 14 15 16 17 18 19 |
# File 'lib/td/client/api/schedule.rb', line 11 def create_schedule(name, opts) params = opts.update({:type=> opts[:type] || opts['type'] || 'hive'}) code, body, res = post("/v3/schedule/create/#{e name}", params) if code != "200" raise_error("Create schedule failed", res) end js = checked_json(body) return js['start'] end |