Public Profile
Overview
Section titled “Overview”Every user has a public-facing personal page that other authenticated users can view. The public profile shows the user’s display name, major, interests, created events/gigs, follower count, and following count.
Endpoint
Section titled “Endpoint”GET /api/v1/users/:id returns the public profile of user :id.
Visible Fields
Section titled “Visible Fields”| Field | Visibility |
|---|---|
| id | Public |
| displayName | Public |
| major | Public |
| gradYear | Public |
| interests | Public |
| followerCount | Public |
| followingCount | Public |
| createdEvents | Public (paginated) |
| isFollowing | Public (whether the authenticated user follows this user) |
| Private (only visible to the user themselves via /api/v1/users/me) |
Behaviors
Section titled “Behaviors”View Public Profile
Section titled “View Public Profile”Any authenticated user can view any other user’s public profile. The response includes whether the authenticated user currently follows this user (isFollowing boolean).
Created Events on Profile
Section titled “Created Events on Profile”The public profile includes the user’s created events/gigs (source = USER), paginated. Only OPEN and IN_PROGRESS events are shown (not CANCELLED or COMPLETED).
Profile Not Found
Section titled “Profile Not Found”If the user ID does not exist, the API responds with 404.
Scenarios
Section titled “Scenarios”S-PUB-1: View another user’s profile
Section titled “S-PUB-1: View another user’s profile”GIVEN user B exists with displayName "Brutus", major "CS", interests ["sports"]AND user B has 10 followers and follows 5 usersWHEN user A sends GET /api/v1/users/BTHEN the response contains displayName "Brutus", major "CS", interests ["sports"], followerCount 10, followingCount 5AND isFollowing indicates whether user A follows user BS-PUB-2: Email not visible on public profile
Section titled “S-PUB-2: Email not visible on public profile”GIVEN user B exists with email "brutus@osu.edu"WHEN user A sends GET /api/v1/users/BTHEN the response does not contain the email fieldS-PUB-3: Created events on profile
Section titled “S-PUB-3: Created events on profile”GIVEN user B created 3 events (2 OPEN, 1 CANCELLED)WHEN user A sends GET /api/v1/users/BTHEN the response includes 2 events (the OPEN ones)AND the CANCELLED event is not includedS-PUB-4: isFollowing is true
Section titled “S-PUB-4: isFollowing is true”GIVEN user A follows user BWHEN user A sends GET /api/v1/users/BTHEN isFollowing is trueS-PUB-5: isFollowing is false
Section titled “S-PUB-5: isFollowing is false”GIVEN user A does not follow user BWHEN user A sends GET /api/v1/users/BTHEN isFollowing is falseS-PUB-6: User not found
Section titled “S-PUB-6: User not found”GIVEN no user exists with id "nonexistent"WHEN user A sends GET /api/v1/users/nonexistentTHEN the API responds with 404 Not Found