Skip to content

Instantly share code, notes, and snippets.

@afourney
Created December 17, 2016 07:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save afourney/c91db8937c27c034ac51ddba2163d057 to your computer and use it in GitHub Desktop.
Save afourney/c91db8937c27c034ac51ddba2163d057 to your computer and use it in GitHub Desktop.
loadAppToDeviceAndLocker
Native.send("loadAppToDeviceAndLocker", {
id: self.id,
uuid: self.uuid,
title: self.title,
list_image: self.list_image && self.list_image["144x144"],
icon_image: self.icon_image && self.icon_image["48x48"],
screenshot_image: self.screenshot_images && self.screenshot_images[0] && self.screenshot_images[0][self.screenshot_size],
type: self.type,
pbw_file: self.latest_release.pbw_file,
links: {
add: config.LEGACY_API_ROOT + "/applications/" + self.id + "/add",
remove: config.LEGACY_API_ROOT + "/applications/" + self.id + "/remove",
share: "http://apps.getpebble.com/applications/" + self.id
}
}, function(res) {
res.added_to_locker && (self.loading = !1, self.added = !0, self.companionPlatform !== enums.PLATFORM.NONE && (self.showModal = !0), Analytics.logAddPebbleApp(self)), self.forceRefresh()
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment