App Getter Methods

From Weever Apps API
Jump to: navigation, search

The getter methods are used to change the content, layout, or formatting of a Weever mobile app. Calls made will need to include app=json and m= one of the methods below.

Contents

Methods

Configuration Data

config_sync
Use Returns JSON object containing configuration information for the mobile app.
Since version 1.6
Returns Var Type Description
domain url The custom domain associated with an app (pro only)
google_analytics string The UA-Code associated with the app for Google Analytics.
ecosystem boolean If true, the app will be listed publicly in the Weever Ecosytem.
loadspinner html The HTML to be displayed as a message when the app is loading (pro-white label only).
devices string A comma-seperated list of device detection functions to run when detecting whether to launch the app or the desktop site.
tier int The subscription tier of the app. 1 = free/basic, 2=pro, 2.1=trial, 4=pro white label.
local obj An object containing the available localization settings.
login obj An object containing the login settings. (as of version 1.9)
Example call app=json&m=config_sync&site_key=[[SITE KEY HERE]]

Account Data

account_sync
Use Returns JSON object containing account information for the mobile app.
Since version 1.2
Returns Var Type Description
site url The URL associated with the key.
expiry string A string containing information about your subscription. (Basic-tier apps do not expire.)
tier string The name of your subscription tier.
tier_number decimal The corresponding number code for your subscription tier.
Example call app=json&m=account_sync&site_key=[[SITE KEY HERE]]

Navigation Tab

tab_sync
Use Outputs JSON object of navigation tab data for the mobile app. Also contains other miscellaneous configuration data.
Since version 0.6
Returns Var Type Description
config configSync Configuration data. Deprecating soon...
tabs tabData See table below.
generator string Server information.
Example call app=json&m=tab_sync&site_key=[[SITE KEY HERE]]

Tab Data

tabSync::tab
Variable Type Data Returned
name string Name of the tab item.
type string The navigation tab type. If type="tab", then it represents a parent tab rather than a tab item.
component componentType The type of content in the tab or tab item.
published boolean 0: Unpublished; 1: Published.
cloud_tab_id int An ID for the tab or tab item.
component_behaviour varies Use varies depending on componentType.
tier decimal (Applies where type="tab" only.) The subscription tier level of a navigation tab. If higher than the subscriber's tier, the tab will not appear in the app. 1= Basic, 2= Pro, 2.1= Trial, 4= Pro White-Label.
cms_feed url An URL pointing to an R3S feed.
rss url An URL pointing to a third-party feed ('rss' is a misnomer, it no longer uses RSS feeds for any third-party feeds)
ordering int The sort order of the tab or tab item.
var json or string Use varies depending on type of tab item.
icon string Deprecated. A string associated with the tab icon's CSS class.

Config Data

tabSync::config
Note: A lot of the values in this are deprecated. Only the relevant information that is not present in other calls (theme, account) is listed here. This method of getting config data will be deprecated and replaced with a more appropriate function soon. It's our oldest and messiest function, right now.
Variable Type Data Returned
app_enabled boolean 1 or 0, if device forwarding is set on or off. Used by Joomla/WordPress, can be used to determine if a CMS should be forwarding any visitors.
ecosystem boolean (not yet implemented) 1, or 0, an opt-in to a directory of Weever apps.
devices string A comma-separated list of MobileESP for Weever Apps device functions to be run to test if a visitor should be directed to the app instead of the desktop site.
analytics object An object containing configuration data for analytics.

service: Currently only "google-analytics" for Google Analytics.
code: Your UA-code for Google Analytics.

domains array (not yet implemented, Pro-White Label only) An array of custom domain URLs pointing to your app.
loadspinner html (not yet implemented, Pro-White Label only) An HTML string containing your custom load screen message ("Powered by...")

Theme Data

theme_sync
Use Outputs JSON object of theme and layout data for the mobile app.
Since version 1.3
Last Updated 1.7.1
Returns Var Type Description
images object Contains URLs to the respective image types.

phone_load: Phone Launchscreen
tablet_load: Tablet Launchscreen in Portrait Orientation
tablet_landscape_load: Tablet Launchscreen in Landscape Orientation
icon: App Icon
titlebar_logo: App titlebar logo.

css object Contains mostly deprecated properties, only non-deprecated listed below.

useCssOverride: 0 or 1, if active will include CSS overrides in the app.
css: A string containing the CSS overrides for an app.

template string The currently assigned template for the app.
titlebarSource string The type of titlebar being used. Can be image, html, or text.
titlebarHtml html The HTML to be used if titlebarSource="html".
titlebarTitle string If titlebarSource="text", this is the text used in the header of the app. Was titlebar_title, which is now deprecated.
title string The title used when an app is 'installed' by adding it to the Home Screen of the device.
animation object Settings for the launch screen animation.

type: The animation type.
duration: The animation duration in milliseconds.
timeout: The time until the animation is triggered.
install_prompt: 0 or 1, whether the visitor from a browser is prompted to install the app.

themes array An array of objects containing data on available templates.
pageIcon base64 A base-64 encoded PNG image for the 'page' tab.
mapIcon base64 A base-64 encoded PNG image for the 'map' tab.
blogIcon base64 A base-64 encoded PNG image for the 'blog' tab.
aboutappIcon base64 A base-64 encoded PNG image for the 'aboutapp' tab.
calendarIcon base64 A base-64 encoded PNG image for the 'calendar' tab.
socialIcon base64 A base-64 encoded PNG image for the 'social' tab.
videoIcon base64 A base-64 encoded PNG image for the 'video' tab.
photoIcon base64 A base-64 encoded PNG image for the 'photo' tab.
panelIcon base64 A base-64 encoded PNG image for the 'panel' tab.
formIcon base64 A base-64 encoded PNG image for the 'form' tab.
contactIcon base64 A base-64 encoded PNG image for the 'contact' tab.
directoryIcon base64 A base-64 encoded PNG image for the 'directory' tab.
proximityIcon base64 A base-64 encoded PNG image for the 'proximity' tab.
Example call app=json&m=theme_sync&site_key=[[SITE KEY HERE]]
Personal tools
Namespaces
Variants
Actions
Navigation
Toolbox