pebble/devsite/spec/fixtures/js.json

7653 lines
403 KiB
JSON
Raw Permalink Normal View History

[
{
"description": {
"type": "root",
"children": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "The Pebble namespace is where all of the Pebble specific methods and\nproperties exist. This class contains methods belonging to PebbleKit JS and\nallows bi-directional communication with a C watchapp, as well as managing\nthe user's timeline subscriptions and obtaining information about their\nwatch.",
"position": {
"start": {
"line": 1,
"column": 1,
"offset": 0
},
"end": {
"line": 5,
"column": 7,
"offset": 298
},
"indent": [
1,
1,
1,
1
]
}
}
],
"position": {
"start": {
"line": 1,
"column": 1,
"offset": 0
},
"end": {
"line": 5,
"column": 7,
"offset": 298
},
"indent": [
1,
1,
1,
1
]
}
}
],
"position": {
"start": {
"line": 1,
"column": 1,
"offset": 0
},
"end": {
"line": 5,
"column": 7,
"offset": 298
}
}
},
"tags": [
{
"title": "namespace",
"description": null,
"lineNumber": 1,
"type": null,
"name": "Pebble"
},
{
"title": "desc",
"description": "The Pebble namespace is where all of the Pebble specific methods and\nproperties exist. This class contains methods belonging to PebbleKit JS and\nallows bi-directional communication with a C watchapp, as well as managing\nthe user's timeline subscriptions and obtaining information about their\nwatch.",
"lineNumber": 3
}
],
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 9,
"column": 3
}
},
"context": {
"loc": {
"start": {
"line": 10,
"column": 0
},
"end": {
"line": 10,
"column": 24
}
},
"file": "/Users/orviwan/Pebble/developer.getpebble.com/js-docs/pkjs/Pebble.js",
"code": "/**\n * @namespace Pebble\n *\n * @desc The Pebble namespace is where all of the Pebble specific methods and\n * properties exist. This class contains methods belonging to PebbleKit JS and\n * allows bi-directional communication with a C watchapp, as well as managing\n * the user's timeline subscriptions and obtaining information about their\n * watch.\n */\nvar Pebble = new Object;\n\n\n/**\n * @desc Adds a listener for Pebble JS events, such as when an ``AppMessage`` is\n * received or the configuration view is opened or closed.\n *\n * #### `event` Options\n *\n * Possible values:\n *\n * * `ready` - The watchapp has been launched and the PebbleKit JS component\n * is now ready to receive events.\n * * `appmessage` - The watch sent an ``AppMessage`` to PebbleKit JS. The\n * AppMessage ``Dictionary`` is contained in the payload property (i.e:\n * event.payload). The payload consists of key-value pairs, where the keys\n * are strings containing integers (e.g: \"0\"), or aliases for keys defined\n * in package.json (e.g: \"KEY_EXAMPLE\"). Values should be integers, strings\n * or byte arrays (arrays of characters).\n * * `showConfiguration` - The user has requested the app's configuration\n * webview to be displayed. This can occur either upon the app's initial\n * install or when the user taps 'Settings' in the 'My Pebble' view withtin\n * the phone app.\n * * `webviewclosed` - The configuration webview was closed by the user. If\n * the webview had a response, it will be contained in the response property\n * (i.e: event.response). This response can be used to feed back user\n * preferences to the watchapp.\n *\n * @param {String} event - The type of the event, from the list described above.\n * @param {EventCallback} callback - The developer defined {@link #EventCallback EventCallback}\n * to receive any events of the type specified that occur.\n*/\nPebble.addEventListener = function(event, callback) { };\n\n/**\n * @desc Remove an existing event listener previously registered with\n * ``Pebble.addEventListener()``.\n *\n * @param {String} type - The type of the event listener to be removed. See\n * ``Pebble.addEventListener()`` for a list of available types.\n * @param {Function} callback - The existing developer-defined function that was\n * previously registered.\n */\nPebble.removeEventListener = function(type, callback) { };\n\n/**\n * @desc Show a simple modal notification on the connected watch.\n *\n * @param {String} title - The title of the notification\n * @param {String} body - The main content of the notification\n */\nPebble.showSimpleNotificationOnPebble = function(title, body) { };\n\n/**\n * @desc Send an AppMessage to the app running on the watch. Messages should be\n * in the form of JSON objects containing key-value pairs. See\n * Pebble.sendAppMessage() for valid key and value data types.\n * Pebble.sendAppMessage = function(data, onSuccess, onFailure) { };\n *\n * @returns {Number} The transaction id for this message\n *\n * @param {Object} data - A JSON object containing key-value pairs to send to\n * the watch. Values in arrays that are greater then 255 will be mod 255\n * before sending.\n * @param {AppMessageAckCallback} onSuccess - A developer-defined {@link #AppMessageAckCallback AppMessageAckCallback}\n * callback to run if the watch acknowledges (ACK) this message.\n * @param {AppMessageOnFailure} onSuccess - A developer-defined {@link #AppMessageNackCallback AppMessageNackCallback}\n * callback to run if the watch does not acknowledges (NACK) this message.\n */\nPebble.sendAppMessage = function(data, onSuccess, onFailure) { };\n\n\n/**\n * @desc Get the user's timeline token for this app. This is a string and is\n * unique per user per app. Note: In order for timeline tokens to be\n * available, the app must be submitted to the Pebble appstore, but does not\n * need to be public. Read more in the\n * {@link /guides/pebble-timeline/timeline-js/ timeline guide
},
"kind": "namespace",
"name": "Pebble",
"members": {
"instance": [],
"static": [
{
"description": {
"type": "root",
"children": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "Adds a listener for Pebble JS events, such as when an ",
"position": {
"start": {
"line": 1,
"column": 1,
"offset": 0
},
"end": {
"line": 1,
"column": 55,
"offset": 54
},
"indent": []
}
},
{
"type": "inlineCode",
"value": "AppMessage",
"position": {
"start": {
"line": 1,
"column": 55,
"offset": 54
},
"end": {
"line": 1,
"column": 69,
"offset": 68
},
"indent": []
}
},
{
"type": "text",
"value": " is\n received or the configuration view is opened or closed.",
"position": {
"start": {
"line": 1,
"column": 69,
"offset": 68
},
"end": {
"line": 2,
"column": 60,
"offset": 131
},
"indent": [
1
]
}
}
],
"position": {
"start": {
"line": 1,
"column": 1,
"offset": 0
},
"end": {
"line": 2,
"column": 60,
"offset": 131
},
"indent": [
1
]
}
},
{
"type": "heading",
"depth": 4,
"children": [
{
"type": "inlineCode",
"value": "event",
"position": {
"start": {
"line": 4,
"column": 8,
"offset": 140
},
"end": {
"line": 4,
"column": 15,
"offset": 147
},
"indent": []
}
},
{
"type": "text",
"value": " Options",
"position": {
"start": {
"line": 4,
"column": 15,
"offset": 147
},
"end": {
"line": 4,
"column": 23,
"offset": 155
},
"indent": []
}
}
],
"position": {
"start": {
"line": 4,
"column": 1,
"offset": 133
},
"end": {
"line": 4,
"column": 23,
"offset": 155
},
"indent": []
}
},
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": " Possible values:",
"position": {
"start": {
"line": 6,
"column": 1,
"offset": 157
},
"end": {
"line": 6,
"column": 19,
"offset": 175
},
"indent": []
}
}
],
"position": {
"start": {
"line": 6,
"column": 1,
"offset": 157
},
"end": {
"line": 6,
"column": 19,
"offset": 175
},
"indent": []
}
},
{
"type": "list",
"ordered": false,
"start": null,
"loose": false,
"children": [
{
"type": "listItem",
"loose": false,
"checked": null,
"children": [
{
"type": "paragraph",
"children": [
{
"type": "inlineCode",
"value": "ready",
"position": {
"start": {
"line": 8,
"column": 5,
"offset": 181
},
"end": {
"line": 8,
"column": 12,
"offset": 188
},
"indent": []
}
},
{
"type": "text",
"value": " - The watchapp has been launched and the PebbleKit JS component\nis now ready to receive events.",
"position": {
"start": {
"line": 8,
"column": 12,
"offset": 188
},
"end": {
"line": 9,
"column": 36,
"offset": 288
},
"indent": [
5
]
}
}
],
"position": {
"start": {
"line": 8,
"column": 5,
"offset": 181
},
"end": {
"line": 9,
"column": 36,
"offset": 288
},
"indent": [
5
]
}
}
],
"position": {
"start": {
"line": 8,
"column": 1,
"offset": 177
},
"end": {
"line": 9,
"column": 36,
"offset": 288
},
"indent": [
1
]
}
},
{
"type": "listItem",
"loose": false,
"checked": null,
"children": [
{
"type": "paragraph",
"children": [
{
"type": "inlineCode",
"value": "appmessage",
"position": {
"start": {
"line": 10,
"column": 5,
"offset": 293
},
"end": {
"line": 10,
"column": 17,
"offset": 305
},
"indent": []
}
},
{
"type": "text",
"value": " - The watch sent an ",
"position": {
"start": {
"line": 10,
"column": 17,
"offset": 305
},
"end": {
"line": 10,
"column": 38,
"offset": 326
},
"indent": []
}
},
{
"type": "inlineCode",
"value": "AppMessage",
"position": {
"start": {
"line": 10,
"column": 38,
"offset": 326
},
"end": {
"line": 10,
"column": 52,
"offset": 340
},
"indent": []
}
},
{
"type": "text",
"value": " to PebbleKit JS. The\nAppMessage ",
"position": {
"start": {
"line": 10,
"column": 52,
"offset": 340
},
"end": {
"line": 11,
"column": 16,
"offset": 377
},
"indent": [
5
]
}
},
{
"type": "inlineCode",
"value": "Dictionary",
"position": {
"start": {
"line": 11,
"column": 16,
"offset": 377
},
"end": {
"line": 11,
"column": 30,
"offset": 391
},
"indent": []
}
},
{
"type": "text",
"value": " is contained in the payload property (i.e:\nevent.payload). The payload consists of key-value pairs, where the keys\nare strings containing integers (e.g: \"0\"), or aliases for keys defined\nin package.json (e.g: \"KEY_EXAMPLE\"). Values should be integers, strings\nor byte arrays (arrays of characters).",
"position": {
"start": {
"line": 11,
"column": 30,
"offset": 391
},
"end": {
"line": 15,
"column": 43,
"offset": 706
},
"indent": [
5,
5,
5,
5
]
}
}
],
"position": {
"start": {
"line": 10,
"column": 5,
"offset": 293
},
"end": {
"line": 15,
"column": 43,
"offset": 706
},
"indent": [
5,
5,
5,
5,
5
]
}
}
],
"position": {
"start": {
"line": 10,
"column": 1,
"offset": 289
},
"end": {
"line": 15,
"column": 43,
"offset": 706
},
"indent": [
1,
1,
1,
1,
1
]
}
},
{
"type": "listItem",
"loose": false,
"checked": null,
"children": [
{
"type": "paragraph",
"children": [
{
"type": "inlineCode",
"value": "showConfiguration",
"position": {
"start": {
"line": 16,
"column": 5,
"offset": 711
},
"end": {
"line": 16,
"column": 24,
"offset": 730
},
"indent": []
}
},
{
"type": "text",
"value": " - The user has requested the app's configuration\nwebview to be displayed. This can occur either upon the app's initial\ninstall or when the user taps 'Settings' in the 'My Pebble' view withtin\nthe phone app.",
"position": {
"start": {
"line": 16,
"column": 24,
"offset": 730
},
"end": {
"line": 19,
"column": 19,
"offset": 949
},
"indent": [
5,
5,
5
]
}
}
],
"position": {
"start": {
"line": 16,
"column": 5,
"offset": 711
},
"end": {
"line": 19,
"column": 19,
"offset": 949
},
"indent": [
5,
5,
5
]
}
}
],
"position": {
"start": {
"line": 16,
"column": 1,
"offset": 707
},
"end": {
"line": 19,
"column": 19,
"offset": 949
},
"indent": [
1,
1,
1
]
}
},
{
"type": "listItem",
"loose": false,
"checked": null,
"children": [
{
"type": "paragraph",
"children": [
{
"type": "inlineCode",
"value": "webviewclosed",
"position": {
"start": {
"line": 20,
"column": 5,
"offset": 954
},
"end": {
"line": 20,
"column": 20,
"offset": 969
},
"indent": []
}
},
{
"type": "text",
"value": " - The configuration webview was closed by the user. If\nthe webview had a response, it will be contained in the response property\n(i.e: event.response). This response can be used to feed back user\npreferences to the watchapp.",
"position": {
"start": {
"line": 20,
"column": 20,
"offset": 969
},
"end": {
"line": 23,
"column": 33,
"offset": 1206
},
"indent": [
5,
5,
5
]
}
}
],
"position": {
"start": {
"line": 20,
"column": 5,
"offset": 954
},
"end": {
"line": 23,
"column": 33,
"offset": 1206
},
"indent": [
5,
5,
5
]
}
}
],
"position": {
"start": {
"line": 20,
"column": 1,
"offset": 950
},
"end": {
"line": 23,
"column": 33,
"offset": 1206
},
"indent": [
1,
1,
1
]
}
}
],
"position": {
"start": {
"line": 8,
"column": 1,
"offset": 177
},
"end": {
"line": 23,
"column": 33,
"offset": 1206
},
"indent": [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
]
}
}
],
"position": {
"start": {
"line": 1,
"column": 1,
"offset": 0
},
"end": {
"line": 23,
"column": 33,
"offset": 1206
}
}
},
"tags": [
{
"title": "desc",
"description": "Adds a listener for Pebble JS events, such as when an ``AppMessage`` is\n received or the configuration view is opened or closed.\n\n #### `event` Options\n\n Possible values:\n\n * `ready` - The watchapp has been launched and the PebbleKit JS component\n is now ready to receive events.\n * `appmessage` - The watch sent an ``AppMessage`` to PebbleKit JS. The\n AppMessage ``Dictionary`` is contained in the payload property (i.e:\n event.payload). The payload consists of key-value pairs, where the keys\n are strings containing integers (e.g: \"0\"), or aliases for keys defined\n in package.json (e.g: \"KEY_EXAMPLE\"). Values should be integers, strings\n or byte arrays (arrays of characters).\n * `showConfiguration` - The user has requested the app's configuration\n webview to be displayed. This can occur either upon the app's initial\n install or when the user taps 'Settings' in the 'My Pebble' view withtin\n the phone app.\n * `webviewclosed` - The configuration webview was closed by the user. If\n the webview had a response, it will be contained in the response property\n (i.e: event.response). This response can be used to feed back user\n preferences to the watchapp.",
"lineNumber": 1
},
{
"title": "param",
"description": "The type of the event, from the list described above.",
"lineNumber": 25,
"type": {
"type": "NameExpression",
"name": "String"
},
"name": "event"
},
{
"title": "param",
"description": "The developer defined {@link #EventCallback EventCallback}\n to receive any events of the type specified that occur.",
"lineNumber": 26,
"type": {
"type": "NameExpression",
"name": "EventCallback"
},
"name": "callback"
}
],
"loc": {
"start": {
"line": 13,
"column": 0
},
"end": {
"line": 41,
"column": 2
}
},
"context": {
"loc": {
"start": {
"line": 42,
"column": 0
},
"end": {
"line": 42,
"column": 56
}
},
"file": "/Users/orviwan/Pebble/developer.getpebble.com/js-docs/pkjs/Pebble.js",
"code": "/**\n * @namespace Pebble\n *\n * @desc The Pebble namespace is where all of the Pebble specific methods and\n * properties exist. This class contains methods belonging to PebbleKit JS and\n * allows bi-directional communication with a C watchapp, as well as managing\n * the user's timeline subscriptions and obtaining information about their\n * watch.\n */\nvar Pebble = new Object;\n\n\n/**\n * @desc Adds a listener for Pebble JS events, such as when an ``AppMessage`` is\n * received or the configuration view is opened or closed.\n *\n * #### `event` Options\n *\n * Possible values:\n *\n * * `ready` - The watchapp has been launched and the PebbleKit JS component\n * is now ready to receive events.\n * * `appmessage` - The watch sent an ``AppMessage`` to PebbleKit JS. The\n * AppMessage ``Dictionary`` is contained in the payload property (i.e:\n * event.payload). The payload consists of key-value pairs, where the keys\n * are strings containing integers (e.g: \"0\"), or aliases for keys defined\n * in package.json (e.g: \"KEY_EXAMPLE\"). Values should be integers, strings\n * or byte arrays (arrays of characters).\n * * `showConfiguration` - The user has requested the app's configuration\n * webview to be displayed. This can occur either upon the app's initial\n * install or when the user taps 'Settings' in the 'My Pebble' view withtin\n * the phone app.\n * * `webviewclosed` - The configuration webview was closed by the user. If\n * the webview had a response, it will be contained in the response property\n * (i.e: event.response). This response can be used to feed back user\n * preferences to the watchapp.\n *\n * @param {String} event - The type of the event, from the list described above.\n * @param {EventCallback} callback - The developer defined {@link #EventCallback EventCallback}\n * to receive any events of the type specified that occur.\n*/\nPebble.addEventListener = function(event, callback) { };\n\n/**\n * @desc Remove an existing event listener previously registered with\n * ``Pebble.addEventListener()``.\n *\n * @param {String} type - The type of the event listener to be removed. See\n * ``Pebble.addEventListener()`` for a list of available types.\n * @param {Function} callback - The existing developer-defined function that was\n * previously registered.\n */\nPebble.removeEventListener = function(type, callback) { };\n\n/**\n * @desc Show a simple modal notification on the connected watch.\n *\n * @param {String} title - The title of the notification\n * @param {String} body - The main content of the notification\n */\nPebble.showSimpleNotificationOnPebble = function(title, body) { };\n\n/**\n * @desc Send an AppMessage to the app running on the watch. Messages should be\n * in the form of JSON objects containing key-value pairs. See\n * Pebble.sendAppMessage() for valid key and value data types.\n * Pebble.sendAppMessage = function(data, onSuccess, onFailure) { };\n *\n * @returns {Number} The transaction id for this message\n *\n * @param {Object} data - A JSON object containing key-value pairs to send to\n * the watch. Values in arrays that are greater then 255 will be mod 255\n * before sending.\n * @param {AppMessageAckCallback} onSuccess - A developer-defined {@link #AppMessageAckCallback AppMessageAckCallback}\n * callback to run if the watch acknowledges (ACK) this message.\n * @param {AppMessageOnFailure} onSuccess - A developer-defined {@link #AppMessageNackCallback AppMessageNackCallback}\n * callback to run if the watch does not acknowledges (NACK) this message.\n */\nPebble.sendAppMessage = function(data, onSuccess, onFailure) { };\n\n\n/**\n * @desc Get the user's timeline token for this app. This is a string and is\n * unique per user per app. Note: In order for timeline tokens to be\n * available, the app must be submitted to the Pebble appstore, but does not\n * need to be public. Read more in the\n * {@link /guides/pebble-timeline/timeline-js/ timeline
},
"params": [
{
"name": "event",
"lineNumber": 25,
"description": {
"type": "root",
"children": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "The type of the event, from the list described above.",
"position": {
"start": {
"line": 1,
"column": 1,
"offset": 0
},
"end": {
"line": 1,
"column": 54,
"offset": 53
},
"indent": []
}
}
],
"position": {
"start": {
"line": 1,
"column": 1,
"offset": 0
},
"end": {
"line": 1,
"column": 54,
"offset": 53
},
"indent": []
}
}
],
"position": {
"start": {
"line": 1,
"column": 1,
"offset": 0
},
"end": {
"line": 1,
"column": 54,
"offset": 53
}
}
},
"type": {
"type": "NameExpression",
"name": "String"
}
},
{
"name": "callback",
"lineNumber": 26,
"description": {
"type": "root",
"children": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "The developer defined ",
"position": {
"start": {
"line": 1,
"column": 1,
"offset": 0
},
"end": {
"line": 1,
"column": 23,
"offset": 22
},
"indent": []
}
},
{
"type": "link",
"url": "#EventCallback",
"title": null,
"jsdoc": true,
"children": [
{
"type": "text",
"value": "EventCallback"
}
],
"position": {
"start": {
"line": 1,
"column": 23,
"offset": 22
},
"end": {
"line": 1,
"column": 59,
"offset": 58
},
"indent": []
}
},
{
"type": "text",
"value": "\n to receive any events of the type specified that occur.",
"position": {
"start": {
"line": 1,
"column": 59,
"offset": 58
},
"end": {
"line": 2,
"column": 58,
"offset": 116
},
"indent": [
1
]
}
}
],
"position": {
"start": {
"line": 1,
"column": 1,
"offset": 0
},
"end": {
"line": 2,
"column": 58,
"offset": 116
},
"indent": [
1
]
}
}
],
"position": {
"start": {
"line": 1,
"column": 1,
"offset": 0
},
"end": {
"line": 2,
"column": 58,
"offset": 116
}
}
},
"type": {
"type": "NameExpression",
"name": "EventCallback"
}
}
],
"name": "addEventListener",
"kind": "function",
"memberof": "Pebble",
"scope": "static",
"members": {
"instance": [],
"static": []
},
"path": [
{
"name": "Pebble",
"kind": "namespace"
},
{
"name": "addEventListener",
"kind": "function",
"scope": "static"
}
],
"namespace": "Pebble.addEventListener"
},
{
"description": {
"type": "root",
"children": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "Remove an existing event listener previously registered with\n ",
"position": {
"start": {
"line": 1,
"column": 1,
"offset": 0
},
"end": {
"line": 2,
"column": 3,
"offset": 63
},
"indent": [
1
]
}
},
{
"type": "inlineCode",
"value": "Pebble.addEventListener()",
"position": {
"start": {
"line": 2,
"column": 3,
"offset": 63
},
"end": {
"line": 2,
"column": 32,
"offset": 92
},
"indent": []
}
},
{
"type": "text",
"value": ".",
"position": {
"start": {
"line": 2,
"column": 32,
"offset": 92
},
"end": {
"line": 2,
"column": 33,
"offset": 93
},
"indent": []
}
}
],
"position": {
"start": {
"line": 1,
"column": 1,
"offset": 0
},
"end": {
"line": 2,
"column": 33,
"offset": 93
},
"indent": [
1
]
}
}
],
"position": {
"start": {
"line": 1,
"column": 1,
"offset": 0
},
"end": {
"line": 2,
"column": 33,
"offset": 93
}
}
},
"tags": [
{
"title": "desc",
"description": "Remove an existing event listener previously registered with\n ``Pebble.addEventListener()``.",
"lineNumber": 1
},
{
"title": "param",
"description": "The type of the event listener to be removed. See\n ``Pebble.addEventListener()`` for a list of available types.",
"lineNumber": 4,
"type": {
"type": "NameExpression",
"name": "String"
},
"name": "type"
},
{
"title": "param",
"description": "The existing developer-defined function that was\n previously registered.",
"lineNumber": 6,
"type": {
"type": "NameExpression",
"name": "Function"
},
"name": "callback"
}
],
"loc": {
"start": {
"line": 44,
"column": 0
},
"end": {
"line": 52,
"column": 3
}
},
"context": {
"loc": {
"start": {
"line": 53,
"column": 0
},
"end": {
"line": 53,
"column": 58
}
},
"file": "/Users/orviwan/Pebble/developer.getpebble.com/js-docs/pkjs/Pebble.js",
"code": "/**\n * @namespace Pebble\n *\n * @desc The Pebble namespace is where all of the Pebble specific methods and\n * properties exist. This class contains methods belonging to PebbleKit JS and\n * allows bi-directional communication with a C watchapp, as well as managing\n * the user's timeline subscriptions and obtaining information about their\n * watch.\n */\nvar Pebble = new Object;\n\n\n/**\n * @desc Adds a listener for Pebble JS events, such as when an ``AppMessage`` is\n * received or the configuration view is opened or closed.\n *\n * #### `event` Options\n *\n * Possible values:\n *\n * * `ready` - The watchapp has been launched and the PebbleKit JS component\n * is now ready to receive events.\n * * `appmessage` - The watch sent an ``AppMessage`` to PebbleKit JS. The\n * AppMessage ``Dictionary`` is contained in the payload property (i.e:\n * event.payload). The payload consists of key-value pairs, where the keys\n * are strings containing integers (e.g: \"0\"), or aliases for keys defined\n * in package.json (e.g: \"KEY_EXAMPLE\"). Values should be integers, strings\n * or byte arrays (arrays of characters).\n * * `showConfiguration` - The user has requested the app's configuration\n * webview to be displayed. This can occur either upon the app's initial\n * install or when the user taps 'Settings' in the 'My Pebble' view withtin\n * the phone app.\n * * `webviewclosed` - The configuration webview was closed by the user. If\n * the webview had a response, it will be contained in the response property\n * (i.e: event.response). This response can be used to feed back user\n * preferences to the watchapp.\n *\n * @param {String} event - The type of the event, from the list described above.\n * @param {EventCallback} callback - The developer defined {@link #EventCallback EventCallback}\n * to receive any events of the type specified that occur.\n*/\nPebble.addEventListener = function(event, callback) { };\n\n/**\n * @desc Remove an existing event listener previously registered with\n * ``Pebble.addEventListener()``.\n *\n * @param {String} type - The type of the event listener to be removed. See\n * ``Pebble.addEventListener()`` for a list of available types.\n * @param {Function} callback - The existing developer-defined function that was\n * previously registered.\n */\nPebble.removeEventListener = function(type, callback) { };\n\n/**\n * @desc Show a simple modal notification on the connected watch.\n *\n * @param {String} title - The title of the notification\n * @param {String} body - The main content of the notification\n */\nPebble.showSimpleNotificationOnPebble = function(title, body) { };\n\n/**\n * @desc Send an AppMessage to the app running on the watch. Messages should be\n * in the form of JSON objects containing key-value pairs. See\n * Pebble.sendAppMessage() for valid key and value data types.\n * Pebble.sendAppMessage = function(data, onSuccess, onFailure) { };\n *\n * @returns {Number} The transaction id for this message\n *\n * @param {Object} data - A JSON object containing key-value pairs to send to\n * the watch. Values in arrays that are greater then 255 will be mod 255\n * before sending.\n * @param {AppMessageAckCallback} onSuccess - A developer-defined {@link #AppMessageAckCallback AppMessageAckCallback}\n * callback to run if the watch acknowledges (ACK) this message.\n * @param {AppMessageOnFailure} onSuccess - A developer-defined {@link #AppMessageNackCallback AppMessageNackCallback}\n * callback to run if the watch does not acknowledges (NACK) this message.\n */\nPebble.sendAppMessage = function(data, onSuccess, onFailure) { };\n\n\n/**\n * @desc Get the user's timeline token for this app. This is a string and is\n * unique per user per app. Note: In order for timeline tokens to be\n * available, the app must be submitted to the Pebble appstore, but does not\n * need to be public. Read more in the\n * {@link /guides/pebble-timeline/timeline-js/ timeline
},
"params": [
{
"name": "type",
"lineNumber": 4,
"description": {
"type": "root",
"children": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "The type of the event listener to be removed. See\n ",
"position": {
"start": {
"line": 1,
"column": 1,
"offset": 0
},
"end": {
"line": 2,
"column": 3,
"offset": 52
},
"indent": [
1
]
}
},
{
"type": "inlineCode",
"value": "Pebble.addEventListener()",
"position": {
"start": {
"line": 2,
"column": 3,
"offset": 52
},
"end": {
"line": 2,
"column": 32,
"offset": 81
},
"indent": []
}
},
{
"type": "text",
"value": " for a list of available types.",
"position": {
"start": {
"line": 2,
"column": 32,
"offset": 81
},
"end": {
"line": 2,
"column": 63,
"offset": 112
},
"indent": []
}
}
],
"position": {
"start": {
"line": 1,
"column": 1,
"offset": 0
},
"end": {
"line": 2,
"column": 63,
"offset": 112
},
"indent": [
1
]
}
}
],
"position": {
"start": {
"line": 1,
"column": 1,
"offset": 0
},
"end": {
"line": 2,
"column": 63,
"offset": 112
}
}
},
"type": {
"type": "NameExpression",
"name": "String"
}
},
{
"name": "callback",
"lineNumber": 6,
"description": {
"type": "root",
"children": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "The existing developer-defined function that was\n previously registered.",
"position": {
"start": {
"line": 1,
"column": 1,
"offset": 0
},
"end": {
"line": 2,
"column": 25,
"offset": 73
},
"indent": [
1
]
}
}
],
"position": {
"start": {
"line": 1,
"column": 1,
"offset": 0
},
"end": {
"line": 2,
"column": 25,
"offset": 73
},
"indent": [
1
]
}
}
],
"position": {
"start": {
"line": 1,
"column": 1,
"offset": 0
},
"end": {
"line": 2,
"column": 25,
"offset": 73
}
}
},
"type": {
"type": "NameExpression",
"name": "Function"
}
}
],
"name": "removeEventListener",
"kind": "function",
"memberof": "Pebble",
"scope": "static",
"members": {
"instance": [],
"static": []
},
"path": [
{
"name": "Pebble",
"kind": "namespace"
},
{
"name": "removeEventListener",
"kind": "function",
"scope": "static"
}
],
"namespace": "Pebble.removeEventListener"
},
{
"description": {
"type": "root",
"children": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "Show a simple modal notification on the connected watch.",
"position": {
"start": {
"line": 1,
"column": 1,
"offset": 0
},
"end": {
"line": 1,
"column": 57,
"offset": 56
},
"indent": []
}
}
],
"position": {
"start": {
"line": 1,
"column": 1,
"offset": 0
},
"end": {
"line": 1,
"column": 57,
"offset": 56
},
"indent": []
}
}
],
"position": {
"start": {
"line": 1,
"column": 1,
"offset": 0
},
"end": {
"line": 1,
"column": 57,
"offset": 56
}
}
},
"tags": [
{
"title": "desc",
"description": "Show a simple modal notification on the connected watch.",
"lineNumber": 1
},
{
"title": "param",
"description": "The title of the notification",
"lineNumber": 3,
"type": {
"type": "NameExpression",
"name": "String"
},
"name": "title"
},
{
"title": "param",
"description": "The main content of the notification",
"lineNumber": 4,
"type": {
"type": "NameExpression",
"name": "String"
},
"name": "body"
}
],
"loc": {
"start": {
"line": 55,
"column": 0
},
"end": {
"line": 60,
"column": 3
}
},
"context": {
"loc": {
"start": {
"line": 61,
"column": 0
},
"end": {
"line": 61,
"column": 66
}
},
"file": "/Users/orviwan/Pebble/developer.getpebble.com/js-docs/pkjs/Pebble.js",
"code": "/**\n * @namespace Pebble\n *\n * @desc The Pebble namespace is where all of the Pebble specific methods and\n * properties exist. This class contains methods belonging to PebbleKit JS and\n * allows bi-directional communication with a C watchapp, as well as managing\n * the user's timeline subscriptions and obtaining information about their\n * watch.\n */\nvar Pebble = new Object;\n\n\n/**\n * @desc Adds a listener for Pebble JS events, such as when an ``AppMessage`` is\n * received or the configuration view is opened or closed.\n *\n * #### `event` Options\n *\n * Possible values:\n *\n * * `ready` - The watchapp has been launched and the PebbleKit JS component\n * is now ready to receive events.\n * * `appmessage` - The watch sent an ``AppMessage`` to PebbleKit JS. The\n * AppMessage ``Dictionary`` is contained in the payload property (i.e:\n * event.payload). The payload consists of key-value pairs, where the keys\n * are strings containing integers (e.g: \"0\"), or aliases for keys defined\n * in package.json (e.g: \"KEY_EXAMPLE\"). Values should be integers, strings\n * or byte arrays (arrays of characters).\n * * `showConfiguration` - The user has requested the app's configuration\n * webview to be displayed. This can occur either upon the app's initial\n * install or when the user taps 'Settings' in the 'My Pebble' view withtin\n * the phone app.\n * * `webviewclosed` - The configuration webview was closed by the user. If\n * the webview had a response, it will be contained in the response property\n * (i.e: event.response). This response can be used to feed back user\n * preferences to the watchapp.\n *\n * @param {String} event - The type of the event, from the list described above.\n * @param {EventCallback} callback - The developer defined {@link #EventCallback EventCallback}\n * to receive any events of the type specified that occur.\n*/\nPebble.addEventListener = function(event, callback) { };\n\n/**\n * @desc Remove an existing event listener previously registered with\n * ``Pebble.addEventListener()``.\n *\n * @param {String} type - The type of the event listener to be removed. See\n * ``Pebble.addEventListener()`` for a list of available types.\n * @param {Function} callback - The existing developer-defined function that was\n * previously registered.\n */\nPebble.removeEventListener = function(type, callback) { };\n\n/**\n * @desc Show a simple modal notification on the connected watch.\n *\n * @param {String} title - The title of the notification\n * @param {String} body - The main content of the notification\n */\nPebble.showSimpleNotificationOnPebble = function(title, body) { };\n\n/**\n * @desc Send an AppMessage to the app running on the watch. Messages should be\n * in the form of JSON objects containing key-value pairs. See\n * Pebble.sendAppMessage() for valid key and value data types.\n * Pebble.sendAppMessage = function(data, onSuccess, onFailure) { };\n *\n * @returns {Number} The transaction id for this message\n *\n * @param {Object} data - A JSON object containing key-value pairs to send to\n * the watch. Values in arrays that are greater then 255 will be mod 255\n * before sending.\n * @param {AppMessageAckCallback} onSuccess - A developer-defined {@link #AppMessageAckCallback AppMessageAckCallback}\n * callback to run if the watch acknowledges (ACK) this message.\n * @param {AppMessageOnFailure} onSuccess - A developer-defined {@link #AppMessageNackCallback AppMessageNackCallback}\n * callback to run if the watch does not acknowledges (NACK) this message.\n */\nPebble.sendAppMessage = function(data, onSuccess, onFailure) { };\n\n\n/**\n * @desc Get the user's timeline token for this app. This is a string and is\n * unique per user per app. Note: In order for timeline tokens to be\n * available, the app must be submitted to the Pebble appstore, but does not\n * need to be public. Read more in the\n * {@link /guides/pebble-timeline/timeline-js/ timeline
},
"params": [
{
"name": "title",
"lineNumber": 3,
"description": {
"type": "root",
"children": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "The title of the notification",
"position": {
"start": {
"line": 1,
"column": 1,
"offset": 0
},
"end": {
"line": 1,
"column": 30,
"offset": 29
},
"indent": []
}
}
],
"position": {
"start": {
"line": 1,
"column": 1,
"offset": 0
},
"end": {
"line": 1,
"column": 30,
"offset": 29
},
"indent": []
}
}
],
"position": {
"start": {
"line": 1,
"column": 1,
"offset": 0
},
"end": {
"line": 1,
"column": 30,
"offset": 29
}
}
},
"type": {
"type": "NameExpression",
"name": "String"
}
},
{
"name": "body",
"lineNumber": 4,
"description": {
"type": "root",
"children": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "The main content of the notification",
"position": {
"start": {
"line": 1,
"column": 1,
"offset": 0
},
"end": {
"line": 1,
"column": 37,
"offset": 36
},
"indent": []
}
}
],
"position": {
"start": {
"line": 1,
"column": 1,
"offset": 0
},
"end": {
"line": 1,
"column": 37,
"offset": 36
},
"indent": []
}
}
],
"position": {
"start": {
"line": 1,
"column": 1,
"offset": 0
},
"end": {
"line": 1,
"column": 37,
"offset": 36
}
}
},
"type": {
"type": "NameExpression",
"name": "String"
}
}
],
"name": "showSimpleNotificationOnPebble",
"kind": "function",
"memberof": "Pebble",
"scope": "static",
"members": {
"instance": [],
"static": []
},
"path": [
{
"name": "Pebble",
"kind": "namespace"
},
{
"name": "showSimpleNotificationOnPebble",
"kind": "function",
"scope": "static"
}
],
"namespace": "Pebble.showSimpleNotificationOnPebble"
},
{
"description": {
"type": "root",
"children": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "Send an AppMessage to the app running on the watch. Messages should be\n in the form of JSON objects containing key-value pairs. See\n Pebble.sendAppMessage() for valid key and value data types.\n Pebble.sendAppMessage = function(data, onSuccess, onFailure) { };",
"position": {
"start": {
"line": 1,
"column": 1,
"offset": 0
},
"end": {
"line": 4,
"column": 70,
"offset": 268
},
"indent": [
1,
1,
1
]
}
}
],
"position": {
"start": {
"line": 1,
"column": 1,
"offset": 0
},
"end": {
"line": 4,
"column": 70,
"offset": 268
},
"indent": [
1,
1,
1
]
}
}
],
"position": {
"start": {
"line": 1,
"column": 1,
"offset": 0
},
"end": {
"line": 4,
"column": 70,
"offset": 268
}
}
},
"tags": [
{
"title": "desc",
"description": "Send an AppMessage to the app running on the watch. Messages should be\n in the form of JSON objects containing key-value pairs. See\n Pebble.sendAppMessage() for valid key and value data types.\n Pebble.sendAppMessage = function(data, onSuccess, onFailure) { };",
"lineNumber": 1
},
{
"title": "returns",
"description": "The transaction id for this message",
"lineNumber": 6,
"type": {
"type": "NameExpression",
"name": "Number"
}
},
{
"title": "param",
"description": "A JSON object containing key-value pairs to send to\n the watch. Values in arrays that are greater then 255 will be mod 255\n before sending.",
"lineNumber": 8,
"type": {
"type": "NameExpression",
"name": "Object"
},
"name": "data"
},
{
"title": "param",
"description": "A developer-defined {@link #AppMessageAckCallback AppMessageAckCallback}\n callback to run if the watch acknowledges (ACK) this message.",
"lineNumber": 11,
"type": {
"type": "NameExpression",
"name": "AppMessageAckCallback"
},
"name": "onSuccess"
},
{
"title": "param",
"description": "A developer-defined {@link #AppMessageNackCallback AppMessageNackCallback}\n callback to run if the watch does not acknowledges (NACK) this message.",
"lineNumber": 13,
"type": {
"type": "NameExpression",
"name": "AppMessageOnFailure"
},
"name": "onSuccess"
}
],
"loc": {
"start": {
"line": 63,
"column": 0
},
"end": {
"line": 78,
"column": 3
}
},
"context": {
"loc": {
"start": {
"line": 79,
"column": 0
},
"end": {
"line": 79,
"column": 65
}
},
"file": "/Users/orviwan/Pebble/developer.getpebble.com/js-docs/pkjs/Pebble.js",
"code": "/**\n * @namespace Pebble\n *\n * @desc The Pebble namespace is where all of the Pebble specific methods and\n * properties exist. This class contains methods belonging to PebbleKit JS and\n * allows bi-directional communication with a C watchapp, as well as managing\n * the user's timeline subscriptions and obtaining information about their\n * watch.\n */\nvar Pebble = new Object;\n\n\n/**\n * @desc Adds a listener for Pebble JS events, such as when an ``AppMessage`` is\n * received or the configuration view is opened or closed.\n *\n * #### `event` Options\n *\n * Possible values:\n *\n * * `ready` - The watchapp has been launched and the PebbleKit JS component\n * is now ready to receive events.\n * * `appmessage` - The watch sent an ``AppMessage`` to PebbleKit JS. The\n * AppMessage ``Dictionary`` is contained in the payload property (i.e:\n * event.payload). The payload consists of key-value pairs, where the keys\n * are strings containing integers (e.g: \"0\"), or aliases for keys defined\n * in package.json (e.g: \"KEY_EXAMPLE\"). Values should be integers, strings\n * or byte arrays (arrays of characters).\n * * `showConfiguration` - The user has requested the app's configuration\n * webview to be displayed. This can occur either upon the app's initial\n * install or when the user taps 'Settings' in the 'My Pebble' view withtin\n * the phone app.\n * * `webviewclosed` - The configuration webview was closed by the user. If\n * the webview had a response, it will be contained in the response property\n * (i.e: event.response). This response can be used to feed back user\n * preferences to the watchapp.\n *\n * @param {String} event - The type of the event, from the list described above.\n * @param {EventCallback} callback - The developer defined {@link #EventCallback EventCallback}\n * to receive any events of the type specified that occur.\n*/\nPebble.addEventListener = function(event, callback) { };\n\n/**\n * @desc Remove an existing event listener previously registered with\n * ``Pebble.addEventListener()``.\n *\n * @param {String} type - The type of the event listener to be removed. See\n * ``Pebble.addEventListener()`` for a list of available types.\n * @param {Function} callback - The existing developer-defined function that was\n * previously registered.\n */\nPebble.removeEventListener = function(type, callback) { };\n\n/**\n * @desc Show a simple modal notification on the connected watch.\n *\n * @param {String} title - The title of the notification\n * @param {String} body - The main content of the notification\n */\nPebble.showSimpleNotificationOnPebble = function(title, body) { };\n\n/**\n * @desc Send an AppMessage to the app running on the watch. Messages should be\n * in the form of JSON objects containing key-value pairs. See\n * Pebble.sendAppMessage() for valid key and value data types.\n * Pebble.sendAppMessage = function(data, onSuccess, onFailure) { };\n *\n * @returns {Number} The transaction id for this message\n *\n * @param {Object} data - A JSON object containing key-value pairs to send to\n * the watch. Values in arrays that are greater then 255 will be mod 255\n * before sending.\n * @param {AppMessageAckCallback} onSuccess - A developer-defined {@link #AppMessageAckCallback AppMessageAckCallback}\n * callback to run if the watch acknowledges (ACK) this message.\n * @param {AppMessageOnFailure} onSuccess - A developer-defined {@link #AppMessageNackCallback AppMessageNackCallback}\n * callback to run if the watch does not acknowledges (NACK) this message.\n */\nPebble.sendAppMessage = function(data, onSuccess, onFailure) { };\n\n\n/**\n * @desc Get the user's timeline token for this app. This is a string and is\n * unique per user per app. Note: In order for timeline tokens to be\n * available, the app must be submitted to the Pebble appstore, but does not\n * need to be public. Read more in the\n * {@link /guides/pebble-timeline/timeline-js/ timeline
},
"returns": [
{
"description": {
"type": "root",
"children": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "The transaction id for this message",
"position": {
"start": {
"line": 1,
"column": 1,
"offset": 0
},
"end": {
"line": 1,
"column": 36,
"offset": 35
},
"indent": []
}
}
],
"position": {
"start": {
"line": 1,
"column": 1,
"offset": 0
},
"end": {
"line": 1,
"column": 36,
"offset": 35
},
"indent": []
}
}
],
"position": {
"start": {
"line": 1,
"column": 1,
"offset": 0
},
"end": {
"line": 1,
"column": 36,
"offset": 35
}
}
},
"type": {
"type": "NameExpression",
"name": "Number"
}
}
],
"params": [
{
"name": "data",
"lineNumber": 8,
"description": {
"type": "root",
"children": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "A JSON object containing key-value pairs to send to\n the watch. Values in arrays that are greater then 255 will be mod 255\n before sending.",
"position": {
"start": {
"line": 1,
"column": 1,
"offset": 0
},
"end": {
"line": 3,
"column": 20,
"offset": 145
},
"indent": [
1,
1
]
}
}
],
"position": {
"start": {
"line": 1,
"column": 1,
"offset": 0
},
"end": {
"line": 3,
"column": 20,
"offset": 145
},
"indent": [
1,
1
]
}
}
],
"position": {
"start": {
"line": 1,
"column": 1,
"offset": 0
},
"end": {
"line": 3,
"column": 20,
"offset": 145
}
}
},
"type": {
"type": "NameExpression",
"name": "Object"
}
},
{
"name": "onSuccess",
"lineNumber": 11,
"description": {
"type": "root",
"children": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "A developer-defined ",
"position": {
"start": {
"line": 1,
"column": 1,
"offset": 0
},
"end": {
"line": 1,
"column": 21,
"offset": 20
},
"indent": []
}
},
{
"type": "link",
"url": "#AppMessageAckCallback",
"title": null,
"jsdoc": true,
"children": [
{
"type": "text",
"value": "AppMessageAckCallback"
}
],
"position": {
"start": {
"line": 1,
"column": 21,
"offset": 20
},
"end": {
"line": 1,
"column": 73,
"offset": 72
},
"indent": []
}
},
{
"type": "text",
"value": "\n callback to run if the watch acknowledges (ACK) this message.",
"position": {
"start": {
"line": 1,
"column": 73,
"offset": 72
},
"end": {
"line": 2,
"column": 66,
"offset": 138
},
"indent": [
1
]
}
}
],
"position": {
"start": {
"line": 1,
"column": 1,
"offset": 0
},
"end": {
"line": 2,
"column": 66,
"offset": 138
},
"indent": [
1
]
}
}
],
"position": {
"start": {
"line": 1,
"column": 1,
"offset": 0
},
"end": {
"line": 2,
"column": 66,
"offset": 138
}
}
},
"type": {
"type": "NameExpression",
"name": "AppMessageAckCallback"
}
},
{
"name": "onSuccess",
"lineNumber": 13,
"description": {
"type": "root",
"children": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "A developer-defined ",
"position": {
"start": {
"line": 1,
"column": 1,
"offset": 0
},
"end": {
"line": 1,
"column": 21,
"offset": 20
},
"indent": []
}
},
{
"type": "link",
"url": "#AppMessageNackCallback",
"title": null,
"jsdoc": true,
"children": [
{
"type": "text",
"value": "AppMessageNackCallback"
}
],
"position": {
"start": {
"line": 1,
"column": 21,
"offset": 20
},
"end": {
"line": 1,
"column": 75,
"offset": 74
},
"indent": []
}
},
{
"type": "text",
"value": "\n callback to run if the watch does not acknowledges (NACK) this message.",
"position": {
"start": {
"line": 1,
"column": 75,
"offset": 74
},
"end": {
"line": 2,
"column": 76,
"offset": 150
},
"indent": [
1
]
}
}
],
"position": {
"start": {
"line": 1,
"column": 1,
"offset": 0
},
"end": {
"line": 2,
"column": 76,
"offset": 150
},
"indent": [
1
]
}
}
],
"position": {
"start": {
"line": 1,
"column": 1,
"offset": 0
},
"end": {
"line": 2,
"column": 76,
"offset": 150
}
}
},
"type": {
"type": "NameExpression",
"name": "AppMessageOnFailure"
}
},
{
"title": "param",
"name": "onFailure",
"lineNumber": 79
}
],
"name": "sendAppMessage",
"kind": "function",
"memberof": "Pebble",
"scope": "static",
"members": {
"instance": [],
"static": []
},
"path": [
{
"name": "Pebble",
"kind": "namespace"
},
{
"name": "sendAppMessage",
"kind": "function",
"scope": "static"
}
],
"namespace": "Pebble.sendAppMessage"
},
{
"description": {
"type": "root",
"children": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "Get the user's timeline token for this app. This is a string and is\n unique per user per app. Note: In order for timeline tokens to be\n available, the app must be submitted to the Pebble appstore, but does not\n need to be public. Read more in the\n ",
"position": {
"start": {
"line": 1,
"column": 1,
"offset": 0
},
"end": {
"line": 5,
"column": 5,
"offset": 260
},
"indent": [
1,
1,
1,
1
]
}
},
{
"type": "link",
"url": "/guides/pebble-timeline/timeline-js/",
"title": null,
"jsdoc": true,
"children": [
{
"type": "text",
"value": "timeline guides"
}
],
"position": {
"start": {
"line": 5,
"column": 5,
"offset": 260
},
"end": {
"line": 5,
"column": 65,
"offset": 320
},
"indent": []
}
},
{
"type": "text",
"value": ".",
"position": {
"start": {
"line": 5,
"column": 65,
"offset": 320
},
"end": {
"line": 5,
"column": 66,
"offset": 321
},
"indent": []
}
}
],
"position": {
"start": {
"line": 1,
"column": 1,
"offset": 0
},
"end": {
"line": 5,
"column": 66,
"offset": 321
},
"indent": [
1,
1,
1,
1
]
}
}
],
"position": {
"start": {
"line": 1,
"column": 1,
"offset": 0
},
"end": {
"line": 5,
"column": 66,
"offset": 321
}
}
},
"tags": [
{
"title": "desc",
"description": "Get the user's timeline token for this app. This is a string and is\n unique per user per app. Note: In order for timeline tokens to be\n available, the app must be submitted to the Pebble appstore, but does not\n need to be public. Read more in the\n {@link /guides/pebble-timeline/timeline-js/ timeline guides}.",
"lineNumber": 1
},
{
"title": "param",
"description": "A developer-defined {@link #TimelineTokenCallback TimelineTokenCallback}\n callback to handle a successful attempt to get the timeline token.",
"lineNumber": 7,
"type": {
"type": "NameExpression",
"name": "TimelineTokenCallback"
},
"name": "onSuccess"
},
{
"title": "param",
"description": "A developer-defined callback to handle a\n failed attempt to get the timeline token.",
"lineNumber": 9,
"type": {
"type": "NameExpression",
"name": "Function"
},
"name": "onFailure"
}
],
"loc": {
"start": {
"line": 82,
"column": 0
},
"end": {
"line": 93,
"column": 3
}
},
"context": {
"loc": {
"start": {
"line": 93,
"column": 3
},
"end": {
"line": 93,
"column": 64
}
},
"file": "/Users/orviwan/Pebble/developer.getpebble.com/js-docs/pkjs/Pebble.js",
"code": "/**\n * @namespace Pebble\n *\n * @desc The Pebble namespace is where all of the Pebble specific methods and\n * properties exist. This class contains methods belonging to PebbleKit JS and\n * allows bi-directional communication with a C watchapp, as well as managing\n * the user's timeline subscriptions and obtaining information about their\n * watch.\n */\nvar Pebble = new Object;\n\n\n/**\n * @desc Adds a listener for Pebble JS events, such as when an ``AppMessage`` is\n * received or the configuration view is opened or closed.\n *\n * #### `event` Options\n *\n * Possible values:\n *\n * * `ready` - The watchapp has been launched and the PebbleKit JS component\n * is now ready to receive events.\n * * `appmessage` - The watch sent an ``AppMessage`` to PebbleKit JS. The\n * AppMessage ``Dictionary`` is contained in the payload property (i.e:\n * event.payload). The payload consists of key-value pairs, where the keys\n * are strings containing integers (e.g: \"0\"), or aliases for keys defined\n * in package.json (e.g: \"KEY_EXAMPLE\"). Values should be integers, strings\n * or byte arrays (arrays of characters).\n * * `showConfiguration` - The user has requested the app's configuration\n * webview to be displayed. This can occur either upon the app's initial\n * install or when the user taps 'Settings' in the 'My Pebble' view withtin\n * the phone app.\n * * `webviewclosed` - The configuration webview was closed by the user. If\n * the webview had a response, it will be contained in the response property\n * (i.e: event.response). This response can be used to feed back user\n * preferences to the watchapp.\n *\n * @param {String} event - The type of the event, from the list described above.\n * @param {EventCallback} callback - The developer defined {@link #EventCallback EventCallback}\n * to receive any events of the type specified that occur.\n*/\nPebble.addEventListener = function(event, callback) { };\n\n/**\n * @desc Remove an existing event listener previously registered with\n * ``Pebble.addEventListener()``.\n *\n * @param {String} type - The type of the event listener to be removed. See\n * ``Pebble.addEventListener()`` for a list of available types.\n * @param {Function} callback - The existing developer-defined function that was\n * previously registered.\n */\nPebble.removeEventListener = function(type, callback) { };\n\n/**\n * @desc Show a simple modal notification on the connected watch.\n *\n * @param {String} title - The title of the notification\n * @param {String} body - The main content of the notification\n */\nPebble.showSimpleNotificationOnPebble = function(title, body) { };\n\n/**\n * @desc Send an AppMessage to the app running on the watch. Messages should be\n * in the form of JSON objects containing key-value pairs. See\n * Pebble.sendAppMessage() for valid key and value data types.\n * Pebble.sendAppMessage = function(data, onSuccess, onFailure) { };\n *\n * @returns {Number} The transaction id for this message\n *\n * @param {Object} data - A JSON object containing key-value pairs to send to\n * the watch. Values in arrays that are greater then 255 will be mod 255\n * before sending.\n * @param {AppMessageAckCallback} onSuccess - A developer-defined {@link #AppMessageAckCallback AppMessageAckCallback}\n * callback to run if the watch acknowledges (ACK) this message.\n * @param {AppMessageOnFailure} onSuccess - A developer-defined {@link #AppMessageNackCallback AppMessageNackCallback}\n * callback to run if the watch does not acknowledges (NACK) this message.\n */\nPebble.sendAppMessage = function(data, onSuccess, onFailure) { };\n\n\n/**\n * @desc Get the user's timeline token for this app. This is a string and is\n * unique per user per app. Note: In order for timeline tokens to be\n * available, the app must be submitted to the Pebble appstore, but does not\n * need to be public. Read more in the\n * {@link /guides/pebble-timeline/timeline-js/ timeline
},
"params": [
{
"name": "onSuccess",
"lineNumber": 7,
"description": {
"type": "root",
"children": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "A developer-defined ",
"position": {
"start": {
"line": 1,
"column": 1,
"offset": 0
},
"end": {
"line": 1,
"column": 21,
"offset": 20
},
"indent": []
}
},
{
"type": "link",
"url": "#TimelineTokenCallback",
"title": null,
"jsdoc": true,
"children": [
{
"type": "text",
"value": "TimelineTokenCallback"
}
],
"position": {
"start": {
"line": 1,
"column": 21,
"offset": 20
},
"end": {
"line": 1,
"column": 73,
"offset": 72
},
"indent": []
}
},
{
"type": "text",
"value": "\n callback to handle a successful attempt to get the timeline token.",
"position": {
"start": {
"line": 1,
"column": 73,
"offset": 72
},
"end": {
"line": 2,
"column": 71,
"offset": 143
},
"indent": [
1
]
}
}
],
"position": {
"start": {
"line": 1,
"column": 1,
"offset": 0
},
"end": {
"line": 2,
"column": 71,
"offset": 143
},
"indent": [
1
]
}
}
],
"position": {
"start": {
"line": 1,
"column": 1,
"offset": 0
},
"end": {
"line": 2,
"column": 71,
"offset": 143
}
}
},
"type": {
"type": "NameExpression",
"name": "TimelineTokenCallback"
}
},
{
"name": "onFailure",
"lineNumber": 9,
"description": {
"type": "root",
"children": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "A developer-defined callback to handle a\n failed attempt to get the timeline token.",
"position": {
"start": {
"line": 1,
"column": 1,
"offset": 0
},
"end": {
"line": 2,
"column": 46,
"offset": 86
},
"indent": [
1
]
}
}
],
"position": {
"start": {
"line": 1,
"column": 1,
"offset": 0
},
"end": {
"line": 2,
"column": 46,
"offset": 86
},
"indent": [
1
]
}
}
],
"position": {
"start": {
"line": 1,
"column": 1,
"offset": 0
},
"end": {
"line": 2,
"column": 46,
"offset": 86
}
}
},
"type": {
"type": "NameExpression",
"name": "Function"
}
}
],
"name": "getTimelineToken",
"kind": "function",
"memberof": "Pebble",
"scope": "static",
"members": {
"instance": [],
"static": []
},
"path": [
{
"name": "Pebble",
"kind": "namespace"
},
{
"name": "getTimelineToken",
"kind": "function",
"scope": "static"
}
],
"namespace": "Pebble.getTimelineToken"
},
{
"description": {
"type": "root",
"children": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "Subscribe the user to a timeline topic for your app. This can be used\n to filter the different pins a user could receive according to their\n preferences, as well as maintain groups of users.",
"position": {
"start": {
"line": 1,
"column": 1,
"offset": 0
},
"end": {
"line": 3,
"column": 54,
"offset": 196
},
"indent": [
1,
1
]
}
}
],
"position": {
"start": {
"line": 1,
"column": 1,
"offset": 0
},
"end": {
"line": 3,
"column": 54,
"offset": 196
},
"indent": [
1,
1
]
}
}
],
"position": {
"start": {
"line": 1,
"column": 1,
"offset": 0
},
"end": {
"line": 3,
"column": 54,
"offset": 196
}
}
},
"tags": [
{
"title": "desc",
"description": "Subscribe the user to a timeline topic for your app. This can be used\n to filter the different pins a user could receive according to their\n preferences, as well as maintain groups of users.",
"lineNumber": 1
},
{
"title": "param",
"description": "The desired topic to be subscribed to. Users will\n receive all pins pushed to this topic.",
"lineNumber": 5,
"type": {
"type": "NameExpression",
"name": "String"
},
"name": "topic"
},
{
"title": "param",
"description": "A developer-defined callback to handle a\n successful subscription attempt.",
"lineNumber": 7,
"type": {
"type": "NameExpression",
"name": "Function"
},
"name": "onSuccess"
},
{
"title": "param",
"description": "A developer-defined callback to handle a\n failed subscription attempt.",
"lineNumber": 9,
"type": {
"type": "NameExpression",
"name": "Function"
},
"name": "onFailure"
}
],
"loc": {
"start": {
"line": 95,
"column": 0
},
"end": {
"line": 106,
"column": 3
}
},
"context": {
"loc": {
"start": {
"line": 107,
"column": 0
},
"end": {
"line": 107,
"column": 69
}
},
"file": "/Users/orviwan/Pebble/developer.getpebble.com/js-docs/pkjs/Pebble.js",
"code": "/**\n * @namespace Pebble\n *\n * @desc The Pebble namespace is where all of the Pebble specific methods and\n * properties exist. This class contains methods belonging to PebbleKit JS and\n * allows bi-directional communication with a C watchapp, as well as managing\n * the user's timeline subscriptions and obtaining information about their\n * watch.\n */\nvar Pebble = new Object;\n\n\n/**\n * @desc Adds a listener for Pebble JS events, such as when an ``AppMessage`` is\n * received or the configuration view is opened or closed.\n *\n * #### `event` Options\n *\n * Possible values:\n *\n * * `ready` - The watchapp has been launched and the PebbleKit JS component\n * is now ready to receive events.\n * * `appmessage` - The watch sent an ``AppMessage`` to PebbleKit JS. The\n * AppMessage ``Dictionary`` is contained in the payload property (i.e:\n * event.payload). The payload consists of key-value pairs, where the keys\n * are strings containing integers (e.g: \"0\"), or aliases for keys defined\n * in package.json (e.g: \"KEY_EXAMPLE\"). Values should be integers, strings\n * or byte arrays (arrays of characters).\n * * `showConfiguration` - The user has requested the app's configuration\n * webview to be displayed. This can occur either upon the app's initial\n * install or when the user taps 'Settings' in the 'My Pebble' view withtin\n * the phone app.\n * * `webviewclosed` - The configuration webview was closed by the user. If\n * the webview had a response, it will be contained in the response property\n * (i.e: event.response). This response can be used to feed back user\n * preferences to the watchapp.\n *\n * @param {String} event - The type of the event, from the list described above.\n * @param {EventCallback} callback - The developer defined {@link #EventCallback EventCallback}\n * to receive any events of the type specified that occur.\n*/\nPebble.addEventListener = function(event, callback) { };\n\n/**\n * @desc Remove an existing event listener previously registered with\n * ``Pebble.addEventListener()``.\n *\n * @param {String} type - The type of the event listener to be removed. See\n * ``Pebble.addEventListener()`` for a list of available types.\n * @param {Function} callback - The existing developer-defined function that was\n * previously registered.\n */\nPebble.removeEventListener = function(type, callback) { };\n\n/**\n * @desc Show a simple modal notification on the connected watch.\n *\n * @param {String} title - The title of the notification\n * @param {String} body - The main content of the notification\n */\nPebble.showSimpleNotificationOnPebble = function(title, body) { };\n\n/**\n * @desc Send an AppMessage to the app running on the watch. Messages should be\n * in the form of JSON objects containing key-value pairs. See\n * Pebble.sendAppMessage() for valid key and value data types.\n * Pebble.sendAppMessage = function(data, onSuccess, onFailure) { };\n *\n * @returns {Number} The transaction id for this message\n *\n * @param {Object} data - A JSON object containing key-value pairs to send to\n * the watch. Values in arrays that are greater then 255 will be mod 255\n * before sending.\n * @param {AppMessageAckCallback} onSuccess - A developer-defined {@link #AppMessageAckCallback AppMessageAckCallback}\n * callback to run if the watch acknowledges (ACK) this message.\n * @param {AppMessageOnFailure} onSuccess - A developer-defined {@link #AppMessageNackCallback AppMessageNackCallback}\n * callback to run if the watch does not acknowledges (NACK) this message.\n */\nPebble.sendAppMessage = function(data, onSuccess, onFailure) { };\n\n\n/**\n * @desc Get the user's timeline token for this app. This is a string and is\n * unique per user per app. Note: In order for timeline tokens to be\n * available, the app must be submitted to the Pebble appstore, but does not\n * need to be public. Read more in the\n * {@link /guides/pebble-timeline/timeline-js/ timeline
},
"params": [
{
"name": "topic",
"lineNumber": 5,
"description": {
"type": "root",
"children": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "The desired topic to be subscribed to. Users will\n receive all pins pushed to this topic.",
"position": {
"start": {
"line": 1,
"column": 1,
"offset": 0
},
"end": {
"line": 2,
"column": 43,
"offset": 92
},
"indent": [
1
]
}
}
],
"position": {
"start": {
"line": 1,
"column": 1,
"offset": 0
},
"end": {
"line": 2,
"column": 43,
"offset": 92
},
"indent": [
1
]
}
}
],
"position": {
"start": {
"line": 1,
"column": 1,
"offset": 0
},
"end": {
"line": 2,
"column": 43,
"offset": 92
}
}
},
"type": {
"type": "NameExpression",
"name": "String"
}
},
{
"name": "onSuccess",
"lineNumber": 7,
"description": {
"type": "root",
"children": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "A developer-defined callback to handle a\n successful subscription attempt.",
"position": {
"start": {
"line": 1,
"column": 1,
"offset": 0
},
"end": {
"line": 2,
"column": 37,
"offset": 77
},
"indent": [
1
]
}
}
],
"position": {
"start": {
"line": 1,
"column": 1,
"offset": 0
},
"end": {
"line": 2,
"column": 37,
"offset": 77
},
"indent": [
1
]
}
}
],
"position": {
"start": {
"line": 1,
"column": 1,
"offset": 0
},
"end": {
"line": 2,
"column": 37,
"offset": 77
}
}
},
"type": {
"type": "NameExpression",
"name": "Function"
}
},
{
"name": "onFailure",
"lineNumber": 9,
"description": {
"type": "root",
"children": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "A developer-defined callback to handle a\n failed subscription attempt.",
"position": {
"start": {
"line": 1,
"column": 1,
"offset": 0
},
"end": {
"line": 2,
"column": 33,
"offset": 73
},
"indent": [
1
]
}
}
],
"position": {
"start": {
"line": 1,
"column": 1,
"offset": 0
},
"end": {
"line": 2,
"column": 33,
"offset": 73
},
"indent": [
1
]
}
}
],
"position": {
"start": {
"line": 1,
"column": 1,
"offset": 0
},
"end": {
"line": 2,
"column": 33,
"offset": 73
}
}
},
"type": {
"type": "NameExpression",
"name": "Function"
}
}
],
"name": "timelineSubscribe",
"kind": "function",
"memberof": "Pebble",
"scope": "static",
"members": {
"instance": [],
"static": []
},
"path": [
{
"name": "Pebble",
"kind": "namespace"
},
{
"name": "timelineSubscribe",
"kind": "function",
"scope": "static"
}
],
"namespace": "Pebble.timelineSubscribe"
},
{
"description": {
"type": "root",
"children": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "Unsubscribe the user from a timeline topic for your app. Once\n unsubscribed, the user will no longer receive any pins pushed to this\n topic.",
"position": {
"start": {
"line": 1,
"column": 1,
"offset": 0
},
"end": {
"line": 3,
"column": 11,
"offset": 146
},
"indent": [
1,
1
]
}
}
],
"position": {
"start": {
"line": 1,
"column": 1,
"offset": 0
},
"end": {
"line": 3,
"column": 11,
"offset": 146
},
"indent": [
1,
1
]
}
}
],
"position": {
"start": {
"line": 1,
"column": 1,
"offset": 0
},
"end": {
"line": 3,
"column": 11,
"offset": 146
}
}
},
"tags": [
{
"title": "desc",
"description": "Unsubscribe the user from a timeline topic for your app. Once\n unsubscribed, the user will no longer receive any pins pushed to this\n topic.",
"lineNumber": 1
},
{
"title": "param",
"description": "The desired topic to be unsubscribed from.",
"lineNumber": 5,
"type": {
"type": "NameExpression",
"name": "String"
},
"name": "topic"
},
{
"title": "param",
"description": "A developer-defined callback to handle a\n successful unsubscription attempt.",
"lineNumber": 6,
"type": {
"type": "NameExpression",
"name": "Function"
},
"name": "onSuccess"
},
{
"title": "param",
"description": "A developer-defined callback to handle a\n failed unsubscription attempt.",
"lineNumber": 8,
"type": {
"type": "NameExpression",
"name": "Function"
},
"name": "onFailure"
}
],
"loc": {
"start": {
"line": 109,
"column": 0
},
"end": {
"line": 119,
"column": 3
}
},
"context": {
"loc": {
"start": {
"line": 120,
"column": 0
},
"end": {
"line": 120,
"column": 71
}
},
"file": "/Users/orviwan/Pebble/developer.getpebble.com/js-docs/pkjs/Pebble.js",
"code": "/**\n * @namespace Pebble\n *\n * @desc The Pebble namespace is where all of the Pebble specific methods and\n * properties exist. This class contains methods belonging to PebbleKit JS and\n * allows bi-directional communication with a C watchapp, as well as managing\n * the user's timeline subscriptions and obtaining information about their\n * watch.\n */\nvar Pebble = new Object;\n\n\n/**\n * @desc Adds a listener for Pebble JS events, such as when an ``AppMessage`` is\n * received or the configuration view is opened or closed.\n *\n * #### `event` Options\n *\n * Possible values:\n *\n * * `ready` - The watchapp has been launched and the PebbleKit JS component\n * is now ready to receive events.\n * * `appmessage` - The watch sent an ``AppMessage`` to PebbleKit JS. The\n * AppMessage ``Dictionary`` is contained in the payload property (i.e:\n * event.payload). The payload consists of key-value pairs, where the keys\n * are strings containing integers (e.g: \"0\"), or aliases for keys defined\n * in package.json (e.g: \"KEY_EXAMPLE\"). Values should be integers, strings\n * or byte arrays (arrays of characters).\n * * `showConfiguration` - The user has requested the app's configuration\n * webview to be displayed. This can occur either upon the app's initial\n * install or when the user taps 'Settings' in the 'My Pebble' view withtin\n * the phone app.\n * * `webviewclosed` - The configuration webview was closed by the user. If\n * the webview had a response, it will be contained in the response property\n * (i.e: event.response). This response can be used to feed back user\n * preferences to the watchapp.\n *\n * @param {String} event - The type of the event, from the list described above.\n * @param {EventCallback} callback - The developer defined {@link #EventCallback EventCallback}\n * to receive any events of the type specified that occur.\n*/\nPebble.addEventListener = function(event, callback) { };\n\n/**\n * @desc Remove an existing event listener previously registered with\n * ``Pebble.addEventListener()``.\n *\n * @param {String} type - The type of the event listener to be removed. See\n * ``Pebble.addEventListener()`` for a list of available types.\n * @param {Function} callback - The existing developer-defined function that was\n * previously registered.\n */\nPebble.removeEventListener = function(type, callback) { };\n\n/**\n * @desc Show a simple modal notification on the connected watch.\n *\n * @param {String} title - The title of the notification\n * @param {String} body - The main content of the notification\n */\nPebble.showSimpleNotificationOnPebble = function(title, body) { };\n\n/**\n * @desc Send an AppMessage to the app running on the watch. Messages should be\n * in the form of JSON objects containing key-value pairs. See\n * Pebble.sendAppMessage() for valid key and value data types.\n * Pebble.sendAppMessage = function(data, onSuccess, onFailure) { };\n *\n * @returns {Number} The transaction id for this message\n *\n * @param {Object} data - A JSON object containing key-value pairs to send to\n * the watch. Values in arrays that are greater then 255 will be mod 255\n * before sending.\n * @param {AppMessageAckCallback} onSuccess - A developer-defined {@link #AppMessageAckCallback AppMessageAckCallback}\n * callback to run if the watch acknowledges (ACK) this message.\n * @param {AppMessageOnFailure} onSuccess - A developer-defined {@link #AppMessageNackCallback AppMessageNackCallback}\n * callback to run if the watch does not acknowledges (NACK) this message.\n */\nPebble.sendAppMessage = function(data, onSuccess, onFailure) { };\n\n\n/**\n * @desc Get the user's timeline token for this app. This is a string and is\n * unique per user per app. Note: In order for timeline tokens to be\n * available, the app must be submitted to the Pebble appstore, but does not\n * need to be public. Read more in the\n * {@link /guides/pebble-timeline/timeline-js/ timeline
},
"params": [
{
"name": "topic",
"lineNumber": 5,
"description": {
"type": "root",
"children": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "The desired topic to be unsubscribed from.",
"position": {
"start": {
"line": 1,
"column": 1,
"offset": 0
},
"end": {
"line": 1,
"column": 43,
"offset": 42
},
"indent": []
}
}
],
"position": {
"start": {
"line": 1,
"column": 1,
"offset": 0
},
"end": {
"line": 1,
"column": 43,
"offset": 42
},
"indent": []
}
}
],
"position": {
"start": {
"line": 1,
"column": 1,
"offset": 0
},
"end": {
"line": 1,
"column": 43,
"offset": 42
}
}
},
"type": {
"type": "NameExpression",
"name": "String"
}
},
{
"name": "onSuccess",
"lineNumber": 6,
"description": {
"type": "root",
"children": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "A developer-defined callback to handle a\n successful unsubscription attempt.",
"position": {
"start": {
"line": 1,
"column": 1,
"offset": 0
},
"end": {
"line": 2,
"column": 39,
"offset": 79
},
"indent": [
1
]
}
}
],
"position": {
"start": {
"line": 1,
"column": 1,
"offset": 0
},
"end": {
"line": 2,
"column": 39,
"offset": 79
},
"indent": [
1
]
}
}
],
"position": {
"start": {
"line": 1,
"column": 1,
"offset": 0
},
"end": {
"line": 2,
"column": 39,
"offset": 79
}
}
},
"type": {
"type": "NameExpression",
"name": "Function"
}
},
{
"name": "onFailure",
"lineNumber": 8,
"description": {
"type": "root",
"children": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "A developer-defined callback to handle a\n failed unsubscription attempt.",
"position": {
"start": {
"line": 1,
"column": 1,
"offset": 0
},
"end": {
"line": 2,
"column": 35,
"offset": 75
},
"indent": [
1
]
}
}
],
"position": {
"start": {
"line": 1,
"column": 1,
"offset": 0
},
"end": {
"line": 2,
"column": 35,
"offset": 75
},
"indent": [
1
]
}
}
],
"position": {
"start": {
"line": 1,
"column": 1,
"offset": 0
},
"end": {
"line": 2,
"column": 35,
"offset": 75
}
}
},
"type": {
"type": "NameExpression",
"name": "Function"
}
}
],
"name": "timelineUnsubscribe",
"kind": "function",
"memberof": "Pebble",
"scope": "static",
"members": {
"instance": [],
"static": []
},
"path": [
{
"name": "Pebble",
"kind": "namespace"
},
{
"name": "timelineUnsubscribe",
"kind": "function",
"scope": "static"
}
],
"namespace": "Pebble.timelineUnsubscribe"
},
{
"description": {
"type": "root",
"children": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "Obtain a list of topics that the user is currently subscribed to. The\n length of the list should be checked to determine whether the user is\n subscribed to at least one topic.",
"position": {
"start": {
"line": 1,
"column": 1,
"offset": 0
},
"end": {
"line": 3,
"column": 38,
"offset": 181
},
"indent": [
1,
1
]
}
}
],
"position": {
"start": {
"line": 1,
"column": 1,
"offset": 0
},
"end": {
"line": 3,
"column": 38,
"offset": 181
},
"indent": [
1,
1
]
}
}
],
"position": {
"start": {
"line": 1,
"column": 1,
"offset": 0
},
"end": {
"line": 3,
"column": 38,
"offset": 181
}
}
},
"tags": [
{
"title": "desc",
"description": "Obtain a list of topics that the user is currently subscribed to. The\n length of the list should be checked to determine whether the user is\n subscribed to at least one topic.",
"lineNumber": 1
},
{
"title": "param",
"description": "The developer-defined function to process the\n retuned list of topic strings.",
"lineNumber": 5,
"type": {
"type": "NameExpression",
"name": "TimelineTopicsCallback"
},
"name": "onSuccess"
},
{
"title": "param",
"description": "The developer-defined function to gracefully\n handle any errors in obtaining the user's subscriptions.",
"lineNumber": 7,
"type": {
"type": "NameExpression",
"name": "Function"
},
"name": "onFailure"
}
],
"loc": {
"start": {
"line": 122,
"column": 0
},
"end": {
"line": 131,
"column": 3
}
},
"context": {
"loc": {
"start": {
"line": 132,
"column": 0
},
"end": {
"line": 132,
"column": 65
}
},
"file": "/Users/orviwan/Pebble/developer.getpebble.com/js-docs/pkjs/Pebble.js",
"code": "/**\n * @namespace Pebble\n *\n * @desc The Pebble namespace is where all of the Pebble specific methods and\n * properties exist. This class contains methods belonging to PebbleKit JS and\n * allows bi-directional communication with a C watchapp, as well as managing\n * the user's timeline subscriptions and obtaining information about their\n * watch.\n */\nvar Pebble = new Object;\n\n\n/**\n * @desc Adds a listener for Pebble JS events, such as when an ``AppMessage`` is\n * received or the configuration view is opened or closed.\n *\n * #### `event` Options\n *\n * Possible values:\n *\n * * `ready` - The watchapp has been launched and the PebbleKit JS component\n * is now ready to receive events.\n * * `appmessage` - The watch sent an ``AppMessage`` to PebbleKit JS. The\n * AppMessage ``Dictionary`` is contained in the payload property (i.e:\n * event.payload). The payload consists of key-value pairs, where the keys\n * are strings containing integers (e.g: \"0\"), or aliases for keys defined\n * in package.json (e.g: \"KEY_EXAMPLE\"). Values should be integers, strings\n * or byte arrays (arrays of characters).\n * * `showConfiguration` - The user has requested the app's configuration\n * webview to be displayed. This can occur either upon the app's initial\n * install or when the user taps 'Settings' in the 'My Pebble' view withtin\n * the phone app.\n * * `webviewclosed` - The configuration webview was closed by the user. If\n * the webview had a response, it will be contained in the response property\n * (i.e: event.response). This response can be used to feed back user\n * preferences to the watchapp.\n *\n * @param {String} event - The type of the event, from the list described above.\n * @param {EventCallback} callback - The developer defined {@link #EventCallback EventCallback}\n * to receive any events of the type specified that occur.\n*/\nPebble.addEventListener = function(event, callback) { };\n\n/**\n * @desc Remove an existing event listener previously registered with\n * ``Pebble.addEventListener()``.\n *\n * @param {String} type - The type of the event listener to be removed. See\n * ``Pebble.addEventListener()`` for a list of available types.\n * @param {Function} callback - The existing developer-defined function that was\n * previously registered.\n */\nPebble.removeEventListener = function(type, callback) { };\n\n/**\n * @desc Show a simple modal notification on the connected watch.\n *\n * @param {String} title - The title of the notification\n * @param {String} body - The main content of the notification\n */\nPebble.showSimpleNotificationOnPebble = function(title, body) { };\n\n/**\n * @desc Send an AppMessage to the app running on the watch. Messages should be\n * in the form of JSON objects containing key-value pairs. See\n * Pebble.sendAppMessage() for valid key and value data types.\n * Pebble.sendAppMessage = function(data, onSuccess, onFailure) { };\n *\n * @returns {Number} The transaction id for this message\n *\n * @param {Object} data - A JSON object containing key-value pairs to send to\n * the watch. Values in arrays that are greater then 255 will be mod 255\n * before sending.\n * @param {AppMessageAckCallback} onSuccess - A developer-defined {@link #AppMessageAckCallback AppMessageAckCallback}\n * callback to run if the watch acknowledges (ACK) this message.\n * @param {AppMessageOnFailure} onSuccess - A developer-defined {@link #AppMessageNackCallback AppMessageNackCallback}\n * callback to run if the watch does not acknowledges (NACK) this message.\n */\nPebble.sendAppMessage = function(data, onSuccess, onFailure) { };\n\n\n/**\n * @desc Get the user's timeline token for this app. This is a string and is\n * unique per user per app. Note: In order for timeline tokens to be\n * available, the app must be submitted to the Pebble appstore, but does not\n * need to be public. Read more in the\n * {@link /guides/pebble-timeline/timeline-js/ timeline
},
"params": [
{
"name": "onSuccess",
"lineNumber": 5,
"description": {
"type": "root",
"children": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "The developer-defined function to process the\n retuned list of topic strings.",
"position": {
"start": {
"line": 1,
"column": 1,
"offset": 0
},
"end": {
"line": 2,
"column": 35,
"offset": 80
},
"indent": [
1
]
}
}
],
"position": {
"start": {
"line": 1,
"column": 1,
"offset": 0
},
"end": {
"line": 2,
"column": 35,
"offset": 80
},
"indent": [
1
]
}
}
],
"position": {
"start": {
"line": 1,
"column": 1,
"offset": 0
},
"end": {
"line": 2,
"column": 35,
"offset": 80
}
}
},
"type": {
"type": "NameExpression",
"name": "TimelineTopicsCallback"
}
},
{
"name": "onFailure",
"lineNumber": 7,
"description": {
"type": "root",
"children": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "The developer-defined function to gracefully\n handle any errors in obtaining the user's subscriptions.",
"position": {
"start": {
"line": 1,
"column": 1,
"offset": 0
},
"end": {
"line": 2,
"column": 61,
"offset": 105
},
"indent": [
1
]
}
}
],
"position": {
"start": {
"line": 1,
"column": 1,
"offset": 0
},
"end": {
"line": 2,
"column": 61,
"offset": 105
},
"indent": [
1
]
}
}
],
"position": {
"start": {
"line": 1,
"column": 1,
"offset": 0
},
"end": {
"line": 2,
"column": 61,
"offset": 105
}
}
},
"type": {
"type": "NameExpression",
"name": "Function"
}
}
],
"name": "timelineSubscription",
"kind": "function",
"memberof": "Pebble",
"scope": "static",
"members": {
"instance": [],
"static": []
},
"path": [
{
"name": "Pebble",
"kind": "namespace"
},
{
"name": "timelineSubscription",
"kind": "function",
"scope": "static"
}
],
"namespace": "Pebble.timelineSubscription"
},
{
"description": {
"type": "root",
"children": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "Obtain an object containing information on the currently connected\n Pebble smartwatch.",
"position": {
"start": {
"line": 1,
"column": 1,
"offset": 0
},
"end": {
"line": 2,
"column": 23,
"offset": 89
},
"indent": [
1
]
}
}
],
"position": {
"start": {
"line": 1,
"column": 1,
"offset": 0
},
"end": {
"line": 2,
"column": 23,
"offset": 89
},
"indent": [
1
]
}
},
{
"type": "code",
"lang": null,
"value": "**Note:** This function is only available when using the Pebble Time\nsmartphone app. Check out our guide on {@link /guides/communication/using-pebblekit-js Getting Watch Information}\nfor details on how to use this function.",
"position": {
"start": {
"line": 4,
"column": 1,
"offset": 91
},
"end": {
"line": 6,
"column": 45,
"offset": 326
},
"indent": [
1,
1
]
}
}
],
"position": {
"start": {
"line": 1,
"column": 1,
"offset": 0
},
"end": {
"line": 6,
"column": 45,
"offset": 326
}
}
},
"tags": [
{
"title": "desc",
"description": "Obtain an object containing information on the currently connected\n Pebble smartwatch.\n\n **Note:** This function is only available when using the Pebble Time\n smartphone app. Check out our guide on {@link /guides/communication/using-pebblekit-js Getting Watch Information}\n for details on how to use this function.",
"lineNumber": 1
},
{
"title": "returns",
"description": "A {@link #WatchInfo WatchInfo} object detailing the\n currently connected Pebble watch.",
"lineNumber": 8,
"type": {
"type": "NameExpression",
"name": "WatchInfo"
}
}
],
"loc": {
"start": {
"line": 135,
"column": 0
},
"end": {
"line": 145,
"column": 3
}
},
"context": {
"loc": {
"start": {
"line": 146,
"column": 0
},
"end": {
"line": 146,
"column": 43
}
},
"file": "/Users/orviwan/Pebble/developer.getpebble.com/js-docs/pkjs/Pebble.js",
"code": "/**\n * @namespace Pebble\n *\n * @desc The Pebble namespace is where all of the Pebble specific methods and\n * properties exist. This class contains methods belonging to PebbleKit JS and\n * allows bi-directional communication with a C watchapp, as well as managing\n * the user's timeline subscriptions and obtaining information about their\n * watch.\n */\nvar Pebble = new Object;\n\n\n/**\n * @desc Adds a listener for Pebble JS events, such as when an ``AppMessage`` is\n * received or the configuration view is opened or closed.\n *\n * #### `event` Options\n *\n * Possible values:\n *\n * * `ready` - The watchapp has been launched and the PebbleKit JS component\n * is now ready to receive events.\n * * `appmessage` - The watch sent an ``AppMessage`` to PebbleKit JS. The\n * AppMessage ``Dictionary`` is contained in the payload property (i.e:\n * event.payload). The payload consists of key-value pairs, where the keys\n * are strings containing integers (e.g: \"0\"), or aliases for keys defined\n * in package.json (e.g: \"KEY_EXAMPLE\"). Values should be integers, strings\n * or byte arrays (arrays of characters).\n * * `showConfiguration` - The user has requested the app's configuration\n * webview to be displayed. This can occur either upon the app's initial\n * install or when the user taps 'Settings' in the 'My Pebble' view withtin\n * the phone app.\n * * `webviewclosed` - The configuration webview was closed by the user. If\n * the webview had a response, it will be contained in the response property\n * (i.e: event.response). This response can be used to feed back user\n * preferences to the watchapp.\n *\n * @param {String} event - The type of the event, from the list described above.\n * @param {EventCallback} callback - The developer defined {@link #EventCallback EventCallback}\n * to receive any events of the type specified that occur.\n*/\nPebble.addEventListener = function(event, callback) { };\n\n/**\n * @desc Remove an existing event listener previously registered with\n * ``Pebble.addEventListener()``.\n *\n * @param {String} type - The type of the event listener to be removed. See\n * ``Pebble.addEventListener()`` for a list of available types.\n * @param {Function} callback - The existing developer-defined function that was\n * previously registered.\n */\nPebble.removeEventListener = function(type, callback) { };\n\n/**\n * @desc Show a simple modal notification on the connected watch.\n *\n * @param {String} title - The title of the notification\n * @param {String} body - The main content of the notification\n */\nPebble.showSimpleNotificationOnPebble = function(title, body) { };\n\n/**\n * @desc Send an AppMessage to the app running on the watch. Messages should be\n * in the form of JSON objects containing key-value pairs. See\n * Pebble.sendAppMessage() for valid key and value data types.\n * Pebble.sendAppMessage = function(data, onSuccess, onFailure) { };\n *\n * @returns {Number} The transaction id for this message\n *\n * @param {Object} data - A JSON object containing key-value pairs to send to\n * the watch. Values in arrays that are greater then 255 will be mod 255\n * before sending.\n * @param {AppMessageAckCallback} onSuccess - A developer-defined {@link #AppMessageAckCallback AppMessageAckCallback}\n * callback to run if the watch acknowledges (ACK) this message.\n * @param {AppMessageOnFailure} onSuccess - A developer-defined {@link #AppMessageNackCallback AppMessageNackCallback}\n * callback to run if the watch does not acknowledges (NACK) this message.\n */\nPebble.sendAppMessage = function(data, onSuccess, onFailure) { };\n\n\n/**\n * @desc Get the user's timeline token for this app. This is a string and is\n * unique per user per app. Note: In order for timeline tokens to be\n * available, the app must be submitted to the Pebble appstore, but does not\n * need to be public. Read more in the\n * {@link /guides/pebble-timeline/timeline-js/ timeline
},
"returns": [
{
"description": {
"type": "root",
"children": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "A ",
"position": {
"start": {
"line": 1,
"column": 1,
"offset": 0
},
"end": {
"line": 1,
"column": 3,
"offset": 2
},
"indent": []
}
},
{
"type": "link",
"url": "#WatchInfo",
"title": null,
"jsdoc": true,
"children": [
{
"type": "text",
"value": "WatchInfo"
}
],
"position": {
"start": {
"line": 1,
"column": 3,
"offset": 2
},
"end": {
"line": 1,
"column": 31,
"offset": 30
},
"indent": []
}
},
{
"type": "text",
"value": " object detailing the\n currently connected Pebble watch.",
"position": {
"start": {
"line": 1,
"column": 31,
"offset": 30
},
"end": {
"line": 2,
"column": 38,
"offset": 89
},
"indent": [
1
]
}
}
],
"position": {
"start": {
"line": 1,
"column": 1,
"offset": 0
},
"end": {
"line": 2,
"column": 38,
"offset": 89
},
"indent": [
1
]
}
}
],
"position": {
"start": {
"line": 1,
"column": 1,
"offset": 0
},
"end": {
"line": 2,
"column": 38,
"offset": 89
}
}
},
"type": {
"type": "NameExpression",
"name": "WatchInfo"
}
}
],
"name": "getActiveWatchInfo",
"kind": "function",
"memberof": "Pebble",
"scope": "static",
"members": {
"instance": [],
"static": []
},
"path": [
{
"name": "Pebble",
"kind": "namespace"
},
{
"name": "getActiveWatchInfo",
"kind": "function",
"scope": "static"
}
],
"namespace": "Pebble.getActiveWatchInfo"
},
{
"description": {
"type": "root",
"children": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "Returns a unique account token that is associated with the Pebble\n account of the current user.",
"position": {
"start": {
"line": 1,
"column": 1,
"offset": 0
},
"end": {
"line": 2,
"column": 33,
"offset": 98
},
"indent": [
1
]
}
}
],
"position": {
"start": {
"line": 1,
"column": 1,
"offset": 0
},
"end": {
"line": 2,
"column": 33,
"offset": 98
},
"indent": [
1
]
}
},
{
"type": "code",
"lang": null,
"value": "**Note:** The behavior of this changed slightly in SDK 3.0. Read the\n{@link /guides/migration/migration-guide-3/ Migration Guide} to learn the\ndetails and how to adapt older tokens.",
"position": {
"start": {
"line": 4,
"column": 1,
"offset": 100
},
"end": {
"line": 6,
"column": 43,
"offset": 293
},
"indent": [
1,
1
]
}
}
],
"position": {
"start": {
"line": 1,
"column": 1,
"offset": 0
},
"end": {
"line": 6,
"column": 43,
"offset": 293
}
}
},
"tags": [
{
"title": "desc",
"description": "Returns a unique account token that is associated with the Pebble\n account of the current user.\n\n **Note:** The behavior of this changed slightly in SDK 3.0. Read the\n {@link /guides/migration/migration-guide-3/ Migration Guide} to learn the\n details and how to adapt older tokens.",
"lineNumber": 1
},
{
"title": "returns",
"description": "A string that is guaranteed to be identical across devices\n if the user owns several Pebble or several mobile devices. From the\n developer's perspective, the account token of a user is identical across\n platforms and across all the developer's watchapps. If the user is not\n logged in, this function will return an empty string ('').",
"lineNumber": 8,
"type": {
"type": "NameExpression",
"name": "String"
}
}
],
"loc": {
"start": {
"line": 148,
"column": 0
},
"end": {
"line": 161,
"column": 3
}
},
"context": {
"loc": {
"start": {
"line": 163,
"column": 0
},
"end": {
"line": 163,
"column": 40
}
},
"file": "/Users/orviwan/Pebble/developer.getpebble.com/js-docs/pkjs/Pebble.js",
"code": "/**\n * @namespace Pebble\n *\n * @desc The Pebble namespace is where all of the Pebble specific methods and\n * properties exist. This class contains methods belonging to PebbleKit JS and\n * allows bi-directional communication with a C watchapp, as well as managing\n * the user's timeline subscriptions and obtaining information about their\n * watch.\n */\nvar Pebble = new Object;\n\n\n/**\n * @desc Adds a listener for Pebble JS events, such as when an ``AppMessage`` is\n * received or the configuration view is opened or closed.\n *\n * #### `event` Options\n *\n * Possible values:\n *\n * * `ready` - The watchapp has been launched and the PebbleKit JS component\n * is now ready to receive events.\n * * `appmessage` - The watch sent an ``AppMessage`` to PebbleKit JS. The\n * AppMessage ``Dictionary`` is contained in the payload property (i.e:\n * event.payload). The payload consists of key-value pairs, where the keys\n * are strings containing integers (e.g: \"0\"), or aliases for keys defined\n * in package.json (e.g: \"KEY_EXAMPLE\"). Values should be integers, strings\n * or byte arrays (arrays of characters).\n * * `showConfiguration` - The user has requested the app's configuration\n * webview to be displayed. This can occur either upon the app's initial\n * install or when the user taps 'Settings' in the 'My Pebble' view withtin\n * the phone app.\n * * `webviewclosed` - The configuration webview was closed by the user. If\n * the webview had a response, it will be contained in the response property\n * (i.e: event.response). This response can be used to feed back user\n * preferences to the watchapp.\n *\n * @param {String} event - The type of the event, from the list described above.\n * @param {EventCallback} callback - The developer defined {@link #EventCallback EventCallback}\n * to receive any events of the type specified that occur.\n*/\nPebble.addEventListener = function(event, callback) { };\n\n/**\n * @desc Remove an existing event listener previously registered with\n * ``Pebble.addEventListener()``.\n *\n * @param {String} type - The type of the event listener to be removed. See\n * ``Pebble.addEventListener()`` for a list of available types.\n * @param {Function} callback - The existing developer-defined function that was\n * previously registered.\n */\nPebble.removeEventListener = function(type, callback) { };\n\n/**\n * @desc Show a simple modal notification on the connected watch.\n *\n * @param {String} title - The title of the notification\n * @param {String} body - The main content of the notification\n */\nPebble.showSimpleNotificationOnPebble = function(title, body) { };\n\n/**\n * @desc Send an AppMessage to the app running on the watch. Messages should be\n * in the form of JSON objects containing key-value pairs. See\n * Pebble.sendAppMessage() for valid key and value data types.\n * Pebble.sendAppMessage = function(data, onSuccess, onFailure) { };\n *\n * @returns {Number} The transaction id for this message\n *\n * @param {Object} data - A JSON object containing key-value pairs to send to\n * the watch. Values in arrays that are greater then 255 will be mod 255\n * before sending.\n * @param {AppMessageAckCallback} onSuccess - A developer-defined {@link #AppMessageAckCallback AppMessageAckCallback}\n * callback to run if the watch acknowledges (ACK) this message.\n * @param {AppMessageOnFailure} onSuccess - A developer-defined {@link #AppMessageNackCallback AppMessageNackCallback}\n * callback to run if the watch does not acknowledges (NACK) this message.\n */\nPebble.sendAppMessage = function(data, onSuccess, onFailure) { };\n\n\n/**\n * @desc Get the user's timeline token for this app. This is a string and is\n * unique per user per app. Note: In order for timeline tokens to be\n * available, the app must be submitted to the Pebble appstore, but does not\n * need to be public. Read more in the\n * {@link /guides/pebble-timeline/timeline-js/ timeline
},
"returns": [
{
"description": {
"type": "root",
"children": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "A string that is guaranteed to be identical across devices\n if the user owns several Pebble or several mobile devices. From the\n developer's perspective, the account token of a user is identical across\n platforms and across all the developer's watchapps. If the user is not\n logged in, this function will return an empty string ('').",
"position": {
"start": {
"line": 1,
"column": 1,
"offset": 0
},
"end": {
"line": 5,
"column": 63,
"offset": 345
},
"indent": [
1,
1,
1,
1
]
}
}
],
"position": {
"start": {
"line": 1,
"column": 1,
"offset": 0
},
"end": {
"line": 5,
"column": 63,
"offset": 345
},
"indent": [
1,
1,
1,
1
]
}
}
],
"position": {
"start": {
"line": 1,
"column": 1,
"offset": 0
},
"end": {
"line": 5,
"column": 63,
"offset": 345
}
}
},
"type": {
"type": "NameExpression",
"name": "String"
}
}
],
"name": "getAccountToken",
"kind": "function",
"memberof": "Pebble",
"scope": "static",
"members": {
"instance": [],
"static": []
},
"path": [
{
"name": "Pebble",
"kind": "namespace"
},
{
"name": "getAccountToken",
"kind": "function",
"scope": "static"
}
],
"namespace": "Pebble.getAccountToken"
},
{
"description": {
"type": "root",
"children": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "Returns a a unique token that can be used to identify a Pebble device.",
"position": {
"start": {
"line": 1,
"column": 1,
"offset": 0
},
"end": {
"line": 1,
"column": 71,
"offset": 70
},
"indent": []
}
}
],
"position": {
"start": {
"line": 1,
"column": 1,
"offset": 0
},
"end": {
"line": 1,
"column": 71,
"offset": 70
},
"indent": []
}
}
],
"position": {
"start": {
"line": 1,
"column": 1,
"offset": 0
},
"end": {
"line": 1,
"column": 71,
"offset": 70
}
}
},
"tags": [
{
"title": "desc",
"description": "Returns a a unique token that can be used to identify a Pebble device.",
"lineNumber": 1
},
{
"title": "returns",
"description": "A string that is is guaranteed to be identical for each\n Pebble device for the same app across different mobile devices. The token\n is unique to your app and cannot be used to track Pebble devices across\n applications.",
"lineNumber": 3,
"type": {
"type": "NameExpression",
"name": "String"
}
}
],
"loc": {
"start": {
"line": 165,
"column": 0
},
"end": {
"line": 172,
"column": 3
}
},
"context": {
"loc": {
"start": {
"line": 173,
"column": 0
},
"end": {
"line": 173,
"column": 38
}
},
"file": "/Users/orviwan/Pebble/developer.getpebble.com/js-docs/pkjs/Pebble.js",
"code": "/**\n * @namespace Pebble\n *\n * @desc The Pebble namespace is where all of the Pebble specific methods and\n * properties exist. This class contains methods belonging to PebbleKit JS and\n * allows bi-directional communication with a C watchapp, as well as managing\n * the user's timeline subscriptions and obtaining information about their\n * watch.\n */\nvar Pebble = new Object;\n\n\n/**\n * @desc Adds a listener for Pebble JS events, such as when an ``AppMessage`` is\n * received or the configuration view is opened or closed.\n *\n * #### `event` Options\n *\n * Possible values:\n *\n * * `ready` - The watchapp has been launched and the PebbleKit JS component\n * is now ready to receive events.\n * * `appmessage` - The watch sent an ``AppMessage`` to PebbleKit JS. The\n * AppMessage ``Dictionary`` is contained in the payload property (i.e:\n * event.payload). The payload consists of key-value pairs, where the keys\n * are strings containing integers (e.g: \"0\"), or aliases for keys defined\n * in package.json (e.g: \"KEY_EXAMPLE\"). Values should be integers, strings\n * or byte arrays (arrays of characters).\n * * `showConfiguration` - The user has requested the app's configuration\n * webview to be displayed. This can occur either upon the app's initial\n * install or when the user taps 'Settings' in the 'My Pebble' view withtin\n * the phone app.\n * * `webviewclosed` - The configuration webview was closed by the user. If\n * the webview had a response, it will be contained in the response property\n * (i.e: event.response). This response can be used to feed back user\n * preferences to the watchapp.\n *\n * @param {String} event - The type of the event, from the list described above.\n * @param {EventCallback} callback - The developer defined {@link #EventCallback EventCallback}\n * to receive any events of the type specified that occur.\n*/\nPebble.addEventListener = function(event, callback) { };\n\n/**\n * @desc Remove an existing event listener previously registered with\n * ``Pebble.addEventListener()``.\n *\n * @param {String} type - The type of the event listener to be removed. See\n * ``Pebble.addEventListener()`` for a list of available types.\n * @param {Function} callback - The existing developer-defined function that was\n * previously registered.\n */\nPebble.removeEventListener = function(type, callback) { };\n\n/**\n * @desc Show a simple modal notification on the connected watch.\n *\n * @param {String} title - The title of the notification\n * @param {String} body - The main content of the notification\n */\nPebble.showSimpleNotificationOnPebble = function(title, body) { };\n\n/**\n * @desc Send an AppMessage to the app running on the watch. Messages should be\n * in the form of JSON objects containing key-value pairs. See\n * Pebble.sendAppMessage() for valid key and value data types.\n * Pebble.sendAppMessage = function(data, onSuccess, onFailure) { };\n *\n * @returns {Number} The transaction id for this message\n *\n * @param {Object} data - A JSON object containing key-value pairs to send to\n * the watch. Values in arrays that are greater then 255 will be mod 255\n * before sending.\n * @param {AppMessageAckCallback} onSuccess - A developer-defined {@link #AppMessageAckCallback AppMessageAckCallback}\n * callback to run if the watch acknowledges (ACK) this message.\n * @param {AppMessageOnFailure} onSuccess - A developer-defined {@link #AppMessageNackCallback AppMessageNackCallback}\n * callback to run if the watch does not acknowledges (NACK) this message.\n */\nPebble.sendAppMessage = function(data, onSuccess, onFailure) { };\n\n\n/**\n * @desc Get the user's timeline token for this app. This is a string and is\n * unique per user per app. Note: In order for timeline tokens to be\n * available, the app must be submitted to the Pebble appstore, but does not\n * need to be public. Read more in the\n * {@link /guides/pebble-timeline/timeline-js/ timeline
},
"returns": [
{
"description": {
"type": "root",
"children": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "A string that is is guaranteed to be identical for each\n Pebble device for the same app across different mobile devices. The token\n is unique to your app and cannot be used to track Pebble devices across\n applications.",
"position": {
"start": {
"line": 1,
"column": 1,
"offset": 0
},
"end": {
"line": 4,
"column": 18,
"offset": 227
},
"indent": [
1,
1,
1
]
}
}
],
"position": {
"start": {
"line": 1,
"column": 1,
"offset": 0
},
"end": {
"line": 4,
"column": 18,
"offset": 227
},
"indent": [
1,
1,
1
]
}
}
],
"position": {
"start": {
"line": 1,
"column": 1,
"offset": 0
},
"end": {
"line": 4,
"column": 18,
"offset": 227
}
}
},
"type": {
"type": "NameExpression",
"name": "String"
}
}
],
"name": "getWatchToken",
"kind": "function",
"memberof": "Pebble",
"scope": "static",
"members": {
"instance": [],
"static": []
},
"path": [
{
"name": "Pebble",
"kind": "namespace"
},
{
"name": "getWatchToken",
"kind": "function",
"scope": "static"
}
],
"namespace": "Pebble.getWatchToken"
},
{
"description": {
"type": "root",
"children": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "Triggers a reload of the app glance which first clears any existing \n slices and then adds the provided slices.",
"position": {
"start": {
"line": 1,
"column": 1,
"offset": 0
},
"end": {
"line": 2,
"column": 43,
"offset": 111
},
"indent": [
1
]
}
}
],
"position": {
"start": {
"line": 1,
"column": 1,
"offset": 0
},
"end": {
"line": 2,
"column": 43,
"offset": 111
},
"indent": [
1
]
}
}
],
"position": {
"start": {
"line": 1,
"column": 1,
"offset": 0
},
"end": {
"line": 2,
"column": 43,
"offset": 111
}
}
},
"tags": [
{
"title": "desc",
"description": "Triggers a reload of the app glance which first clears any existing \n slices and then adds the provided slices.",
"lineNumber": 1
},
{
"title": "param",
"description": "{@link #AppGlanceSlice AppGlanceSlice} \n JSON objects to add to the app glance.",
"lineNumber": 4,
"type": {
"type": "NameExpression",
"name": "AppGlanceSlice"
},
"name": "appGlanceSlices"
},
{
"title": "param",
"description": "The developer-defined \n callback which is called if the reload operation succeeds.",
"lineNumber": 6,
"type": {
"type": "NameExpression",
"name": "AppGlanceReloadSuccessCallback"
},
"name": "onSuccess"
},
{
"title": "param",
"description": "The developer-defined \n callback which is called if the reload operation fails.",
"lineNumber": 8,
"type": {
"type": "NameExpression",
"name": "AppGlanceReloadFailureCallback"
},
"name": "onFailure"
}
],
"loc": {
"start": {
"line": 176,
"column": 0
},
"end": {
"line": 186,
"column": 3
}
},
"context": {
"loc": {
"start": {
"line": 187,
"column": 0
},
"end": {
"line": 187,
"column": 77
}
},
"file": "/Users/orviwan/Pebble/developer.getpebble.com/js-docs/pkjs/Pebble.js",
"code": "/**\n * @namespace Pebble\n *\n * @desc The Pebble namespace is where all of the Pebble specific methods and\n * properties exist. This class contains methods belonging to PebbleKit JS and\n * allows bi-directional communication with a C watchapp, as well as managing\n * the user's timeline subscriptions and obtaining information about their\n * watch.\n */\nvar Pebble = new Object;\n\n\n/**\n * @desc Adds a listener for Pebble JS events, such as when an ``AppMessage`` is\n * received or the configuration view is opened or closed.\n *\n * #### `event` Options\n *\n * Possible values:\n *\n * * `ready` - The watchapp has been launched and the PebbleKit JS component\n * is now ready to receive events.\n * * `appmessage` - The watch sent an ``AppMessage`` to PebbleKit JS. The\n * AppMessage ``Dictionary`` is contained in the payload property (i.e:\n * event.payload). The payload consists of key-value pairs, where the keys\n * are strings containing integers (e.g: \"0\"), or aliases for keys defined\n * in package.json (e.g: \"KEY_EXAMPLE\"). Values should be integers, strings\n * or byte arrays (arrays of characters).\n * * `showConfiguration` - The user has requested the app's configuration\n * webview to be displayed. This can occur either upon the app's initial\n * install or when the user taps 'Settings' in the 'My Pebble' view withtin\n * the phone app.\n * * `webviewclosed` - The configuration webview was closed by the user. If\n * the webview had a response, it will be contained in the response property\n * (i.e: event.response). This response can be used to feed back user\n * preferences to the watchapp.\n *\n * @param {String} event - The type of the event, from the list described above.\n * @param {EventCallback} callback - The developer defined {@link #EventCallback EventCallback}\n * to receive any events of the type specified that occur.\n*/\nPebble.addEventListener = function(event, callback) { };\n\n/**\n * @desc Remove an existing event listener previously registered with\n * ``Pebble.addEventListener()``.\n *\n * @param {String} type - The type of the event listener to be removed. See\n * ``Pebble.addEventListener()`` for a list of available types.\n * @param {Function} callback - The existing developer-defined function that was\n * previously registered.\n */\nPebble.removeEventListener = function(type, callback) { };\n\n/**\n * @desc Show a simple modal notification on the connected watch.\n *\n * @param {String} title - The title of the notification\n * @param {String} body - The main content of the notification\n */\nPebble.showSimpleNotificationOnPebble = function(title, body) { };\n\n/**\n * @desc Send an AppMessage to the app running on the watch. Messages should be\n * in the form of JSON objects containing key-value pairs. See\n * Pebble.sendAppMessage() for valid key and value data types.\n * Pebble.sendAppMessage = function(data, onSuccess, onFailure) { };\n *\n * @returns {Number} The transaction id for this message\n *\n * @param {Object} data - A JSON object containing key-value pairs to send to\n * the watch. Values in arrays that are greater then 255 will be mod 255\n * before sending.\n * @param {AppMessageAckCallback} onSuccess - A developer-defined {@link #AppMessageAckCallback AppMessageAckCallback}\n * callback to run if the watch acknowledges (ACK) this message.\n * @param {AppMessageOnFailure} onSuccess - A developer-defined {@link #AppMessageNackCallback AppMessageNackCallback}\n * callback to run if the watch does not acknowledges (NACK) this message.\n */\nPebble.sendAppMessage = function(data, onSuccess, onFailure) { };\n\n\n/**\n * @desc Get the user's timeline token for this app. This is a string and is\n * unique per user per app. Note: In order for timeline tokens to be\n * available, the app must be submitted to the Pebble appstore, but does not\n * need to be public. Read more in the\n * {@link /guides/pebble-timeline/timeline-js/ timeline
},
"params": [
{
"name": "appGlanceSlices",
"lineNumber": 4,
"description": {
"type": "root",
"children": [
{
"type": "paragraph",
"children": [
{
"type": "link",
"url": "#AppGlanceSlice",
"title": null,
"jsdoc": true,
"children": [
{
"type": "text",
"value": "AppGlanceSlice"
}
],
"position": {
"start": {
"line": 1,
"column": 1,
"offset": 0
},
"end": {
"line": 1,
"column": 39,
"offset": 38
},
"indent": []
}
},
{
"type": "text",
"value": " \n JSON objects to add to the app glance.",
"position": {
"start": {
"line": 1,
"column": 39,
"offset": 38
},
"end": {
"line": 2,
"column": 43,
"offset": 82
},
"indent": [
1
]
}
}
],
"position": {
"start": {
"line": 1,
"column": 1,
"offset": 0
},
"end": {
"line": 2,
"column": 43,
"offset": 82
},
"indent": [
1
]
}
}
],
"position": {
"start": {
"line": 1,
"column": 1,
"offset": 0
},
"end": {
"line": 2,
"column": 43,
"offset": 82
}
}
},
"type": {
"type": "NameExpression",
"name": "AppGlanceSlice"
}
},
{
"name": "onSuccess",
"lineNumber": 6,
"description": {
"type": "root",
"children": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "The developer-defined \n callback which is called if the reload operation succeeds.",
"position": {
"start": {
"line": 1,
"column": 1,
"offset": 0
},
"end": {
"line": 2,
"column": 63,
"offset": 85
},
"indent": [
1
]
}
}
],
"position": {
"start": {
"line": 1,
"column": 1,
"offset": 0
},
"end": {
"line": 2,
"column": 63,
"offset": 85
},
"indent": [
1
]
}
}
],
"position": {
"start": {
"line": 1,
"column": 1,
"offset": 0
},
"end": {
"line": 2,
"column": 63,
"offset": 85
}
}
},
"type": {
"type": "NameExpression",
"name": "AppGlanceReloadSuccessCallback"
}
},
{
"name": "onFailure",
"lineNumber": 8,
"description": {
"type": "root",
"children": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "The developer-defined \n callback which is called if the reload operation fails.",
"position": {
"start": {
"line": 1,
"column": 1,
"offset": 0
},
"end": {
"line": 2,
"column": 60,
"offset": 82
},
"indent": [
1
]
}
}
],
"position": {
"start": {
"line": 1,
"column": 1,
"offset": 0
},
"end": {
"line": 2,
"column": 60,
"offset": 82
},
"indent": [
1
]
}
}
],
"position": {
"start": {
"line": 1,
"column": 1,
"offset": 0
},
"end": {
"line": 2,
"column": 60,
"offset": 82
}
}
},
"type": {
"type": "NameExpression",
"name": "AppGlanceReloadFailureCallback"
}
}
],
"name": "appGlanceReload",
"kind": "function",
"memberof": "Pebble",
"scope": "static",
"members": {
"instance": [],
"static": []
},
"path": [
{
"name": "Pebble",
"kind": "namespace"
},
{
"name": "appGlanceReload",
"kind": "function",
"scope": "static"
}
],
"namespace": "Pebble.appGlanceReload"
},
{
"description": {
"type": "root",
"children": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "Called when AppGlanceReload is successful.",
"position": {
"start": {
"line": 1,
"column": 1,
"offset": 0
},
"end": {
"line": 1,
"column": 43,
"offset": 42
},
"indent": []
}
}
],
"position": {
"start": {
"line": 1,
"column": 1,
"offset": 0
},
"end": {
"line": 1,
"column": 43,
"offset": 42
},
"indent": []
}
}
],
"position": {
"start": {
"line": 1,
"column": 1,
"offset": 0
},
"end": {
"line": 1,
"column": 43,
"offset": 42
}
}
},
"tags": [
{
"title": "typedef",
"description": null,
"lineNumber": 1,
"type": {
"type": "NameExpression",
"name": "Function"
},
"name": "AppGlanceReloadSuccessCallback"
},
{
"title": "memberof",
"description": "Pebble",
"lineNumber": 2
},
{
"title": "desc",
"description": "Called when AppGlanceReload is successful.",
"lineNumber": 4
},
{
"title": "param",
"description": "An {@link #AppGlanceSlice AppGlanceSlice} object \n containing the app glance slices.",
"lineNumber": 5,
"type": {
"type": "NameExpression",
"name": "AppGlanceSlice"
},
"name": "AppGlanceSlices"
}
],
"loc": {
"start": {
"line": 189,
"column": 0
},
"end": {
"line": 196,
"column": 3
}
},
"context": {
"loc": {
"start": {
"line": 187,
"column": 0
},
"end": {
"line": 187,
"column": 77
}
},
"file": "/Users/orviwan/Pebble/developer.getpebble.com/js-docs/pkjs/Pebble.js"
},
"kind": "typedef",
"name": "AppGlanceReloadSuccessCallback",
"type": {
"type": "NameExpression",
"name": "Function"
},
"memberof": "Pebble",
"params": [
{
"name": "AppGlanceSlices",
"lineNumber": 5,
"description": {
"type": "root",
"children": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "An ",
"position": {
"start": {
"line": 1,
"column": 1,
"offset": 0
},
"end": {
"line": 1,
"column": 4,
"offset": 3
},
"indent": []
}
},
{
"type": "link",
"url": "#AppGlanceSlice",
"title": null,
"jsdoc": true,
"children": [
{
"type": "text",
"value": "AppGlanceSlice"
}
],
"position": {
"start": {
"line": 1,
"column": 4,
"offset": 3
},
"end": {
"line": 1,
"column": 42,
"offset": 41
},
"indent": []
}
},
{
"type": "text",
"value": " object \n containing the app glance slices.",
"position": {
"start": {
"line": 1,
"column": 42,
"offset": 41
},
"end": {
"line": 2,
"column": 38,
"offset": 87
},
"indent": [
1
]
}
}
],
"position": {
"start": {
"line": 1,
"column": 1,
"offset": 0
},
"end": {
"line": 2,
"column": 38,
"offset": 87
},
"indent": [
1
]
}
}
],
"position": {
"start": {
"line": 1,
"column": 1,
"offset": 0
},
"end": {
"line": 2,
"column": 38,
"offset": 87
}
}
},
"type": {
"type": "NameExpression",
"name": "AppGlanceSlice"
}
}
],
"members": {
"instance": [],
"static": []
},
"path": [
{
"name": "Pebble",
"kind": "namespace"
},
{
"name": "AppGlanceReloadSuccessCallback",
"kind": "typedef"
}
],
"namespace": "PebbleAppGlanceReloadSuccessCallback"
},
{
"description": {
"type": "root",
"children": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "Called when AppGlanceReload has failed.",
"position": {
"start": {
"line": 1,
"column": 1,
"offset": 0
},
"end": {
"line": 1,
"column": 40,
"offset": 39
},
"indent": []
}
}
],
"position": {
"start": {
"line": 1,
"column": 1,
"offset": 0
},
"end": {
"line": 1,
"column": 40,
"offset": 39
},
"indent": []
}
}
],
"position": {
"start": {
"line": 1,
"column": 1,
"offset": 0
},
"end": {
"line": 1,
"column": 40,
"offset": 39
}
}
},
"tags": [
{
"title": "typedef",
"description": null,
"lineNumber": 1,
"type": {
"type": "NameExpression",
"name": "Function"
},
"name": "AppGlanceReloadFailureCallback"
},
{
"title": "memberof",
"description": "Pebble",
"lineNumber": 2
},
{
"title": "desc",
"description": "Called when AppGlanceReload has failed.",
"lineNumber": 4
},
{
"title": "param",
"description": "An {@link #AppGlanceSlice AppGlanceSlice} object \n containing the app glance slices.",
"lineNumber": 5,
"type": {
"type": "NameExpression",
"name": "AppGlanceSlice"
},
"name": "AppGlanceSlices"
}
],
"loc": {
"start": {
"line": 198,
"column": 1
},
"end": {
"line": 205,
"column": 3
}
},
"context": {
"loc": {
"start": {
"line": 187,
"column": 0
},
"end": {
"line": 187,
"column": 77
}
},
"file": "/Users/orviwan/Pebble/developer.getpebble.com/js-docs/pkjs/Pebble.js"
},
"kind": "typedef",
"name": "AppGlanceReloadFailureCallback",
"type": {
"type": "NameExpression",
"name": "Function"
},
"memberof": "Pebble",
"params": [
{
"name": "AppGlanceSlices",
"lineNumber": 5,
"description": {
"type": "root",
"children": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "An ",
"position": {
"start": {
"line": 1,
"column": 1,
"offset": 0
},
"end": {
"line": 1,
"column": 4,
"offset": 3
},
"indent": []
}
},
{
"type": "link",
"url": "#AppGlanceSlice",
"title": null,
"jsdoc": true,
"children": [
{
"type": "text",
"value": "AppGlanceSlice"
}
],
"position": {
"start": {
"line": 1,
"column": 4,
"offset": 3
},
"end": {
"line": 1,
"column": 42,
"offset": 41
},
"indent": []
}
},
{
"type": "text",
"value": " object \n containing the app glance slices.",
"position": {
"start": {
"line": 1,
"column": 42,
"offset": 41
},
"end": {
"line": 2,
"column": 38,
"offset": 87
},
"indent": [
1
]
}
}
],
"position": {
"start": {
"line": 1,
"column": 1,
"offset": 0
},
"end": {
"line": 2,
"column": 38,
"offset": 87
},
"indent": [
1
]
}
}
],
"position": {
"start": {
"line": 1,
"column": 1,
"offset": 0
},
"end": {
"line": 2,
"column": 38,
"offset": 87
}
}
},
"type": {
"type": "NameExpression",
"name": "AppGlanceSlice"
}
}
],
"members": {
"instance": [],
"static": []
},
"path": [
{
"name": "Pebble",
"kind": "namespace"
},
{
"name": "AppGlanceReloadFailureCallback",
"kind": "typedef"
}
],
"namespace": "PebbleAppGlanceReloadFailureCallback"
},
{
"description": {
"type": "root",
"children": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "Called when an AppMessage is acknowledged by the watch.",
"position": {
"start": {
"line": 1,
"column": 1,
"offset": 0
},
"end": {
"line": 1,
"column": 56,
"offset": 55
},
"indent": []
}
}
],
"position": {
"start": {
"line": 1,
"column": 1,
"offset": 0
},
"end": {
"line": 1,
"column": 56,
"offset": 55
},
"indent": []
}
}
],
"position": {
"start": {
"line": 1,
"column": 1,
"offset": 0
},
"end": {
"line": 1,
"column": 56,
"offset": 55
}
}
},
"tags": [
{
"title": "typedef",
"description": null,
"lineNumber": 1,
"type": {
"type": "NameExpression",
"name": "Function"
},
"name": "AppMessageAckCallback"
},
{
"title": "memberof",
"description": "Pebble",
"lineNumber": 2
},
{
"title": "desc",
"description": "Called when an AppMessage is acknowledged by the watch.",
"lineNumber": 4
},
{
"title": "param",
"description": "An object containing the callback data. This contains\n the `transactionId` which is the transaction ID of the message.",
"lineNumber": 5,
"type": {
"type": "NameExpression",
"name": "Object"
},
"name": "data"
}
],
"loc": {
"start": {
"line": 207,
"column": 0
},
"end": {
"line": 214,
"column": 3
}
},
"context": {
"loc": {
"start": {
"line": 187,
"column": 0
},
"end": {
"line": 187,
"column": 77
}
},
"file": "/Users/orviwan/Pebble/developer.getpebble.com/js-docs/pkjs/Pebble.js"
},
"kind": "typedef",
"name": "AppMessageAckCallback",
"type": {
"type": "NameExpression",
"name": "Function"
},
"memberof": "Pebble",
"params": [
{
"name": "data",
"lineNumber": 5,
"description": {
"type": "root",
"children": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "An object containing the callback data. This contains\n the ",
"position": {
"start": {
"line": 1,
"column": 1,
"offset": 0
},
"end": {
"line": 2,
"column": 7,
"offset": 60
},
"indent": [
1
]
}
},
{
"type": "inlineCode",
"value": "transactionId",
"position": {
"start": {
"line": 2,
"column": 7,
"offset": 60
},
"end": {
"line": 2,
"column": 22,
"offset": 75
},
"indent": []
}
},
{
"type": "text",
"value": " which is the transaction ID of the message.",
"position": {
"start": {
"line": 2,
"column": 22,
"offset": 75
},
"end": {
"line": 2,
"column": 66,
"offset": 119
},
"indent": []
}
}
],
"position": {
"start": {
"line": 1,
"column": 1,
"offset": 0
},
"end": {
"line": 2,
"column": 66,
"offset": 119
},
"indent": [
1
]
}
}
],
"position": {
"start": {
"line": 1,
"column": 1,
"offset": 0
},
"end": {
"line": 2,
"column": 66,
"offset": 119
}
}
},
"type": {
"type": "NameExpression",
"name": "Object"
}
}
],
"members": {
"instance": [],
"static": []
},
"path": [
{
"name": "Pebble",
"kind": "namespace"
},
{
"name": "AppMessageAckCallback",
"kind": "typedef"
}
],
"namespace": "PebbleAppMessageAckCallback"
},
{
"description": {
"type": "root",
"children": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "Called when an AppMessage is not acknowledged by the watch.",
"position": {
"start": {
"line": 1,
"column": 1,
"offset": 0
},
"end": {
"line": 1,
"column": 60,
"offset": 59
},
"indent": []
}
}
],
"position": {
"start": {
"line": 1,
"column": 1,
"offset": 0
},
"end": {
"line": 1,
"column": 60,
"offset": 59
},
"indent": []
}
}
],
"position": {
"start": {
"line": 1,
"column": 1,
"offset": 0
},
"end": {
"line": 1,
"column": 60,
"offset": 59
}
}
},
"tags": [
{
"title": "typedef",
"description": null,
"lineNumber": 1,
"type": {
"type": "NameExpression",
"name": "Function"
},
"name": "AppMessageNackCallback"
},
{
"title": "memberof",
"description": "Pebble",
"lineNumber": 2
},
{
"title": "desc",
"description": "Called when an AppMessage is not acknowledged by the watch.",
"lineNumber": 4
},
{
"title": "param",
"description": "An object containing the callback data. This contains\n the `transactionId` which is the transaction ID of the message",
"lineNumber": 5,
"type": {
"type": "NameExpression",
"name": "Object"
},
"name": "data"
},
{
"title": "param",
"description": "The error message",
"lineNumber": 7,
"type": {
"type": "NameExpression",
"name": "String"
},
"name": "error"
}
],
"loc": {
"start": {
"line": 216,
"column": 0
},
"end": {
"line": 224,
"column": 3
}
},
"context": {
"loc": {
"start": {
"line": 187,
"column": 0
},
"end": {
"line": 187,
"column": 77
}
},
"file": "/Users/orviwan/Pebble/developer.getpebble.com/js-docs/pkjs/Pebble.js"
},
"kind": "typedef",
"name": "AppMessageNackCallback",
"type": {
"type": "NameExpression",
"name": "Function"
},
"memberof": "Pebble",
"params": [
{
"name": "data",
"lineNumber": 5,
"description": {
"type": "root",
"children": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "An object containing the callback data. This contains\n the ",
"position": {
"start": {
"line": 1,
"column": 1,
"offset": 0
},
"end": {
"line": 2,
"column": 7,
"offset": 60
},
"indent": [
1
]
}
},
{
"type": "inlineCode",
"value": "transactionId",
"position": {
"start": {
"line": 2,
"column": 7,
"offset": 60
},
"end": {
"line": 2,
"column": 22,
"offset": 75
},
"indent": []
}
},
{
"type": "text",
"value": " which is the transaction ID of the message",
"position": {
"start": {
"line": 2,
"column": 22,
"offset": 75
},
"end": {
"line": 2,
"column": 65,
"offset": 118
},
"indent": []
}
}
],
"position": {
"start": {
"line": 1,
"column": 1,
"offset": 0
},
"end": {
"line": 2,
"column": 65,
"offset": 118
},
"indent": [
1
]
}
}
],
"position": {
"start": {
"line": 1,
"column": 1,
"offset": 0
},
"end": {
"line": 2,
"column": 65,
"offset": 118
}
}
},
"type": {
"type": "NameExpression",
"name": "Object"
}
},
{
"name": "error",
"lineNumber": 7,
"description": {
"type": "root",
"children": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "The error message",
"position": {
"start": {
"line": 1,
"column": 1,
"offset": 0
},
"end": {
"line": 1,
"column": 18,
"offset": 17
},
"indent": []
}
}
],
"position": {
"start": {
"line": 1,
"column": 1,
"offset": 0
},
"end": {
"line": 1,
"column": 18,
"offset": 17
},
"indent": []
}
}
],
"position": {
"start": {
"line": 1,
"column": 1,
"offset": 0
},
"end": {
"line": 1,
"column": 18,
"offset": 17
}
}
},
"type": {
"type": "NameExpression",
"name": "String"
}
}
],
"members": {
"instance": [],
"static": []
},
"path": [
{
"name": "Pebble",
"kind": "namespace"
},
{
"name": "AppMessageNackCallback",
"kind": "typedef"
}
],
"namespace": "PebbleAppMessageNackCallback"
},
{
"description": {
"type": "root",
"children": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "Called when an event of any type previously registered occurs. The\n parameters are different depending on the type of event, shown in\n brackets for each parameter listed here.",
"position": {
"start": {
"line": 1,
"column": 1,
"offset": 0
},
"end": {
"line": 3,
"column": 45,
"offset": 181
},
"indent": [
1,
1
]
}
}
],
"position": {
"start": {
"line": 1,
"column": 1,
"offset": 0
},
"end": {
"line": 3,
"column": 45,
"offset": 181
},
"indent": [
1,
1
]
}
}
],
"position": {
"start": {
"line": 1,
"column": 1,
"offset": 0
},
"end": {
"line": 3,
"column": 45,
"offset": 181
}
}
},
"tags": [
{
"title": "typedef",
"description": null,
"lineNumber": 1,
"type": {
"type": "NameExpression",
"name": "Function"
},
"name": "EventCallback"
},
{
"title": "memberof",
"description": "Pebble",
"lineNumber": 2
},
{
"title": "desc",
"description": "Called when an event of any type previously registered occurs. The\n parameters are different depending on the type of event, shown in\n brackets for each parameter listed here.",
"lineNumber": 4
},
{
"title": "param",
"description": "An object containing the event information, including:\n * `type` - The type of event fired, from the list in the description of ``Pebble.addEventListener()``.\n * `payload` - The dictionary sent over ``AppMessage`` consisting of\n key-value pairs. *This field only exists for `appmessage` events.*\n * `response` - The contents of the URL navigated to when the\n configuration page was closed, after the anchor. This may be encoded,\n which will require use of decodeURIComponent() before reading as an\n object. *This field only exists for for `webviewclosed` events.*",
"lineNumber": 7,
"type": {
"type": "NameExpression",
"name": "Object"
},
"name": "event"
}
],
"loc": {
"start": {
"line": 226,
"column": 0
},
"end": {
"line": 241,
"column": 3
}
},
"context": {
"loc": {
"start": {
"line": 187,
"column": 0
},
"end": {
"line": 187,
"column": 77
}
},
"file": "/Users/orviwan/Pebble/developer.getpebble.com/js-docs/pkjs/Pebble.js"
},
"kind": "typedef",
"name": "EventCallback",
"type": {
"type": "NameExpression",
"name": "Function"
},
"memberof": "Pebble",
"params": [
{
"name": "event",
"lineNumber": 7,
"description": {
"type": "root",
"children": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "An object containing the event information, including:",
"position": {
"start": {
"line": 1,
"column": 1,
"offset": 0
},
"end": {
"line": 1,
"column": 55,
"offset": 54
},
"indent": []
}
}
],
"position": {
"start": {
"line": 1,
"column": 1,
"offset": 0
},
"end": {
"line": 1,
"column": 55,
"offset": 54
},
"indent": []
}
},
{
"type": "list",
"ordered": false,
"start": null,
"loose": false,
"children": [
{
"type": "listItem",
"loose": false,
"checked": null,
"children": [
{
"type": "paragraph",
"children": [
{
"type": "inlineCode",
"value": "type",
"position": {
"start": {
"line": 2,
"column": 6,
"offset": 60
},
"end": {
"line": 2,
"column": 12,
"offset": 66
},
"indent": []
}
},
{
"type": "text",
"value": " - The type of event fired, from the list in the description of ",
"position": {
"start": {
"line": 2,
"column": 12,
"offset": 66
},
"end": {
"line": 2,
"column": 76,
"offset": 130
},
"indent": []
}
},
{
"type": "inlineCode",
"value": "Pebble.addEventListener()",
"position": {
"start": {
"line": 2,
"column": 76,
"offset": 130
},
"end": {
"line": 2,
"column": 105,
"offset": 159
},
"indent": []
}
},
{
"type": "text",
"value": ".",
"position": {
"start": {
"line": 2,
"column": 105,
"offset": 159
},
"end": {
"line": 2,
"column": 106,
"offset": 160
},
"indent": []
}
}
],
"position": {
"start": {
"line": 2,
"column": 6,
"offset": 60
},
"end": {
"line": 2,
"column": 106,
"offset": 160
},
"indent": []
}
}
],
"position": {
"start": {
"line": 2,
"column": 1,
"offset": 55
},
"end": {
"line": 2,
"column": 106,
"offset": 160
},
"indent": []
}
},
{
"type": "listItem",
"loose": false,
"checked": null,
"children": [
{
"type": "paragraph",
"children": [
{
"type": "inlineCode",
"value": "payload",
"position": {
"start": {
"line": 3,
"column": 6,
"offset": 166
},
"end": {
"line": 3,
"column": 15,
"offset": 175
},
"indent": []
}
},
{
"type": "text",
"value": " - The dictionary sent over ",
"position": {
"start": {
"line": 3,
"column": 15,
"offset": 175
},
"end": {
"line": 3,
"column": 43,
"offset": 203
},
"indent": []
}
},
{
"type": "inlineCode",
"value": "AppMessage",
"position": {
"start": {
"line": 3,
"column": 43,
"offset": 203
},
"end": {
"line": 3,
"column": 57,
"offset": 217
},
"indent": []
}
},
{
"type": "text",
"value": " consisting of\nkey-value pairs. ",
"position": {
"start": {
"line": 3,
"column": 57,
"offset": 217
},
"end": {
"line": 4,
"column": 23,
"offset": 254
},
"indent": [
6
]
}
},
{
"type": "emphasis",
"children": [
{
"type": "text",
"value": "This field only exists for ",
"position": {
"start": {
"line": 4,
"column": 24,
"offset": 255
},
"end": {
"line": 4,
"column": 51,
"offset": 282
},
"indent": []
}
},
{
"type": "inlineCode",
"value": "appmessage",
"position": {
"start": {
"line": 4,
"column": 51,
"offset": 282
},
"end": {
"line": 4,
"column": 63,
"offset": 294
},
"indent": []
}
},
{
"type": "text",
"value": " events.",
"position": {
"start": {
"line": 4,
"column": 63,
"offset": 294
},
"end": {
"line": 4,
"column": 71,
"offset": 302
},
"indent": []
}
}
],
"position": {
"start": {
"line": 4,
"column": 23,
"offset": 254
},
"end": {
"line": 4,
"column": 72,
"offset": 303
},
"indent": []
}
}
],
"position": {
"start": {
"line": 3,
"column": 6,
"offset": 166
},
"end": {
"line": 4,
"column": 72,
"offset": 303
},
"indent": [
6
]
}
}
],
"position": {
"start": {
"line": 3,
"column": 1,
"offset": 161
},
"end": {
"line": 4,
"column": 72,
"offset": 303
},
"indent": [
1
]
}
},
{
"type": "listItem",
"loose": false,
"checked": null,
"children": [
{
"type": "paragraph",
"children": [
{
"type": "inlineCode",
"value": "response",
"position": {
"start": {
"line": 5,
"column": 6,
"offset": 309
},
"end": {
"line": 5,
"column": 16,
"offset": 319
},
"indent": []
}
},
{
"type": "text",
"value": " - The contents of the URL navigated to when the\nconfiguration page was closed, after the anchor. This may be encoded,\nwhich will require use of decodeURIComponent() before reading as an\nobject. ",
"position": {
"start": {
"line": 5,
"column": 16,
"offset": 319
},
"end": {
"line": 8,
"column": 14,
"offset": 529
},
"indent": [
6,
6,
6
]
}
},
{
"type": "emphasis",
"children": [
{
"type": "text",
"value": "This field only exists for for ",
"position": {
"start": {
"line": 8,
"column": 15,
"offset": 530
},
"end": {
"line": 8,
"column": 46,
"offset": 561
},
"indent": []
}
},
{
"type": "inlineCode",
"value": "webviewclosed",
"position": {
"start": {
"line": 8,
"column": 46,
"offset": 561
},
"end": {
"line": 8,
"column": 61,
"offset": 576
},
"indent": []
}
},
{
"type": "text",
"value": " events.",
"position": {
"start": {
"line": 8,
"column": 61,
"offset": 576
},
"end": {
"line": 8,
"column": 69,
"offset": 584
},
"indent": []
}
}
],
"position": {
"start": {
"line": 8,
"column": 14,
"offset": 529
},
"end": {
"line": 8,
"column": 70,
"offset": 585
},
"indent": []
}
}
],
"position": {
"start": {
"line": 5,
"column": 6,
"offset": 309
},
"end": {
"line": 8,
"column": 70,
"offset": 585
},
"indent": [
6,
6,
6
]
}
}
],
"position": {
"start": {
"line": 5,
"column": 1,
"offset": 304
},
"end": {
"line": 8,
"column": 70,
"offset": 585
},
"indent": [
1,
1,
1
]
}
}
],
"position": {
"start": {
"line": 2,
"column": 1,
"offset": 55
},
"end": {
"line": 8,
"column": 70,
"offset": 585
},
"indent": [
1,
1,
1,
1,
1,
1
]
}
}
],
"position": {
"start": {
"line": 1,
"column": 1,
"offset": 0
},
"end": {
"line": 8,
"column": 70,
"offset": 585
}
}
},
"type": {
"type": "NameExpression",
"name": "Object"
}
}
],
"members": {
"instance": [],
"static": []
},
"path": [
{
"name": "Pebble",
"kind": "namespace"
},
{
"name": "EventCallback",
"kind": "typedef"
}
],
"namespace": "PebbleEventCallback"
},
{
"description": {
"type": "root",
"children": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "Called when the user's timeline token is available.",
"position": {
"start": {
"line": 1,
"column": 1,
"offset": 0
},
"end": {
"line": 1,
"column": 52,
"offset": 51
},
"indent": []
}
}
],
"position": {
"start": {
"line": 1,
"column": 1,
"offset": 0
},
"end": {
"line": 1,
"column": 52,
"offset": 51
},
"indent": []
}
}
],
"position": {
"start": {
"line": 1,
"column": 1,
"offset": 0
},
"end": {
"line": 1,
"column": 52,
"offset": 51
}
}
},
"tags": [
{
"title": "typedef",
"description": null,
"lineNumber": 1,
"type": {
"type": "NameExpression",
"name": "Function"
},
"name": "TimelineTokenCallback"
},
{
"title": "memberof",
"description": "Pebble",
"lineNumber": 2
},
{
"title": "desc",
"description": "Called when the user's timeline token is available.",
"lineNumber": 4
},
{
"title": "param",
"description": "The user's token.",
"lineNumber": 5,
"type": {
"type": "NameExpression",
"name": "String"
},
"name": "token"
}
],
"loc": {
"start": {
"line": 243,
"column": 0
},
"end": {
"line": 249,
"column": 3
}
},
"context": {
"loc": {
"start": {
"line": 187,
"column": 0
},
"end": {
"line": 187,
"column": 77
}
},
"file": "/Users/orviwan/Pebble/developer.getpebble.com/js-docs/pkjs/Pebble.js"
},
"kind": "typedef",
"name": "TimelineTokenCallback",
"type": {
"type": "NameExpression",
"name": "Function"
},
"memberof": "Pebble",
"params": [
{
"name": "token",
"lineNumber": 5,
"description": {
"type": "root",
"children": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "The user's token.",
"position": {
"start": {
"line": 1,
"column": 1,
"offset": 0
},
"end": {
"line": 1,
"column": 18,
"offset": 17
},
"indent": []
}
}
],
"position": {
"start": {
"line": 1,
"column": 1,
"offset": 0
},
"end": {
"line": 1,
"column": 18,
"offset": 17
},
"indent": []
}
}
],
"position": {
"start": {
"line": 1,
"column": 1,
"offset": 0
},
"end": {
"line": 1,
"column": 18,
"offset": 17
}
}
},
"type": {
"type": "NameExpression",
"name": "String"
}
}
],
"members": {
"instance": [],
"static": []
},
"path": [
{
"name": "Pebble",
"kind": "namespace"
},
{
"name": "TimelineTokenCallback",
"kind": "typedef"
}
],
"namespace": "PebbleTimelineTokenCallback"
},
{
"description": {
"type": "root",
"children": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "Called when the user's list of subscriptions is available for processing by the developer.",
"position": {
"start": {
"line": 1,
"column": 1,
"offset": 0
},
"end": {
"line": 1,
"column": 91,
"offset": 90
},
"indent": []
}
}
],
"position": {
"start": {
"line": 1,
"column": 1,
"offset": 0
},
"end": {
"line": 1,
"column": 91,
"offset": 90
},
"indent": []
}
}
],
"position": {
"start": {
"line": 1,
"column": 1,
"offset": 0
},
"end": {
"line": 1,
"column": 91,
"offset": 90
}
}
},
"tags": [
{
"title": "typedef",
"description": null,
"lineNumber": 1,
"type": {
"type": "NameExpression",
"name": "Function"
},
"name": "TimelineTopicsCallback"
},
{
"title": "memberof",
"description": "Pebble",
"lineNumber": 2
},
{
"title": "desc",
"description": "Called when the user's list of subscriptions is available for processing by the developer.",
"lineNumber": 4
},
{
"title": "param",
"description": "of topic strings that the user is subscribed to",
"lineNumber": 5,
"type": {
"type": "ArrayType",
"elements": [
{
"type": "NameExpression",
"name": "String"
}
]
},
"name": "List"
}
],
"loc": {
"start": {
"line": 251,
"column": 0
},
"end": {
"line": 257,
"column": 3
}
},
"context": {
"loc": {
"start": {
"line": 187,
"column": 0
},
"end": {
"line": 187,
"column": 77
}
},
"file": "/Users/orviwan/Pebble/developer.getpebble.com/js-docs/pkjs/Pebble.js"
},
"kind": "typedef",
"name": "TimelineTopicsCallback",
"type": {
"type": "NameExpression",
"name": "Function"
},
"memberof": "Pebble",
"params": [
{
"name": "List",
"lineNumber": 5,
"description": {
"type": "root",
"children": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "of topic strings that the user is subscribed to",
"position": {
"start": {
"line": 1,
"column": 1,
"offset": 0
},
"end": {
"line": 1,
"column": 48,
"offset": 47
},
"indent": []
}
}
],
"position": {
"start": {
"line": 1,
"column": 1,
"offset": 0
},
"end": {
"line": 1,
"column": 48,
"offset": 47
},
"indent": []
}
}
],
"position": {
"start": {
"line": 1,
"column": 1,
"offset": 0
},
"end": {
"line": 1,
"column": 48,
"offset": 47
}
}
},
"type": {
"type": "ArrayType",
"elements": [
{
"type": "NameExpression",
"name": "String"
}
]
}
}
],
"members": {
"instance": [],
"static": []
},
"path": [
{
"name": "Pebble",
"kind": "namespace"
},
{
"name": "TimelineTopicsCallback",
"kind": "typedef"
}
],
"namespace": "PebbleTimelineTopicsCallback"
},
{
"description": {
"type": "root",
"children": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "Provides information about the connected Pebble smartwatch.",
"position": {
"start": {
"line": 1,
"column": 1,
"offset": 0
},
"end": {
"line": 1,
"column": 60,
"offset": 59
},
"indent": []
}
}
],
"position": {
"start": {
"line": 1,
"column": 1,
"offset": 0
},
"end": {
"line": 1,
"column": 60,
"offset": 59
},
"indent": []
}
}
],
"position": {
"start": {
"line": 1,
"column": 1,
"offset": 0
},
"end": {
"line": 1,
"column": 60,
"offset": 59
}
}
},
"tags": [
{
"title": "typedef",
"description": null,
"lineNumber": 1,
"type": {
"type": "NameExpression",
"name": "Object"
},
"name": "WatchInfo"
},
{
"title": "memberof",
"description": "Pebble",
"lineNumber": 2
},
{
"title": "desc",
"description": "Provides information about the connected Pebble smartwatch.",
"lineNumber": 4
},
{
"title": "property",
"description": "The hardware platform, such as `basalt` or `emery`.",
"lineNumber": 6,
"type": {
"type": "NameExpression",
"name": "String"
},
"name": "platform"
},
{
"title": "property",
"description": "The watch model, such as `pebble_black`",
"lineNumber": 7,
"type": {
"type": "NameExpression",
"name": "String"
},
"name": "model"
},
{
"title": "property",
"description": "The user's currently selected language on\n this watch.",
"lineNumber": 8,
"type": {
"type": "NameExpression",
"name": "String"
},
"name": "language"
},
{
"title": "property",
"description": "An object containing information about the\n watch's firmware version, including:\n * `major` - The major version\n * `minor` - The minor version\n * `patch` - The patch version\n * `suffix` - Any additional version information, such as `beta3`",
"lineNumber": 10,
"type": {
"type": "NameExpression",
"name": "Object"
},
"name": "firmware"
}
],
"loc": {
"start": {
"line": 259,
"column": 0
},
"end": {
"line": 275,
"column": 2
}
},
"context": {
"loc": {
"start": {
"line": 187,
"column": 0
},
"end": {
"line": 187,
"column": 77
}
},
"file": "/Users/orviwan/Pebble/developer.getpebble.com/js-docs/pkjs/Pebble.js"
},
"kind": "typedef",
"name": "WatchInfo",
"type": {
"type": "NameExpression",
"name": "Object"
},
"memberof": "Pebble",
"properties": [
{
"name": "platform",
"lineNumber": 6,
"description": {
"type": "root",
"children": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "The hardware platform, such as ",
"position": {
"start": {
"line": 1,
"column": 1,
"offset": 0
},
"end": {
"line": 1,
"column": 32,
"offset": 31
},
"indent": []
}
},
{
"type": "inlineCode",
"value": "basalt",
"position": {
"start": {
"line": 1,
"column": 32,
"offset": 31
},
"end": {
"line": 1,
"column": 40,
"offset": 39
},
"indent": []
}
},
{
"type": "text",
"value": " or ",
"position": {
"start": {
"line": 1,
"column": 40,
"offset": 39
},
"end": {
"line": 1,
"column": 44,
"offset": 43
},
"indent": []
}
},
{
"type": "inlineCode",
"value": "emery",
"position": {
"start": {
"line": 1,
"column": 44,
"offset": 43
},
"end": {
"line": 1,
"column": 51,
"offset": 50
},
"indent": []
}
},
{
"type": "text",
"value": ".",
"position": {
"start": {
"line": 1,
"column": 51,
"offset": 50
},
"end": {
"line": 1,
"column": 52,
"offset": 51
},
"indent": []
}
}
],
"position": {
"start": {
"line": 1,
"column": 1,
"offset": 0
},
"end": {
"line": 1,
"column": 52,
"offset": 51
},
"indent": []
}
}
],
"position": {
"start": {
"line": 1,
"column": 1,
"offset": 0
},
"end": {
"line": 1,
"column": 52,
"offset": 51
}
}
},
"type": {
"type": "NameExpression",
"name": "String"
}
},
{
"name": "model",
"lineNumber": 7,
"description": {
"type": "root",
"children": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "The watch model, such as ",
"position": {
"start": {
"line": 1,
"column": 1,
"offset": 0
},
"end": {
"line": 1,
"column": 26,
"offset": 25
},
"indent": []
}
},
{
"type": "inlineCode",
"value": "pebble_black",
"position": {
"start": {
"line": 1,
"column": 26,
"offset": 25
},
"end": {
"line": 1,
"column": 40,
"offset": 39
},
"indent": []
}
}
],
"position": {
"start": {
"line": 1,
"column": 1,
"offset": 0
},
"end": {
"line": 1,
"column": 40,
"offset": 39
},
"indent": []
}
}
],
"position": {
"start": {
"line": 1,
"column": 1,
"offset": 0
},
"end": {
"line": 1,
"column": 40,
"offset": 39
}
}
},
"type": {
"type": "NameExpression",
"name": "String"
}
},
{
"name": "language",
"lineNumber": 8,
"description": {
"type": "root",
"children": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "The user's currently selected language on\n this watch.",
"position": {
"start": {
"line": 1,
"column": 1,
"offset": 0
},
"end": {
"line": 2,
"column": 16,
"offset": 57
},
"indent": [
1
]
}
}
],
"position": {
"start": {
"line": 1,
"column": 1,
"offset": 0
},
"end": {
"line": 2,
"column": 16,
"offset": 57
},
"indent": [
1
]
}
}
],
"position": {
"start": {
"line": 1,
"column": 1,
"offset": 0
},
"end": {
"line": 2,
"column": 16,
"offset": 57
}
}
},
"type": {
"type": "NameExpression",
"name": "String"
}
},
{
"name": "firmware",
"lineNumber": 10,
"description": {
"type": "root",
"children": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "An object containing information about the\n watch's firmware version, including:",
"position": {
"start": {
"line": 1,
"column": 1,
"offset": 0
},
"end": {
"line": 2,
"column": 41,
"offset": 83
},
"indent": [
1
]
}
}
],
"position": {
"start": {
"line": 1,
"column": 1,
"offset": 0
},
"end": {
"line": 2,
"column": 41,
"offset": 83
},
"indent": [
1
]
}
},
{
"type": "list",
"ordered": false,
"start": null,
"loose": false,
"children": [
{
"type": "listItem",
"loose": false,
"checked": null,
"children": [
{
"type": "paragraph",
"children": [
{
"type": "inlineCode",
"value": "major",
"position": {
"start": {
"line": 3,
"column": 6,
"offset": 89
},
"end": {
"line": 3,
"column": 13,
"offset": 96
},
"indent": []
}
},
{
"type": "text",
"value": " - The major version",
"position": {
"start": {
"line": 3,
"column": 13,
"offset": 96
},
"end": {
"line": 3,
"column": 33,
"offset": 116
},
"indent": []
}
}
],
"position": {
"start": {
"line": 3,
"column": 6,
"offset": 89
},
"end": {
"line": 3,
"column": 33,
"offset": 116
},
"indent": []
}
}
],
"position": {
"start": {
"line": 3,
"column": 1,
"offset": 84
},
"end": {
"line": 3,
"column": 33,
"offset": 116
},
"indent": []
}
},
{
"type": "listItem",
"loose": false,
"checked": null,
"children": [
{
"type": "paragraph",
"children": [
{
"type": "inlineCode",
"value": "minor",
"position": {
"start": {
"line": 4,
"column": 6,
"offset": 122
},
"end": {
"line": 4,
"column": 13,
"offset": 129
},
"indent": []
}
},
{
"type": "text",
"value": " - The minor version",
"position": {
"start": {
"line": 4,
"column": 13,
"offset": 129
},
"end": {
"line": 4,
"column": 33,
"offset": 149
},
"indent": []
}
}
],
"position": {
"start": {
"line": 4,
"column": 6,
"offset": 122
},
"end": {
"line": 4,
"column": 33,
"offset": 149
},
"indent": []
}
}
],
"position": {
"start": {
"line": 4,
"column": 1,
"offset": 117
},
"end": {
"line": 4,
"column": 33,
"offset": 149
},
"indent": []
}
},
{
"type": "listItem",
"loose": false,
"checked": null,
"children": [
{
"type": "paragraph",
"children": [
{
"type": "inlineCode",
"value": "patch",
"position": {
"start": {
"line": 5,
"column": 6,
"offset": 155
},
"end": {
"line": 5,
"column": 13,
"offset": 162
},
"indent": []
}
},
{
"type": "text",
"value": " - The patch version",
"position": {
"start": {
"line": 5,
"column": 13,
"offset": 162
},
"end": {
"line": 5,
"column": 33,
"offset": 182
},
"indent": []
}
}
],
"position": {
"start": {
"line": 5,
"column": 6,
"offset": 155
},
"end": {
"line": 5,
"column": 33,
"offset": 182
},
"indent": []
}
}
],
"position": {
"start": {
"line": 5,
"column": 1,
"offset": 150
},
"end": {
"line": 5,
"column": 33,
"offset": 182
},
"indent": []
}
},
{
"type": "listItem",
"loose": false,
"checked": null,
"children": [
{
"type": "paragraph",
"children": [
{
"type": "inlineCode",
"value": "suffix",
"position": {
"start": {
"line": 6,
"column": 6,
"offset": 188
},
"end": {
"line": 6,
"column": 14,
"offset": 196
},
"indent": []
}
},
{
"type": "text",
"value": " - Any additional version information, such as ",
"position": {
"start": {
"line": 6,
"column": 14,
"offset": 196
},
"end": {
"line": 6,
"column": 61,
"offset": 243
},
"indent": []
}
},
{
"type": "inlineCode",
"value": "beta3",
"position": {
"start": {
"line": 6,
"column": 61,
"offset": 243
},
"end": {
"line": 6,
"column": 68,
"offset": 250
},
"indent": []
}
}
],
"position": {
"start": {
"line": 6,
"column": 6,
"offset": 188
},
"end": {
"line": 6,
"column": 68,
"offset": 250
},
"indent": []
}
}
],
"position": {
"start": {
"line": 6,
"column": 1,
"offset": 183
},
"end": {
"line": 6,
"column": 68,
"offset": 250
},
"indent": []
}
}
],
"position": {
"start": {
"line": 3,
"column": 1,
"offset": 84
},
"end": {
"line": 6,
"column": 68,
"offset": 250
},
"indent": [
1,
1,
1
]
}
}
],
"position": {
"start": {
"line": 1,
"column": 1,
"offset": 0
},
"end": {
"line": 6,
"column": 68,
"offset": 250
}
}
},
"type": {
"type": "NameExpression",
"name": "Object"
}
}
],
"members": {
"instance": [],
"static": []
},
"path": [
{
"name": "Pebble",
"kind": "namespace"
},
{
"name": "WatchInfo",
"kind": "typedef"
}
],
"namespace": "PebbleWatchInfo"
},
{
"description": {
"type": "root",
"children": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "The structure of an app glance.",
"position": {
"start": {
"line": 1,
"column": 1,
"offset": 0
},
"end": {
"line": 1,
"column": 32,
"offset": 31
},
"indent": []
}
}
],
"position": {
"start": {
"line": 1,
"column": 1,
"offset": 0
},
"end": {
"line": 1,
"column": 32,
"offset": 31
},
"indent": []
}
}
],
"position": {
"start": {
"line": 1,
"column": 1,
"offset": 0
},
"end": {
"line": 1,
"column": 32,
"offset": 31
}
}
},
"tags": [
{
"title": "typedef",
"description": null,
"lineNumber": 1,
"type": {
"type": "NameExpression",
"name": "Object"
},
"name": "AppGlanceSlice"
},
{
"title": "memberof",
"description": "Pebble",
"lineNumber": 2
},
{
"title": "desc",
"description": "The structure of an app glance.",
"lineNumber": 4
},
{
"title": "property",
"description": "Optional ISO date-time string of when \nthe entry should expire and no longer be shown in the app glance.",
"lineNumber": 6,
"type": {
"type": "NameExpression",
"name": "String"
},
"name": "expirationTime"
},
{
"title": "property",
"description": "An object containing:\n * `icon` - URI string of the icon to display in the app glance, e.g. system://images/ALARM_CLOCK.\n * `subtitleTemplateString` - Template string that will be displayed in the subtitle of the app glance.",
"lineNumber": 8,
"type": {
"type": "NameExpression",
"name": "Object"
},
"name": "layout"
}
],
"loc": {
"start": {
"line": 277,
"column": 0
},
"end": {
"line": 288,
"column": 2
}
},
"context": {
"loc": {
"start": {
"line": 187,
"column": 0
},
"end": {
"line": 187,
"column": 77
}
},
"file": "/Users/orviwan/Pebble/developer.getpebble.com/js-docs/pkjs/Pebble.js"
},
"kind": "typedef",
"name": "AppGlanceSlice",
"type": {
"type": "NameExpression",
"name": "Object"
},
"memberof": "Pebble",
"properties": [
{
"name": "expirationTime",
"lineNumber": 6,
"description": {
"type": "root",
"children": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "Optional ISO date-time string of when \nthe entry should expire and no longer be shown in the app glance.",
"position": {
"start": {
"line": 1,
"column": 1,
"offset": 0
},
"end": {
"line": 2,
"column": 66,
"offset": 104
},
"indent": [
1
]
}
}
],
"position": {
"start": {
"line": 1,
"column": 1,
"offset": 0
},
"end": {
"line": 2,
"column": 66,
"offset": 104
},
"indent": [
1
]
}
}
],
"position": {
"start": {
"line": 1,
"column": 1,
"offset": 0
},
"end": {
"line": 2,
"column": 66,
"offset": 104
}
}
},
"type": {
"type": "NameExpression",
"name": "String"
}
},
{
"name": "layout",
"lineNumber": 8,
"description": {
"type": "root",
"children": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "An object containing:",
"position": {
"start": {
"line": 1,
"column": 1,
"offset": 0
},
"end": {
"line": 1,
"column": 22,
"offset": 21
},
"indent": []
}
}
],
"position": {
"start": {
"line": 1,
"column": 1,
"offset": 0
},
"end": {
"line": 1,
"column": 22,
"offset": 21
},
"indent": []
}
},
{
"type": "list",
"ordered": false,
"start": null,
"loose": false,
"children": [
{
"type": "listItem",
"loose": false,
"checked": null,
"children": [
{
"type": "paragraph",
"children": [
{
"type": "inlineCode",
"value": "icon",
"position": {
"start": {
"line": 2,
"column": 6,
"offset": 27
},
"end": {
"line": 2,
"column": 12,
"offset": 33
},
"indent": []
}
},
{
"type": "text",
"value": " - URI string of the icon to display in the app glance, e.g. system://images/ALARM_CLOCK.",
"position": {
"start": {
"line": 2,
"column": 12,
"offset": 33
},
"end": {
"line": 2,
"column": 101,
"offset": 122
},
"indent": []
}
}
],
"position": {
"start": {
"line": 2,
"column": 6,
"offset": 27
},
"end": {
"line": 2,
"column": 101,
"offset": 122
},
"indent": []
}
}
],
"position": {
"start": {
"line": 2,
"column": 1,
"offset": 22
},
"end": {
"line": 2,
"column": 101,
"offset": 122
},
"indent": []
}
},
{
"type": "listItem",
"loose": false,
"checked": null,
"children": [
{
"type": "paragraph",
"children": [
{
"type": "inlineCode",
"value": "subtitleTemplateString",
"position": {
"start": {
"line": 3,
"column": 6,
"offset": 128
},
"end": {
"line": 3,
"column": 30,
"offset": 152
},
"indent": []
}
},
{
"type": "text",
"value": " - Template string that will be displayed in the subtitle of the app glance.",
"position": {
"start": {
"line": 3,
"column": 30,
"offset": 152
},
"end": {
"line": 3,
"column": 106,
"offset": 228
},
"indent": []
}
}
],
"position": {
"start": {
"line": 3,
"column": 6,
"offset": 128
},
"end": {
"line": 3,
"column": 106,
"offset": 228
},
"indent": []
}
}
],
"position": {
"start": {
"line": 3,
"column": 1,
"offset": 123
},
"end": {
"line": 3,
"column": 106,
"offset": 228
},
"indent": []
}
}
],
"position": {
"start": {
"line": 2,
"column": 1,
"offset": 22
},
"end": {
"line": 3,
"column": 106,
"offset": 228
},
"indent": [
1
]
}
}
],
"position": {
"start": {
"line": 1,
"column": 1,
"offset": 0
},
"end": {
"line": 3,
"column": 106,
"offset": 228
}
}
},
"type": {
"type": "NameExpression",
"name": "Object"
}
}
],
"members": {
"instance": [],
"static": []
},
"path": [
{
"name": "Pebble",
"kind": "namespace"
},
{
"name": "AppGlanceSlice",
"kind": "typedef"
}
],
"namespace": "PebbleAppGlanceSlice"
}
]
},
"path": [
{
"name": "Pebble",
"kind": "namespace"
}
],
"namespace": "Pebble"
}
]