NotificationCenter (<1.23.0)
Events
Events for loading the list of stories
StoriesLoaded- the list of stories has loaded,StoryViewis ready to work (fires every time the list is loaded, and also on refresh). TheuserInfocontains the fieldscount- number of stories andfeed- story feed identifier;UGCStoriesLoaded- the list of UGC stories has loaded,StoryUGCViewis ready to work (fires every time the list is loaded, and also on refresh). TheuserInfocontains the fieldscount- the number of stories andstories<Array<Dictionary<String, Any>>>- an array of dictionaries containing a brief description of uploaded stories;stories- each object in the list contains fieldsid- story id,title- title,tags- tags,slidesCount- number of slides,ugcPayload<Dictionary<String, Any>>- payload set at the creation of a story in the editor.
Events triggered after interacting with stories
Standard fields for all notification calls from story for userInfo are: id, title,tags, slidesCount, feed. If a user-created UGC feed is loaded, the ugcPayload<String(JSON)> field comes in addition.
ClickOnStory- click on story in the list with additional parameters:- place where the click came from (
listorfavorite);
- place where the click came from (
ShowStory- display of the story reader with additional parameters:source- place where the showing came from (direct,onboarding,listorfavorite);action- how the story is shown:open- opening a story (onboarding, single);auto- auto transition to the next story after finishing the current (timer on a last slide has expired);swipe- the transition via left/right swipe in the reader;tap- transition to the next story after a tap on the last slide of current story;custom- opening a story from another story via button on the slide.
CloseStory- closing story with additional parameters:index- index of the slide from which the closure occurred,action- closing action (swipe,click,autoorcustom),source- place where the closing came from (direct,onboarding,listorfavorite);
ClickOnButton- click on the button in the story with additional parameters:index- index of the slide from which the get link,link- string link;
ShowSlide- show slide with additional parameters:index- index of the slide that now show;payload- information from console parameters;
LikeStory- story like with additional parameters:index- index of the slide on which "like" was pressed,value- value of "like" position (true- is like,false- isn't like);DislikeStory- story dislike with additional parameters:index- index of the slide on which "dislike" was pressed,value- value of "dislike" position (true- is dislike,false- isn't dislike);
FavoriteStory- adding story to favorites with additional parameters:index- index of the slide on which "favorite" was pressed,value- value of "favorite" position (true- is favorite,false- isn't favorite);
ClickOnShareStory- pushing the share button with additional parameters:index- index of the slide on which "share" was pressed;
StoryWidgetEvent- action in widget with parameters:index- the index of the slide where the widget is located,widgetName- name of widget,data<Dictionary<String, Any>?>- activated widget data, detailed data fields;payload- information from console parameters;
Events coming from the game
StartGame- opening the reader with a game with additional parameters:index- index of the slide on which game starts;
CloseGame- closing the reader with a game with additional parameters:index- index of the slide on which game closes;
Errors
In error notifications, userInfo also comes in the form of a dictionary ["errorMessage": <Error_message_string>]
SessionFailure- session error;
Reasons:- session opening error;
- authorization key was not specified correctly;
- access is blocked;
StoryFailure- error in story;
Reasons:- error loading stories list (onboarding/single/tape);
- problems with decoding data from the server;
CurrentStoryFailure- error when loading full story information;
Reasons:- getting data for a specific story;
- setting/deleting likes, favorites, sharings;
NetworkFailure- network error;
Reasons:- no internet connection;
RequestFailure- аn error occurred when requesting the server;statusCode- the server returned a statuscode;