FlyFishFinder API

User

This API is responsible for executing data interactions against a Firebase user or set of users.

GET User

/api/user/getUser

Query

  • uid: uid of user

Retrieves a specific user by passing a uid parameter

GET App User

/api/user/getAppUser

Query

  • uid: uid of user

Retrieves the full user object for the authenticated user (requires matching x-user-id header)

POST Users

/api/user/getUsers

Body

  • No properties needed

Retrieves the full list of users excluding the requesting user

POST List Users

/api/user/listUsers

Body

  • No properties needed

Retrieves a simplified list of all users for display purposes (cached for 24 hours)

POST Retrieve User Network

/api/user/retrieveUserNetwork

Body

  • uid: uid of user
  • networkList: array of user connections

Retrieves the specified user's connection network

POST Send User Connect Request

/api/user/sendUserConnectRequest

Body

  • uid: uid of user requesting
  • requestedUID: uid of requested user

Sends a Connection Request from one user to another.

POST Accept User Connect Request

/api/user/acceptConnectionRequest

Body

  • requestedUID: uid of requested user
  • requestorUID: uid of requesting user
  • requestDate: date of the original ConnectionRequest and ConnectionRequestSent

Accepts a Connection Request from one user to another.

POST Remove User Connect Request

/api/user/removeUserConnectRequest

Body

  • uid1: uid of first user
  • uid2: uid of second user
  • type: "connectionRequests" || "connectionRequestsSent" from the perspective of uid1
  • requestDate: date of the original ConnectionRequest and ConnectionRequestSent

Removes a Connection Request from one user to another. Removes from the perspective of uid1 user - "connectionRequests" removes a connection request sent from another user. "connectionRequestsSent" removes a connection request sent by the user.

POST Remove Connection

/api/user/removeConnection

Body

  • uid1: uid of first user
  • uid2: uid of second user

Removes a connection between two users by removing each user from the other's connections array.

POST Block User

/api/user/blockUser

Body

  • blockRequestorUID: uid of requesting user
  • blockRequestedUID: uid of requested user to block

Blocks a specified user for the requesting user. This action will also remove the blocked/blocking users from each others network if present. Blocked and blocking users will not be viewable or show in any lists or searches for each other.

POST Unblock User

/api/user/unblockUser

Body

  • blockRequestorUID: uid of user who blocked
  • blockRequestedUID: uid of user to unblock

Unblocks a previously blocked user.

POST Update User

/api/user/updateUser

Body

  • uid: uid of user to update
  • userData: object containing user fields to update

Updates user information for the specified user.

POST Create User

/api/user/createUser

Body

  • User data object with required properties

Creates a new user in the system.