Class

streamActions

streamActions()

Constructor

# new streamActions()

We use this modules for calls to our backend API for actiosn relating to streams

View Source frontend/siinc-tv/src/stream/streamActions.js, line 9

Methods

# static acceptRequestToJoin(data)

Accepts a request to join stream from a user
Parameters:
Name Type Description
data * data of the request we want to reject

View Source frontend/siinc-tv/src/stream/streamActions.js, line 145

# static closeStream()

Closes the current user's stream

View Source frontend/siinc-tv/src/stream/streamActions.js, line 100

# static createNewStream(streamData)

Tries to create a new stream using the streamData and redirects to newly created page upon success Note: This will fail if now user is signed in/ or the user already has a current stream
Parameters:
Name Type Description
streamData * the data of the stream we wish to create

View Source frontend/siinc-tv/src/stream/streamActions.js, line 15

# static getAllStreamGroupsStreams(streamGroups)

Returns all the data regarding twitch streams of users in the streamGroups
Parameters:
Name Type Description
streamGroups * streamGroups to check data for

View Source frontend/siinc-tv/src/stream/streamActions.js, line 44

# static getStreamById(streamId)

Returns the data of the stream with given id
Parameters:
Name Type Description
streamId * id of the stream

View Source frontend/siinc-tv/src/stream/streamActions.js, line 30

# static getStreamsByStatus(page, status)

Finds all streams with a given status
Parameters:
Name Type Description
page * what page to request
status * stream status

View Source frontend/siinc-tv/src/stream/streamActions.js, line 89

# static getYoutubeVideoId(channelId)

Returns the live video id of the requested channel id,
Parameters:
Name Type Description
channelId * the id of the channel we are trying to get live video from

View Source frontend/siinc-tv/src/stream/streamActions.js, line 57

# static rejectRequestToJoin(data)

Rejects a request to join stream from a user
Parameters:
Name Type Description
data * data of the request we want to reject

View Source frontend/siinc-tv/src/stream/streamActions.js, line 131

# static requestToJoinStream(data, creatorId)

Sends a request from currently logged in user to join a stream Note: Requests are cached and are limited to one request per user every 2 minutes
Parameters:
Name Type Description
data * formatted data of the current user (which is verified in the backend)
creatorId * Id of the creator to send request to

View Source frontend/siinc-tv/src/stream/streamActions.js, line 117

string describing error if failed, otherwise a request is sent

# static searchStreams(searchString, page, status)

Searches all streams split to pages by a search string Searches tags/description/name
Parameters:
Name Type Description
searchString * string to search
page * what page to request
status * stream status

View Source frontend/siinc-tv/src/stream/streamActions.js, line 75