The buttons module

The buttons module contains classes pertaining to creating objects which can be sent to the iPhone or Apple’s web server which pertain to creating buttons on the iPhone.

The _Custom class

Inheritance diagram of pysiriproxy.objects.buttons._Custom

class pysiriproxy.objects.buttons._Custom(buttonText, command)[source]

The _Custom class creates a button that has the iPhone send a custom command to the event that it is pressed.

The _WebSearchButton class

Inheritance diagram of pysiriproxy.objects.buttons._WebSearchButton

class pysiriproxy.objects.buttons._WebSearchButton(buttonText, query)[source]

The _WebSearchButton creates a button on the iPhone Siri view which will perform a web search for a specific query in the event that the button is pressed.

The SiriObject class

Inheritance diagram of pysiriproxy.objects.buttons.SiriObject

class pysiriproxy.objects.buttons.SiriObject(className, group)

The SiriObject class encapsulates the base functionality for all object being sent to the iPhone or to Apple’s web server.

Note

This class is meant to be subclassed to provide the implementation for a specific object.

ProtocolVersion

The identifier which indicates the version of the protocol.

classmethod isArgumentList(obj)

Determine if the given object is a list of arguments, or not.

  • obj – The object
classmethod isSiriObject(obj)

Determine if the given object is a SiriObject, or not.

  • obj – The object
makeRoot(refId=None, aceId=None)

Make the SiriObject the root object.

  • refId – The refId for this object
  • aceId – The aceId for this object
setAceId(aceId=None)

Set the ace id for this object.

  • aceId – The aceId for this object
setNonNoneArguments(argumentNames, localVars)

Takes a list of strings which represent names of input variables and sets properties of the same name on the current object if the value of the argument is not None.

  • argumentNames – The list of argument names to set
  • localVars – The local variables
setRefId(refId=None)

Set the ref id for this object.

  • refId – The refId for this object
toDict()

Convert this object into a Python dictionary.

The Actions class

Inheritance diagram of pysiriproxy.objects.buttons.Actions

class pysiriproxy.objects.buttons.Actions

The Actions class contains a list of Action types as well as a function for creating specific types of Actions.

This class provides a factory function for creating Actions of a specific type.

CustomCommand

The CustomCommand action type.

WebSearch

The WebSearch action type.

classmethod create(actionType, *args, **kwargs)

Return a specific Action wrapped in a SendCommands object so it can be sent to Siri as a command.

  • actionType – The type of Action to create
  • args – The arguments
  • kwargs – The keyword arguments

The Buttons class

Inheritance diagram of pysiriproxy.objects.buttons.Buttons

class pysiriproxy.objects.buttons.Buttons[source]

The Buttons class contains the various types of Buttons as well as a function for creating Buttons of a specific type.

This class provides a factory function for creating Buttons of a specific type.

Custom

A button that executes a custom command when it is pressed.

WebSearch

A button that performs a web search for a specific query when it is pressed.

classmethod create(buttonType, buttonText, *args, **kwargs)[source]

Create a Button of the given type.

  • buttonType – The type of Button to create
  • buttonText – The text displayed on the button
  • args – The arguments
  • kwargs – The keyword arguments

The _Button class

Inheritance diagram of pysiriproxy.objects.buttons._Button

class pysiriproxy.objects.buttons._Button(buttonText, commands=None)[source]

The _Button class encapsulates the base functionality for creating a button on the iPhone Siri view.

Table Of Contents

Previous topic

The requests module

Next topic

The actions module

This Page