Module

Routes

This modules defines all the routes in our backend API

View Source backend/routes/routes.js, line 1

Members

# route Accept request to join stream

Route:
MethodPath
POST /api/streams/acceptRequestToJoin
Accepts a request to join stream
Body Parameters:
Name Type Description
data streamerData streamerData of the user to accept

View Source backend/routes/routes.js, line 252

# route Check Username

Route:
MethodPath
POST /api/userdata
Checks if a user with a given user name already exists.
Body Parameters:
Name Type Description
username String to get data of

View Source backend/routes/routes.js, line 69

# route Close stream

Route:
MethodPath
POST /api/streams/closeStream
Closes the user's current stream if it exists

View Source backend/routes/routes.js, line 208

# route Create stream

Route:
MethodPath
POST /api/user/createstream
Creates a stream with given details, user data must be valid.
Body Parameters:
Name Type Description
Data StreamData of the stream to create

View Source backend/routes/routes.js, line 126

# route Delete notification

Route:
MethodPath
POST /api/notifications/deleteNotification
Deletes a given notification from the logged in user
Body Parameters:
Name Type Description
notificationId String Id of the notification to delete

View Source backend/routes/routes.js, line 216

# route Delete notification

Route:
MethodPath
POST /api/notifications/clearNotifications
Deletess all clearable notifications from current users

View Source backend/routes/routes.js, line 225

# route Facebook Auth

Route:
MethodPath
GET /api/auth/facebook
Authenticates user using Facebook API

View Source backend/routes/routes.js, line 110

# route Facebook Auth callback

Route:
MethodPath
GET /api/auth/facebook/callback
Callback for Facebook auth

View Source backend/routes/routes.js, line 118

# route Get Stream By Id

Route:
MethodPath
POST /api/user/find_stream_data
Creates a stream with given details, user data must be valid.
Body Parameters:
Name Type Description
streamId String id of the stream to get data of

View Source backend/routes/routes.js, line 135

# route Get twitch streams

Route:
MethodPath
POST /api/twitch/get_streams
Returns all the data from twitch regarding the streams given
Body Parameters:
Name Type Description
streamGroups Array. List of all the groups of streamers to search data for

View Source backend/routes/routes.js, line 165

# route Get User

Route:
MethodPath
GET /api/user
Returns up-to-date data of the user logged in to the session.

View Source backend/routes/routes.js, line 52

# route Get User Data

Route:
MethodPath
POST /api/userdata
Get data regarding a specific user
Body Parameters:
Name Type Description
username String to get data of

View Source backend/routes/routes.js, line 60

# route Get YouTube Live video id by channel id

Route:
MethodPath
POST /api/youtube/getLiveVideoId
Returns all the data from twitch regarding the streams given
Body Parameters:
Name Type Description
ChannelId String of all the groups of streamers to search data for

View Source backend/routes/routes.js, line 174

# route Google Auth

Route:
MethodPath
GET /api/auth/google
Authenticates user using Google API

View Source backend/routes/routes.js, line 94

# route Google Auth callback

Route:
MethodPath
GET /api/auth/google/callback
Callback for Google auth

View Source backend/routes/routes.js, line 102

# route IsUserOnline

Route:
MethodPath
POST api/user/is_user_online
Check if user is online
Body Parameters:
Name Type Description
users userId id

View Source backend/routes/routes.js, line 285

# route Reject request to join stream

Route:
MethodPath
POST /api/streams/rejectRequestToJoin
Rejects a request to join stream
Body Parameters:
Name Type Description
data streamerData streamerData of the user to reject

View Source backend/routes/routes.js, line 243

# route Request to join stream

Route:
MethodPath
POST /api/streams/requestToJoinStream
Requests to join a stream of a given stream creator
Body Parameters:
Name Type Description
creatorId String Id of the creator of the stream to request to join
data streamerData streamerData of the user requesting to join

View Source backend/routes/routes.js, line 233

# route Search streams

Route:
MethodPath
POST /api/search/streams
Searches for streams by search string, return the page of results by page
Body Parameters:
Name Type Description
searchString String string to search streams by
page String to return
status String stream status

View Source backend/routes/routes.js, line 144

# route Search streams by status

Route:
MethodPath
POST /api/feed/streams
Returns page of all streams with status
Body Parameters:
Name Type Description
page String to return
status String stream status

View Source backend/routes/routes.js, line 155

# route Search users

Route:
MethodPath
POST /api/search/users
Searches for users by search string, return the page of results by page
Body Parameters:
Name Type Description
searchString String string to search users by
page String to return

View Source backend/routes/routes.js, line 183

# route Set Redirect Url

Route:
MethodPath
POST /api/auth/setRedirectUrl
Sets redirect URL in order to keep users logout/login on same page
Header Parameters:
Name Type Description
referer String URL to redirect to

View Source backend/routes/routes.js, line 193

# route Twitch Auth

Route:
MethodPath
GET /api/auth/twitch
Authenticates user using Twitch API

View Source backend/routes/routes.js, line 78

# route Twitch Auth callback

Route:
MethodPath
GET /api/auth/twitch/callback
Callback for Twitch auth

View Source backend/routes/routes.js, line 86

# route UpdateDescription

Route:
MethodPath
POST /api/user/update_field
Update users profile description
Body Parameters:
Name Type Description
id userId of user
new shortDescription description text

View Source backend/routes/routes.js, line 265

# route UpdateInterests

Route:
MethodPath
POST /api/user/update_interests
Update users interests
Body Parameters:
Name Type Description
id userId of user
interests interests list

View Source backend/routes/routes.js, line 275

# route User Login

Route:
MethodPath
POST /api/signin
Login using a local strategy.
Body Parameters:
Name Type Description
username String to login with
password String to login with

View Source backend/routes/routes.js, line 23

# route User Login

Route:
MethodPath
POST /api/signup
Sign up using a local strategy.
Body Parameters:
Name Type Description
username String to signup with
password String to signup with
email String to signup with

View Source backend/routes/routes.js, line 41

# route User Logout

Route:
MethodPath
POST /api/signout
Logout from currently logged in user, uses session data.

View Source backend/routes/routes.js, line 33