Skip to content
This repository has been archived by the owner on Jan 28, 2023. It is now read-only.

API Todos

netpro2k edited this page Dec 1, 2011 · 2 revisions

#API Todos

Cora

These will be expose in Cora and then overridden in SiriProxy

Rich Response

In cora this would return plain text and links to images. In SiriProxy this will return a WolframAlpha view with the given text and images.

show_rich_response do
  text "Hello this is some text"
  image "https://www.google.com/logos/2011/thanksgiving-2011-hp.jpg"
  text "And some more text"
end

Option Lists

In cora this would return a simple list of options (and restrict input). In SiriProxy would return an option list, and also prompt for input with limited options. Is there a way for us to actually restrict Siri's voice recognition scope to these options?

ask "Which one?", options: ["Option 1", "Option 2"]

Location Lists

In cora this will likely return a list of google maps links. In SiriProxy it would return the style of list used for Restaurant searches

list_locations [loc1,loc2,loc3], optionHash # Array of Cora::Location objects, or maybe just hashes

Map Snippets

In cora this will likely be a link to a google map. In SiriProxy shows a map. OptionHash might contain extra options on how the map is displayed (depending on what is available)

show_map loc, optionHash # A Cora::Location object, or maybe just a hash

SiriProxy

These will not be available in Cora ###SMS & Email Snippets Shows an SMS or Email Snippet, like you see when confirming an email/sms.

show_sms recipiants: ['Person 1', 'Person 2'], message: "Hello!" # other options may be exposed as well depending on what is available
show_email recipiants: ['Person 1', 'Person 2'], subject: "A subjec", message: "Hello!" # other options may be exposed as well depending on what is available

To Discuss

Buttons

Need to allow for both on-phone and on-proxy commands. On phone commands are things like launching browser, calling a number, etc. On server commands would provide a callback to the plugin.

API idea:

button "An on proxy command" do
  say "You clicked button 1"
end
button "An on phone command", commands: [
  # array of command objects, or perhaps objects
]

User/Device Info Queries

  • device location
  • language
  • contact information
  • calendar information
  • email queries
  • What else?

Do we want to have individual methods like get_location or do we want to request through the manager manager.get_location. Can we trigger a location update or data query? Should plugins be notified when a new location is received?