Class Definition

class @com.uber #_[name="Uber"] #_[description="This interface lets you interact with the Uber service"] #[version=104] #[package_version=104] { import loader from @org.thingpedia.v2(); import config from @org.thingpedia.config.oauth2(client_id="uOVKVToJeXaGEd-JdpkGnkkc4jmXpFMc", client_secret="<hidden>"); monitorable list query time_estimate(in req start: Location #_[prompt="Where do you want to call Uber?"] #_[canonical="start"], out uber_type: Enum(pool,uber_x,uber_xl,uber_black,select,suv,assist) #_[canonical="uber type"], out estimate: Measure(ms) #_[canonical="estimate"]) #_[canonical="get time estimate on uber"] #_[confirmation="ETAs for uber services at $start"] #_[formatted=[{type="text",text="Estimate for ${uber_type}: ${estimate:min} min"}]] #_[confirmation_remote="ETAs for uber services at $start"] #[poll_interval=60000ms] #[doc="returns ETAs for all Uber products (pool, uberX, select, etc.) offered at a given location"]; monitorable list query price_estimate(in req start: Location #_[prompt="Where do you want to be picked up?"] #_[canonical="start"], in req end: Location #_[prompt="Where do you want to go?"] #_[canonical="end"], out uber_type: Enum(pool,uber_x,uber_xl,uber_black,select,suv,assist) #_[canonical="uber type"], out low_estimate: Currency #_[canonical="low estimate"], out high_estimate: Currency #_[canonical="high estimate"], out surge: Number #_[canonical="surge"], out duration: Measure(ms) #_[canonical="duration"], out distance: Measure(m) #_[canonical="distance"]) #_[canonical="get price estimate on uber"] #_[confirmation="estimated prices for Uber from $start to $end"] #_[formatted=[{type="text",text="Estimate for ${uber_type}: between ${low_estimate} and ${high_estimate} (${surge}x surge). Distance: ${distance:km} km, Time: ${duration:min} min"}]] #_[confirmation_remote="estimated prices for Uber from $start to $end"] #[poll_interval=60000ms] #[doc="returns estimated prices for a given trip on all available products"]; monitorable query current(out status: String #_[canonical="status"], out vehicle: String #_[canonical="vehicle"], out vehicle_picture: Entity(tt:picture) #_[canonical="vehicle picture"], out driver: String #_[canonical="driver"], out driver_picture: Entity(tt:picture) #_[canonical="driver picture"], out eta: Measure(ms) #_[canonical="eta"], out from: Location #_[canonical="from"], out to: Location #_[canonical="to"]) #_[canonical="get current uber ride"] #_[confirmation="your current Uber ride status"] #_[confirmation_remote="$__person's current Uber ride status"] #_[formatted=[{type="text",text="Your ride from ${from} to ${to} is ${status}, eta: ${eta:min}"}, {type="text",text="${driver}"}, {type="picture",url="${driver_picture}"}, {type="text",text="${vehicle}"}, {type="picture",url="${vehicle_picture}"}]] #[poll_interval=60000ms] #[doc="Get current Uber ride"]; action request(in req start: Location #_[prompt="Where do you want to call Uber?"] #_[canonical="start"], in req end: Location #_[prompt="Where to you want to go? "] #_[canonical="end"], in req uber_type: Enum(pool,uber_x,uber_xl,uber_black,select,suv,assist) #_[prompt="What type of uber do you want to call? "] #_[canonical="uber type"], in opt seat_count: Number #_[prompt="How many seats? "] #_[canonical="seat count"]) #_[canonical="request uber ride"] #_[confirmation="request an Uber ride from $start to $end"] #_[confirmation_remote="request an Uber ride from $start to $end from $__person's Uber account"] #[doc="Request an uber ride "]; }

Dataset

dataset @com.uber language "en" { query := @com.uber.time_estimate() #_[utterances=["time estimate for uber"]] #[id=1687998] #[name=""]; query (p_start :Location, p_end :Location) := @com.uber.price_estimate(start=p_start, end=p_end) #_[utterances=["a price estimate for uber from $p_start to $p_end", "the price of an uber from $p_start to $p_end", "the cost of an uber from $p_start to $p_end"]] #[id=1687999] #[name=""]; query (p_start :Location, p_end :Location, p_uber_type :Enum(pool,uber_x,uber_xl,uber_black,select,suv,assist)) := (@com.uber.price_estimate(start=p_start, end=p_end)), uber_type == p_uber_type #_[utterances=["a price estimate for uber $p_uber_type from $p_start to $p_end"]] #[id=1688001] #[name=""]; query (p_start :Location) := @com.uber.time_estimate(start=p_start) #_[utterances=["time estimate for uber around $p_start", "eta for uber at $p_start", "the distance of uber at $p_start", "the distance of the closest uber at $p_start"]] #[id=1688002] #[name=""]; query (p_start :Location, p_uber_type :Enum(pool,uber_x,uber_xl,uber_black,select,suv,assist)) := (@com.uber.time_estimate(start=p_start)), uber_type == p_uber_type #_[utterances=["eta for uber of type $p_uber_type at $p_start"]] #[id=1688004] #[name=""]; action (p_uber_type :Enum(pool,uber_x,uber_xl,uber_black,select,suv,assist), p_start :Location, p_end :Location) := @com.uber.request(start=p_start, end=p_end, uber_type=p_uber_type) #_[utterances=["request an $p_uber_type from $p_start to $p_end"]] #[id=1688008] #[name=""]; query := @com.uber.current() #_[utterances=["get status of my current ride"]] #[id=1688009] #[name=""]; action (p_start :Location, p_end :Location) := @com.uber.request(start=p_start, end=p_end) #_[utterances=["request an uber from $p_start to $p_end", "order an uber from $p_start to $p_end"]] #[id=1688010] #[name=""]; action := @com.uber.request() #_[utterances=["request an uber ", "call uber", "order uber"]] #[id=1688011] #[name=""]; }