Campustream API

API format: http://api.campustream.com/1/ + API endpoint + .(json | xml)

User Endpoints

user/authorize

Retrieve the access token for the specified user.

  • Type: POST
  • Formats: Plain Text, JSON
  • Params:
    • username (required)
    • password (required, SHA1 hashed)

users/show

Retrieve information about the given user.

  • Type: GET or POST
  • Authentication: false
  • Formats: JSON, XML
  • Params:
    • username (required)

Status Endpoints

statuses/public_timeline

Retrieve the last (up to) 200 statuses from the public timeline.

  • Type: GET
  • Authentication: false
  • Formats: JSON
  • Params:
    • count (max # of statuses, 1 - 199, optional)

statuses/user_timeline

Retrieve the last (up to) 200 statuses for the specified user.

  • Type: GET
  • Authentication: false
  • Formats: JSON
  • Params:
    • username (required)
    • count (max # of statuses, 1 - 199, optional)

statuses/show

Retrieve information about the given status.

  • Type: GET
  • Authentication: false
  • Formats: JSON, XML
  • Params:
    • id (status id, required)

statuses/update

Posts a new status message for the authenticated user

  • Type: POST
  • Authentication: true
  • Formats: XML, JSON
  • Params:
    • message (required)
    • type (optional, (text or link for now)
    • public (optional, defaults to true)

statuses/comments

Retrieve all comments for the status posting

  • Type: GET
  • Authentication: false
  • Formats: XML, JSON
  • Params:
    • status_id (required)

Comment Endpoints

comments/update

Posts a comment for a given status.

  • Type: POST
  • Authentication: true
  • Formats: XML, JSON
  • Params:
    • status_id (required)
    • message (required)

Friendship Endpoints

friendships/show

Shows the relation between two given users. You must specify source and target user info, can use user ID or username for either.

  • Type: GET
  • Authentication: false
  • Formats: JSON, XML
  • Params:
    • source_id or source_username (required)
    • target_id or target_username (required)

friendships/create

Makes the authenticated user follow the given user. Returns the followed user.

  • Type: POST
  • Authentication: true
  • Formats: XML, JSON
  • Params:
    • user_id or username (required)

friendships/destroy

Makes the authenticated user unfollow the given user. Returns the unfollowed user.

  • Type: POST
  • Authentication: true
  • Formats: XML, JSON
  • Params:
    • user_id or username (required)

friendships/follows

Returns a list of users that the given user follows.

  • Type: GET
  • Authentication: false
  • Formats: JSON
  • Params:
    • user_id or username (required)

friendships/followers

Returns a list of users that follow the given user.

  • Type: GET
  • Authentication: false
  • Formats: JSON
  • Params:
    • user_id or username (required)

Collaboration Endpoints

collaborate/list

Lists questions in the current section.

  • Type: GET
  • Authentication: false
  • Formats: JSON, XML
  • Params:
    • section (academic, social, misc, campuswatch; optional)
    • sorting (last_updated, most_popular, newest, search; optional)
    • page (optional)

collaborate/show

Shows the given question and responses.

  • Type: GET
  • Authentication: false
  • Formats: XML, JSON
  • Params:
    • Must be one of the following present:
    • short_id (ID shown in URL; optional)
    • id (actual ID of question; optional)

collaborate/create

Creates a new question in the specified section.

  • Type: POST
  • Authentication: true
  • Formats: XML, JSON
  • Params:
    • title (question title; required)
    • category (question section/category; required)
    • message (question body; required)
    • public (0 = friends only, 1 = public stream; optional)

collaborate/respond

Post a response to a question.

  • Type: POST
  • Authentication: true
  • Formats: XML, JSON
  • Params:
    • Must have short_id or id
    • short_id (question short_id; optional)
    • id (question ID; optional)
    • message (question response body; required)
    • public (0 = friends only, 1 = public, 2 = question asker only; optional)

collaborate/vote

Vote a question response up or down.

  • Type: POST
  • Authentication: true
  • Formats: JSON, XML
  • Params:
    • id (response ID; required)
    • dir (up or down; required)

News & Events Endpoints

news/list

Retrieves a list of news/events that match the given criteria.

  • Type: GET
  • Authentication: false
  • Formats: JSON, XML
  • Params:
    • type (news or event; optional)
    • slug (category; optional, but must specify type)

news/show

Retrieves the specified news or event by ID.

  • Type: GET
  • Authentication: false
  • Formats: JSON, XML
  • Params:
    • id (news/event ID; required)
    • short_id (news/event short ID; required if id isn't given)

news/create

Creates a new news/event post.

  • Type: POST
  • Authentication: true
  • Formats: JSON, XML
  • Params:
    • title (required)
    • content (the link or text content; required)
    • category (ID of the category; required)
    • type (text or link; required)
    • event_location (events only, optional)
    • event_location_area (events only, optional)
    • event_all_day (1 or 0; events only, optional)
    • event_start_from_date (events only, optional)
    • event_start_from_hour (events only, optional)
    • event_start_from_minute (events only, optional)
    • event_start_from_ampm (am or pm; events only, optional)
    • event_start_to_date (events only, optional)
    • event_start_to_hour (events only, optional)
    • event_start_to_minute (events only, optional)
    • event_start_to_ampm (am or pm; events only, optional)

news/vote

Vote for the given news/event post.

  • Type: POST
  • Authentication: true
  • Formats: JSON, XML
    • id (ID of post; required)
    • dir (up or down; required)

news/create_comment

Posts a comment for the given news story

  • Type: POST
  • Authentication: true
  • Formats: JSON, XML
    • news_id (ID of post; required)
    • short_news_id (short ID of post; required if news_id isn't given)
    • reply_to (ID of comment this new one is replying to; optional if top-level comment)
    • content (comment content; required)

news/location_search

Autocomplete endpoint for location searching.

  • Type: GET
  • Authentication: false
  • Formats: JSON
    • q (search query; required)

Notification Endpoints

notifications/show

Retrieves all current notifications for the logged in user.

  • Type: POST
  • Authentication: true
  • Formats: JSON
  • Params: none