Skip to main content

Events

To subscribe to events, use storyManager.on or storyManager.once

storyManager.on(eventName, (payload) => {
console.log(eventName, payload);
});
Event NamePayload
storiesLoaded{}
ugcStoriesLoaded{}
clickOnStory{id: String, feed: String, index: Number}
showStory{id: String, feed: String, action: String}
closeStory{id: String, feed: String, index: Number, action: String}
showSlide{id: String, index: Number}
likeStory{id: String, feed: String, value: Boolean}
dislikeStory{id: String, feed: String, value: Boolean}
favoriteStory{id: String, feed: String, value: Boolean}
clickOnShareStory{}
storyWidgetEvent{id: String, feed: String, name: String, data: String }

Feed Events

EventPayload
storyListUpdate{stories: [StoryData]}
storyUpdateStoryData
favoritesUpdate{}
favoriteCellDidSelect{}
editorCellDidSelect{}
favoritesUpdate{}

Reader events

EventPayload
storyReaderWillShow{type: String}
storyReaderDidClose{type: String}
storiesDidUpdated{isContent: String, storyType: String}
scrollUpdate{index: String}

Failure events

EventPayload
sessionFailure{message: String}
storyFailure{message: String}
currentStoryFailure{message: String}
networkFailure{message: String}
requestFailure{message: String, statusCode: String}

Game Events

EventPayload
startGame{id: String, gameID: String}
closeGame{id: String, gameID: String}
eventGame{id: String, gameID: String, name: String, payload: Object}
gameFailure{id: String, gameID: String, message: String}
gameReaderWillShow{}
gameReaderDidClose{}
gameComplete{data: Object, result: String, url: String}

Goods events

EventPayload
goodItemSelected{sku: String}

Share events

EventPayload
customShare{}
onActionWith{}