This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{"class"=>"AddViews", | |
"properties"=> | |
{"temporary"=>false, | |
"dialogPhase"=>"Summary", | |
"scrollToTop"=>false, | |
"views"=> | |
[{"class"=>"AssistantUtteranceView", | |
"properties"=> | |
{"dialogIdentifier"=>"AnswerFacts#noResults", | |
"speakableText"=> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
listen_for /test button/i do | |
add_views = SiriAddViews.new | |
add_views.make_root(last_ref_id) | |
button = SiriButton.new | |
button.text << "Button1" | |
newUtterance = SiriAssistantUtteranceView.new("Clicked!") | |
startRequest = SiriStartRequest.new(newUtterance, false, true) | |
sendCommand = SiriSendCommands.new | |
sendCommand.commands << startRequest | |
#button.commands << SiriSendCommands.new(SiriStartRequest.new(SiriAssistantUtteranceView.new("Clicked!"), false, true)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
port: 443 | |
log_level: 1 | |
plugins: | |
# NOTE: run bundle after changing plugin configurations to update required gems | |
# - name: 'Example' | |
# path: './plugins/siriproxy-example' | |
# - name: 'Thermostat' | |
# git: 'git://github.com/plamoni/SiriProxy-Thermostat.git' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
port: 443 | |
log_level: 1 | |
plugins: | |
# NOTE: run bundle after changing plugin configurations to update required gems | |
- name: 'Example' | |
path: './plugins/siriproxy-example' | |
# - name: 'Thermostat' | |
# git: 'git://github.com/plamoni/SiriProxy-Thermostat.git' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'cora' | |
require 'siri_objects' | |
require 'pp' | |
####### | |
# This is a "hello world" style plugin. It simply intercepts the phrase "test siri proxy" and responds | |
# with a message about the proxy being up and running (along with a couple other core features). This | |
# is good base code for other plugins. | |
# | |
# Remember to add other plugins to the "config.yml" file if you create them! |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
port: 443 | |
log_level: 1 | |
plugins: | |
# NOTE: run bundle after changing plugin configurations to update required gems | |
- name: 'Example' | |
path: './plugins/siriproxy-example' | |
# - name: 'Thermostat' | |
# git: 'git://github.com/plamoni/SiriProxy-Thermostat.git' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
port: 443 | |
log_level: 1 | |
plugins: | |
# NOTE: run bundle after changing plugin configurations to update required gems | |
- name: 'Example' | |
path: '/Users/Equinox/SiriProxy/plugins/siriproxy-example' | |
# - name: 'Thermostat' | |
# git: 'git://github.com/plamoni/SiriProxy-Thermostat.git' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1. Copy the siriproxy-example folder and rename it to siriproxy-*plugin* | |
2. open the gemspec file in your new plugin folder and change both of the plugin names to "siriproxy-*plugin*" | |
3. Open your .rb file in your plugin file/lib/ and change the line SiriProxy::Plugin::Example to SiriProxy::Plugin::*PluginName* | |
3. Open your config.yml and copy the Example plugin lines, make sure the spacing stays EXACTLY the same! Change Name: to *PluginName* from step 3, and change path to "/Users/*username*/SiriProxy/plugins/siriproxy-*plugin*/" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
filter "StartRequest", direction: :from_iphone do |object| | |
puts "[Info - Button Information] #{object["properties"]}" | |
say "I don't have any #{object["properties"]["utterance"].capitalize} muffins, sorry..." #Fails Here, Logs the Say but never actually says it | |
object = false #After a while, it will google search my utterance I used | |
end | |
def createButton(text, utterance, command) | |
startRequest = SiriStartRequest.new(text, false, true) #Does the true proxyOnly parameter matter here? | |
sendCommand = SiriSendCommands.new |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'cora' | |
require 'siri_objects' | |
require 'pp' | |
class SiriProxy::Plugin::Nick < SiriProxy::Plugin | |
def initialize(config) | |
#if you have custom configuration options, process them here! | |
end |
OlderNewer