Services - 071921-LTI/TRiPLNR-front GitHub Wiki

auth0-service

isAuthenticated()

Checks authentication returns boolean

getUser()

returns user

common-service

sendFriend()

sends the signal that the friends list should be updated

getFriend()

recieves the signal that the friends list should be updated

sendTrip()

sends the signal that the trips list should be updated

getTrip()

recieves the signal that the trips list should be updated

friend-request-service

newRequest()

creates post request passing through Friend request and token

getRequests()

gets request using Authorization header returns array of friend requests

accept()

put request to update friends list to contain new friend information

deny()

put request denys request

home-guard-service

canActivate()

keeps logged in users from navigating to the homepage

passenger-request-service

getRequests()

gets request using Authorization header returns array of passenger requests

accept()

put request updating trip with new passenger data

deny()

put request denying passenger request

route-guard-service

canActivate()

Keeps users who are not logged in from navigating to pages other then home

trip-service

getCoords()

get request to google maps api to get coordinates of address

create()

post request passing through trip object to be saved in database with headers of authorization start time and end time of trip

update()

put request passing through trip object to be updated in database with headers of authorization start time and end time of trip

getTrips()

get request returns all trips of current user

getTripsById()

get request returns trip of current user by unique tripId

user-service

update()

put request to update current user profile and preferences

getCurrentUser()

get request to get current user information

getUser()

get request to get specific user data by userId

getFriends()

get request, returns list of friends by current user

getProfiles()

get request, returns list of user profiles

getUsrBySub()

get request gets user by Auth0 generated sub key, mainly for authentication

createUser()

post request sends new User object with user submitted data and auto generated Auth0 sub

weather-service

getCurrentWeather()

get request to weather API using current address

getDestinationWeather()

get request to weather API using saved destination of a created trip