SquareTag Service

This specification is currently a draft under development.

Issues:

The SquareTag Service manages all of the hard work associated with SquareTags. It handles the creation, claiming, and management of tags as well as which app runs when a tag is scanned.

Events

isOwner

This event is raised to your ruleset when it is configured as the SquareTag app and the owner scans the tag.

Domain

explicit

Type

isOwner

Attributes

  • tagName
  • tag

The attributes have the following semantics:

  • tagName
    • Tag name is the name of the tag (also called the Tag Code)
  • tag
    • This variable has all associated data of the SquareTag in it. The tag variable is a hash with the following elements:
      • tagName
        • The name (or code) of the tag
      • salt
        • This is the random number that gets generated on creation. It is used for verification purposes.
      • tagURL
        • This is the URL that is encoded in the SquareTag's actual QR code
      • tagQRImageURL
        • This is a URL to an image which contains the QR code
      • tagECI

isNotOwner

This event is raised to your ruleset when it is configured as the SquareTag app and an authenticated user who is not the owner scans the tag.

Domain

explicit

Type

isNotOwner

Attributes

  • tagName
  • tag

The attributes have the following semantics:

  • tagName
    • Tag name is the name of the tag (also called the Tag Code)
  • tag
    • This variable has all associated data of the SquareTag in it. The tag variable is a hash with the following elements:
      • tagName
        • The name (or code) of the tag
      • salt
        • This is the random number that gets generated on creation. It is used for verification purposes.
      • tagURL
        • This is the URL that is encoded in the SquareTag's actual QR code
      • tagQRImageURL
        • This is a URL to an image which contains the QR code
      • tagECI

isAnonymous

This event is raised to your ruleset when it is configured as the SquareTag app and the owner scans the tag.

Domain

explicit

Type

isOwner

Attributes

  • tagName
  • tag

The attributes have the following semantics:

  • tagName
    • Tag name is the name of the tag (also called the Tag Code)
  • tag
    • This variable has all associated data of the SquareTag in it. The tag variable is a hash with the following elements:
      • tagName
        • The name (or code) of the tag
      • salt
        • This is the random number that gets generated on creation. It is used for verification purposes.
      • tagURL
        • This is the URL that is encoded in the SquareTag's actual QR code
      • tagQRImageURL
        • This is a URL to an image which contains the QR code
      • tagECI

isAnonymous

This event is raised to your ruleset when it is configured as the SquareTag app and the a non-authenticated user scans the tag.

Domain

explicit

Type

isOwner

Attributes

  • tagName
  • tag

The attributes have the following semantics:

  • tagName
    • Tag name is the name of the tag (also called the Tag Code)
  • tag
    • This variable has all associated data of the SquareTag in it. The tag variable is a hash with the following elements:
      • tagName
        • The name (or code) of the tag
      • salt
        • This is the random number that gets generated on creation. It is used for verification purposes.
      • tagURL
        • This is the URL that is encoded in the SquareTag's actual QR code
      • tagQRImageURL
        • This is a URL to an image which contains the QR code
      • tagECI

 

Actions

The SquareTag service provides the following actions. In order to use these actions, a ruleset must include the SquareTag service ruleset as a module:

meta {
	...
	use module a41x196 alias SquareTag
	...

}

 

inject_styling

inject_styling is an action that takes no arguments and simply injects CSS into the page to help style your app like the other SquareTag apps. This is highly reccomended, though not required. It is generally used when creating and displaying an app panel.

{
      SquareTag:inject_styling();
      CloudRain:createAppPanel(thisRID, "Journal", {});
      CloudRain:loadAppPanel(thisRID, html);
}

 

Functions

The SquareTag service provides the following actions. In order to use these actions, a ruleset must include the SquareTag service ruleset as a module:

meta {
	...
	use module a41x196 alias SquareTag
	...}

get_default_app_html

get_default_app_html is a function that takes no arguments. It returns stylized HTML used for making your SquareTag Application the default.

pre {
	defaultAppHtml = SquareTag:get_default_app_html();
	...
	html = <<
		#{defaultAppHtml}
		...
	>>;
}

Copyright Picolabs | Licensed under Creative Commons.