Bolt bridge reference
Table of Contents
Bolt web content can interact with the native app using a well-defined javascript bridge. For an overview of how this works, see the Pugpig HTML Bridge Overview. This document is a reference for the available bridge calls.
The bridge calls may refer to issues, timelines or editions. They're all the same thing. For example, issueAuthorisationStatus, timelineInfo and cancelEditionDownload are all acting on a collection of stories (sometimes called “articles”).
Some calls can only be made in a certain context, as defined by the availability field in the bridge description. This is usually because the call only makes sense in that context. The possible contexts are:
- Within a timeline (a view that shows a list of stories/articles)
- Within a storefront (a view that shows a list of editions/issues/timelines)
- Within article content
- Within an arbitrary web view (e.g. a web view launched from settings)
For example, the stories bridge only makes sense within a timeline because it's listing the stories within that timeline.
Active bridges
actionProviderNames
List available action providers.
| Parameter(s) | n/a |
| Availability | All bridge-enabled views |
| Updates | n/a |
| Result | [ "provider_1", "provider_2", ..., "provider_n" ] |
| iOS Version | 4.15.0 |
| Android Version | 4.12.0 |
| Web Version | n/a |
addToCalendar
Add a story to the device calendar. The story must be a calendar event (i.e. at a minimum have a “startDate” and "endDate")
| Parameter(s) | |
| Availability | iOS timeline only, Android all bridge-enabled views |
| Updates | n/a |
| Result | n/a |
| iOS Version | 3.3.2 |
| Android Version | 3.14.2 |
| Web Version | 5.0.2 |
authorisationStatus
| Parameter(s) | n/a |
| Availability | All bridge-enabled views |
| Updates | On feed access changes |
| Result | |
| iOS Version | 3.3.2 |
| Android Version | 2.8.7 |
| Web Version | <6.7.48 |
cancelEditionDownload
| Parameter(s) | |
| Availability | All bridge-enabled views except timeline |
| Updates | n/a |
| Result | n/a |
| iOS Version | 3.8.0 |
| Android Version | 3.3.3 |
| Web Version | n/a |
clearForwardTouchesWithin
| Parameter(s) | n/a |
| Availability | Android timeline and content only |
| Updates | n/a |
| Result | n/a |
| iOS Version | n/a |
| Android Version | 3.16.0 |
| Web Version | n/a |
deleteEdition
| Parameter(s) | |
| Availability | All bridge-enabled views |
| Updates | n/a |
| Result | n/a |
| iOS Version | 3.8.2 |
| Android Version | 3.3.3 |
| Web Version | n/a |
fireToast
| Parameter(s) |
|
| Availability | All bridge-enabled views, web does not act on actions attribute atm |
| Updates | n/a |
| Result | n/a |
| iOS Version | 4.11.0 |
| Android Version | 4.9.0 |
| Web Version | 6.8.4 |
forwardTouchesWithin
| Parameter(s) |
You can have as many areas in a single call as you need. Calling forwardTouchesWithin adds the areas to the existing areas. Clear all areas with the clearForwardTouchesWithin bridge. |
| Availability | Android timeline and content only |
| Updates | n/a |
| Result | n/a |
| iOS Version | n/a |
| Android Version | 3.16.0 |
| Web Version | n/a |
getConsentData
| Parameter(s) | key: String |
| Availability | all bridge-enabled views |
| Updates | n/a |
| Result | Consent value for given key, may be blank. |
| iOS Version | 3.22.1 |
| Android Version | 3.23.0 |
| Web Version | n/a |
getConsentStatus
| Parameter(s) | n/a |
| Availability | all bridge-enabled views |
| Updates | n/a |
| Result | "no_provider" | "unknown" | "not_required" | "required" | "obtained" |
| iOS Version | 3.22.1 |
| Android Version | 3.23.0 |
| Web Version | n/a |
issueAuthorisationStatus
| Parameter(s) | JSON string array of feed identifiers |
| Availability | all bridge-enabled views |
| Updates | on feed access changes |
| Result |
{ … |
| iOS Version | 3.3.2 |
| Android Version | 2.18.6 |
| Web Version | <6.7.48 |
localizableDateTimeString
| Parameter(s) |
datetime must be an ISO-8601 format string |
| Availability | all bridge-enabled views |
| Updates | n/a |
| Result |
Date or time string with given id using the specified ISO-8601 format. The string can contain {{date}}, {{time}} or {{datetime}} and the appropriate format will be substituted.
Web additionally is able to process params but ios/android are not. |
| iOS Version | 3.9.0 |
| Android Version | 3.9.0 |
| Web Version | <6.7.48 |
localizableQuantityString
| Parameter(s) |
params is optional |
| Availability | all bridge-enabled views |
| Updates | n/a |
| Result | String with given id, parameters substituted as appropriate. Quantity will be substituted according to cardinality rules. |
| iOS Version | 3.3.2 |
| Android Version | 2.18.15 |
| Web Version | n/a |
localizableRelativeTimeString
| Parameter(s) |
params is optional datetime must be an ISO-8601 format string |
| Availability | all bridge-enabled views |
| Updates | n/a |
| Result |
Relative time string with given id using the specified ISO-8601 format, parameters substituted as appropriate. If the time is within 60 seconds, it uses the string key relative_date_now for the value. If the time is within 7 days, it's a relatively formatted value. If it's within the current year, it's a short day month string. Otherwise. it's a full absolute date. |
| iOS Version | 3.3.2 |
| Android Version | 2.18.15 |
| Web Version | <6.7.48 |
localizableString
| Parameter(s) |
params is optional |
| Availability | all bridge-enabled views |
| Updates | n/a |
| Result | String with given id, with parameters substituted as appropriate |
| iOS Version | 3.3.2 |
| Android Version | 2.18.15 |
| Web Version | <6.7.48 |
localizableStringWithPriceSubstitutions
| Parameter(s) | |
| Availability | All bridge-enabled views |
| Updates | n/a |
| Result |
String with given id with price values substituted. TODO: more detail |
| iOS Version | 3.5.0 |
| Android Version | 3.4.4 |
| Web Version | n/a |
logInfo
| Parameter(s) | message: String |
| Availability | all bridge-enabled views |
| Updates | n/a |
| Result | n/a |
| iOS Version | 3.3.2 |
| Android Version | 2.8.7 |
| Web Version | <6.7.48 |
openAudioPlayer
| Parameter(s) | n/a |
| Availability | all bridge-enabled views |
| Updates | n/a |
| Result | n/a |
| iOS Version | 3.3.2 |
| Android Version | 2.18.0 |
| Web Version | n/a |
openBrowser
Do not use this for internal URLs, like commands. This is unsupported, and the behaviour is undefined.
| Parameter(s) | url: String. MUST be fully qualified. |
| Availability | All bridge-enabled views, Bolt 4.3 or later. |
| Updates | n/a |
| Result | n/a |
| iOS Version | 4.3.2 |
| Android Version | 4.3.0 |
| Web Version | n/a |
openEdition
| Parameter(s) |
partition is optional autoDownload is optional and defaults to true. skipTimeline is optional and defaults to false. |
| Availability | All bridge-enabled views |
| Updates | n/a |
| Result | n/a |
| iOS Version | 3.3.2 |
| Android Version | 2.18.21 |
| Web Version | <6.7.48 |
openImageGallery
| Parameter(s) |
initialImage is the index to display first. You can have as many images as you like. All text fields must be defined, but can be blank. |
| Availability | all bridge-enabled views |
| Updates | n/a |
| Result | n/a |
| iOS Version | 3.3.2 |
| Android Version | 2.8.7 |
| Web Version | <6.7.48 |
paywallState
| Parameter(s) | n/a |
| Availability | Content only |
| Updates | Authorisation changes |
| Result | { "paywall": "standard" | "metered" | "none" } |
| iOS Version | 3.18.3 |
| Android Version | 3.18.3 |
| Web Version | n/a |
playAudio
| Parameter(s) |
|
| Availability | All bridge-enabled views |
| Updates | n/a |
| Result | n/a |
| iOS Version | 3.3.2 |
| Android Version | 2.8.7 |
| Web Version | 6.8.0 |
providerAction
| Parameter(s) |
Parameters will depend on the specific provider and action. By convention, one of the parameters is usually “command”, and that identifies the specific action to perform. callbackName is called when the provider action completes. Some providers may not provide a callback. |
| Availability | All bridge-enabled views |
| Updates | n/a |
| Result | Push provider's unique user identifier, or a blank string if unavailable |
| iOS Version | 4.16.0 |
| Android Version | 4.3.0 |
| Web Version | n/a |
pushUserIdentifier
| Parameter(s) | n/a |
| Availability | All bridge-enabled views |
| Updates | n/a |
| Result | Push provider's unique user identifier, or a blank string if unavailable |
| iOS Version | 4.1.0 |
| Android Version | 4.0.7 |
| Web Version | n/a |
queueAudio
| Parameter(s) |
|
| Availability | timelines only |
| Updates | n/a |
| Result | n/a |
| iOS Version | 4.13.0 |
| Android Version | 4.9.4 |
| Web Version | TBD |
readStories
| Parameter(s) | n/a |
| Availability | All bridge-enabled views (except iOS timeline prior to Bolt 4.1.x) |
| Updates | Read stories updated |
| Result |
{ "readStories" : [ [ feed-id, story-id ], [ feed-id, story-id ], … ] } |
| iOS Version | 3.3.2 |
| Android Version | 2.14.8 |
| Web Version | <6.7.48 |
rewriteURLUsingExternalDomainSettings
| Parameter(s) | url: String |
| Availability | All bridge-enabled views |
| Updates | n/a |
| Result | Rewritten url string |
| iOS Version | 3.18.4 |
| Android Version | 3.18.4 |
| Web Version | <6.7.48 |
savedStories
| Parameter(s) | n/a |
| Availability | All bridge-enabled views (except iOS timeline prior to Bolt 4.1.x) |
| Updates | Saved stories updated |
| Result |
{ "savedStories" : [ [feed-id, story-id], [feed-id, story-id], … ] } |
| iOS Version | 3.3.2 |
| Android Version | 2.14.8 |
| Web Version | <6.7.48 |
setSaved
| Parameter(s) |
iOS saves the story is “saved” is true and removes it if “saved” is false. Android removes the story if it is already saved, otherwise adds it. |
| Availability | All bridge-enabled views (except iOS timeline prior to Bolt 4.1.x) |
| Updates | n/a |
| Result | n/a |
| iOS Version | 3.3.2 |
| Android Version | 3.14.2 |
| Web Version | <6.7.48 |
share
Share a URL using native share sheet.
| Parameter(s) | |
| Availability | all bridge-enabled views |
| Updates | n/a |
| Result | n/a |
| iOS Version | 3.3.2 |
| Android Version | 3.14.2 |
| Web Version | n/a |
shareStory
| Parameter(s) | |
| Availability | iOS timeline only, Android all bridge-enabled views |
| Updates | n/a |
| Result | n/a |
| iOS Version | 3.3.2 |
| Android Version | 3.14.2 |
| Web Version | <6.7.48 |
shouldViewWidget
| Parameter(s) | |
| Availability | Timeline only |
| Updates | n/a |
| Result | true if widget should be shown/activated |
| iOS Version | 3.3.2 |
| Android Version | 2.18.6 |
| Web Version | 6.8.0 |
showToolTip
| Parameter(s) |
|
| Availability | singlePageWebviews and Timelines only for now |
| Updates | n/a |
| iOS Version | 4.8.0 |
| Android Version | 4.5.1 |
| Web Version | n/a |
startEditionDownload
| Parameter(s) | |
| Availability | All bridge-enabled views (except iOS timeline prior to Bolt 4.1.x) |
| Updates | n/a |
| Result | n/a |
| iOS Version | 3.8.0 |
| Android Version | 3.8.0 |
| Web Version | n/a |
storeGet
| Parameter(s) | key: String |
| Availability | All bridge-enabled views |
| Updates | n/a |
| Result | Stored string value associated with the key, or null if key does not exist |
| iOS Version | 3.16.0 |
| Android Version | 3.16.0 |
| Web Version | <6.7.48 |
storeSet
| Parameter(s) |
Specify null as the value to delete the string associated with the key. |
| Availability | all bridge-enabled views |
| Updates | on feed access changes |
| Result | n/a |
| iOS Version | 3.16.0 |
| Android Version | 3.16.0 |
| Web Version | <6.7.48 |
stories
| Parameter(s) | n/a |
| Availability | Timeline only |
| Updates | Timeline changed |
| Result |
{ "stories" : [ JSON-Array of stories ] } |
| iOS Version | 3.3.2 |
| Android Version | 2.8.7 |
| Web Version | <6.7.48 |
timeline
| Parameter(s) | |
| Availability | iOS all bridge-enabled views except timeline, Android all bridge-enabled views |
| Updates | timeline changed (including download progress updates) |
| Result |
{ downloadError is optional (there may be no error) |
| iOS Version | 3.3.2 |
| Android Version | 2.16.0 |
| Web Version | <6.7.48 |
timelineInfo
| Parameter(s) | n/a |
| Availability | timeline only |
| Updates | timeline changes |
| Result |
{ "timelineType", "SavedTimeline" | "Timeline", "themeURL" : [ array-of-additional-CSS-files ], "sourceURL" : "timeline-source-url", "feedReference": { full-feed-reference-from-feed }, "metadata": { global-metadata-from-feed }, "debugLogs": true | false } The source URL is in the /t/feedid format. |
| iOS Version | 3.3.2 |
| Android Version | 2.9.0 |
| Web Version | <6.7.48 |
timelineIsReady
| Parameter(s) | |
| Availability | timeline only |
| Updates | n/a |
| Result | n/a |
| iOS Version | 3.3.2 |
| Android Version | 2.8.7 |
| Web Version | <6.7.48 |
timelines
| Parameter(s) |
The dictionary filters the list of timelines. A filter matches an entry if, for every pair in the filter:
The timelines automatically filter out any entry that should not be visible for a given authorisation state (e.g. "private" timelines are filtered if you are not signed in). |
| Availability | Storefront only |
| Updates | n/a |
| Result | JSON array of timeline entries |
| iOS Version | 3.3.2 |
| Android Version | 2.16.0 |
| Web Version | <6.7.48 |
timelinesInfo
| Parameter(s) | n/a |
| Availability | storefront only |
| Updates | n/a |
| Result |
{ tab parameters, "baseUrl" : “base url string”, "filter" : [String:String], "css" : [URL]?, "theme" : [String:AnyCodable]?, "darkTheme" : [String:AnyCodable]?, "debugLogs" : Bool?, "dynamic_filter" : [String:AnyCodable]?, } The "css" array is rewritten to be config-relative |
| iOS Version | 3.3.2 |
| Android Version | 2.16.0 |
| Web Version | <6.7.48 |
trackAnalyticsEvent
Tracks an analytics event
| Parameter(s) |
storyEntry and feedid are optional *paramName is the name of a dimension, e.g. paramName: ‘pugpigEditionID’, paramName: ‘pugpigPageName', etc.
name falls back to type paramName falls back to param storyEntry falls back to story |
| Availability | All bridge-enabled views |
| Updates | n/a |
| Result | n/a |
| iOS Version | 3.3.2 |
| Android Version | 2.8.7 |
| Web Version | <6.7.48 |
| Parameter(s) |
category and param are optional |
| Availability | all bridge-enabled views |
| Updates | n/a |
| Result | n/a |
updateTime
| Parameter(s) | n/a |
| Availability | Timelines only |
| Updates | Timeline refresh |
| Result |
{ "dateTime", "time-last-updated", "lastCheckedDateTime" : "time-last-checked" } The times are in UTC, in format yyyy-MM-ddTHH:mm:ssZ |
| iOS Version | 3.3.2 |
| Android Version | 2.9.0 |
| Web Version | <6.7.48 |
viewArticle
| Parameter(s) | |
| Availability | Timeline only |
| Updates | n/a |
| Result | n/a |
| iOS Version | 3.3.2 |
| Android Version | |
| Web Version | <6.7.48 |
webviewInfo
| Parameter(s) | n/a |
| Availability | all bridge-enabled views |
| Updates | n/a |
| Result |
{ "baseUrl": url, "debugLogs": true|false Locale language is the ISO 639-1 language code, region is the ISO 3166-1 region code. It's legal for there to be no region. |
| iOS Version | 3.3.2 |
| Android Version | 4.14.0 |
| Web Version | <6.7.48 |
Provider bridges (3rd party plugins)
We allow access to 3rd party providers from the bridge by using the standardised providerAction interface.
Current 3rd parties with a bridge interface are:
- Chromecast
- Viafoura
Chromecast
startcasting
Start casting a video.
| Parameters | |
| Availability | all bridge-enabled views |
| Updates | n/a |
| Result | { “success”: Boolean } |
| iOS Version | 4.15.0 |
| Android Version | 4.12.0 |
| Web Version | n/a |
stopcasting
Stop casting the currently casted video.
| Parameters | n/a |
| Availability | all bridge-enabled views |
| Updates | n/a |
| Result | { “success”: Boolean } |
| iOS Version | 4.15.0 |
| Android Version | 4.12.0 |
| Web Version | n/a |
sessioninfo
Session information for current cast session.
| Parameters | n/a |
| Availability | all bridge-enabled views |
| Updates | n/a |
| Result | { “sessionid”: String, “isconnected”: Boolean } |
| iOS Version | 4.15.0 |
| Android Version | 4.12.0 |
| Web Version | n/a |
Viafoura
commentCount
Get the comment count
| Parameters | n/a |
| Availability | All bridge-enabled views |
| Updates | n/a |
| Result | { “commentCount”: String } |
| iOS Version | 4.3.0 |
| Android Version | 4.3.15 |
| Web Version | n/a |
Deprecated bridges
baseUrl
| Parameter(s) | n/a |
| Availability | all bridge-enabled views |
| Updates | n/a |
| Result | n/a |
localeInfo
| Parameter(s) | n/a |
| Availability | all bridge-enabled views |
| Updates | n/a |
| Result |
{ } Language is the ISO 639-1 language code, region is the ISO 3166-1 region code. It's legal for there to be no region. |


