Skip to main content

List User Favorites

List all clubs the authenticated user has favorited

Authentication

Required

Response Fields

club
object
required
Full club object (uses ClubListSerializer)
person
integer
User ID (hidden in response)
created_at
datetime
When club was favorited

Example Request

curl https://pennclubs.com/api/favorites/ \
  -H "Authorization: Bearer YOUR_TOKEN"

Example Response

[
  {
    "club": {
      "code": "pppjo",
      "name": "Penn Labs",
      "subtitle": "Building software for the Penn community",
      "image_url": "https://pennclubs.com/media/clubs/pppjo.png",
      "active": true,
      "tags": [{"id": 1, "name": "Technology"}]
    },
    "created_at": "2024-09-01T12:00:00Z"
  }
]

Favorite a Club

Add a club to user's favorites

Authentication

Required

Request Body

club
string
required
Club code to favorite

Response

Returns the created favorite object

Example Request

curl -X POST https://pennclubs.com/api/favorites/ \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"club": "pppjo"}'

Example Response

{
  "club": {
    "code": "pppjo",
    "name": "Penn Labs",
    "subtitle": "Building software for the Penn community"
  },
  "created_at": "2024-09-15T14:30:00Z"
}

Unfavorite a Club

Remove a club from user's favorites

Authentication

Required

Path Parameters

id
integer
required
Favorite ID

Response

Returns 204 No Content on success

Example Request

curl -X DELETE https://pennclubs.com/api/favorites/123/ \
  -H "Authorization: Bearer YOUR_TOKEN"

Get Favorite Events Calendar

Get iCalendar feed of events from favorited clubs

Authentication

Required

Response

Returns iCalendar (.ics) format feed containing events from all favorited clubs

Example Request

curl https://pennclubs.com/api/favouriteevents/ \
  -H "Authorization: Bearer YOUR_TOKEN"

List User Subscriptions

List all clubs the authenticated user is subscribed to

Authentication

Required

Response Fields

club
object
required
Full club object
person
integer
User ID (hidden)
created_at
datetime
When user subscribed

Example Request

curl https://pennclubs.com/api/subscriptions/ \
  -H "Authorization: Bearer YOUR_TOKEN"

Example Response

[
  {
    "club": {
      "code": "pppjo",
      "name": "Penn Labs",
      "enables_subscription": true
    },
    "created_at": "2024-08-20T10:15:00Z"
  }
]

Subscribe to Club

Subscribe to a club's email updates

Authentication

Required

Request Body

club
string
required
Club code to subscribe to

Response

Returns the created subscription object

Notes

  • Club must have enables_subscription: true
  • User’s email will be visible to club officers
  • Club can send recruitment and event updates to subscribers

Example Request

curl -X POST https://pennclubs.com/api/subscriptions/ \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"club": "pppjo"}'

Unsubscribe from Club

Unsubscribe from a club's emails

Authentication

Required

Path Parameters

id
integer
required
Subscription ID

Response

Returns 204 No Content on success

Example Request

curl -X DELETE https://pennclubs.com/api/subscriptions/456/ \
  -H "Authorization: Bearer YOUR_TOKEN"

View Club Subscribers

View list of users subscribed to the club (club officers only)

Authentication

Required - must be club officer or owner

Path Parameters

club_code
string
required
Club code identifier

Response Fields

name
string
Subscriber’s full name
username
string
Subscriber’s username
email
string
Subscriber’s email address
school
array
Array of school objects
major
array
Array of major objects
graduation_year
integer
Expected graduation year
created_at
datetime
When user subscribed

Example Request

curl https://pennclubs.com/api/clubs/pppjo/subscriptions/ \
  -H "Authorization: Bearer YOUR_TOKEN"

Example Response

[
  {
    "name": "Jane Smith",
    "username": "janesmith",
    "email": "[email protected]",
    "school": [{"id": 1, "name": "Engineering"}],
    "major": [{"id": 5, "name": "Computer Science"}],
    "graduation_year": 2025,
    "created_at": "2024-09-01T08:30:00Z"
  }
]

Favorites vs Subscriptions

Favorites

  • Purpose: Personal bookmarking/following clubs
  • Visibility: Private to the user
  • Data Shared: None - clubs don’t see who favorited them
  • Use Case: Keep track of clubs you’re interested in
  • Features:
    • Appears in “My Clubs” on user profile
    • Can export favorited events to calendar
    • Counts shown on club pages

Subscriptions

  • Purpose: Receive email updates from clubs
  • Visibility: Club officers can see subscribers
  • Data Shared: Name, email, school, major, graduation year
  • Use Case: Get recruitment and event notifications
  • Features:
    • Club can send targeted emails
    • Shows interest/engagement to club
    • Can be used for application mailing lists

When to Use Each

  • Favorite: Want to follow a club privately
  • Subscribe: Want to receive emails and show interest to club
  • Both: Most engaged members do both

Build docs developers (and LLMs) love