com.main.campustream
Class APIs

java.lang.Object
  extended by com.main.campustream.APIs

public class APIs
extends java.lang.Object

Author:
Bryan Crabtree

Constructor Summary
APIs()
           
 
Method Summary
static java.lang.String FindFriends(java.lang.String friendUsername)
          Returns a list of users with the specified name (Partial Matching) as a json string,
static java.lang.String GetFriendList()
          Returns a list of users that the current user is following as a json string.
static java.lang.String GetNewsComments(java.lang.String id)
          Returns the comments on the specified new or event item as a json string.
static java.lang.String GetNewsList(java.lang.String section)
          Returns the specified section of news and events as a json string.
static java.lang.String GetNewsListSection(java.lang.String section, java.lang.String category)
          Returns the specified section of news and events as a json string.
static java.lang.String GetQuestionList(java.lang.String section, java.lang.String sorting)
          Returns a list of questions in the specified section with the specified sorting method as a json string.
static java.lang.String GetQuestionResponses(java.lang.String id)
          Returns the responses for the specified question as a json string.
static java.lang.String GetStream()
          Returns the 50 most recent public status messages as a json string.
static java.lang.String GetStreamComments(java.lang.String id)
          Returns the comments for the specified status update as a json string.
static java.lang.String GetUserActivity(java.lang.String userName)
          Returns a user's 50 most recent status messages as a json string.
static java.lang.String GetUserProfile(java.lang.String username)
          Returns a user's profile as a json string.
static java.lang.String GetUserStatus(java.lang.String userName)
          Returns the specified user's most recent status message as a json string.
static java.lang.String GetUserWithID(java.lang.String id)
          Returns the user with the specified ID as a json string.
static void rateNews(java.lang.String direction, java.lang.String id)
          Rates the specified news or event item up or down.
static void rateQuestion(java.lang.String direction, java.lang.String id)
          Rates the specified question response up or down.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

APIs

public APIs()
Method Detail

GetUserProfile

public static java.lang.String GetUserProfile(java.lang.String username)
Returns a user's profile as a json string.

Parameters:
username -
Returns:

GetFriendList

public static java.lang.String GetFriendList()
Returns a list of users that the current user is following as a json string.

Returns:

GetUserStatus

public static java.lang.String GetUserStatus(java.lang.String userName)
Returns the specified user's most recent status message as a json string.

Parameters:
userName -
Returns:

GetUserActivity

public static java.lang.String GetUserActivity(java.lang.String userName)
Returns a user's 50 most recent status messages as a json string.

Parameters:
userName -
Returns:

FindFriends

public static java.lang.String FindFriends(java.lang.String friendUsername)
Returns a list of users with the specified name (Partial Matching) as a json string,

Parameters:
friendUsername -
Returns:

GetStream

public static java.lang.String GetStream()
Returns the 50 most recent public status messages as a json string.

Returns:

GetQuestionList

public static java.lang.String GetQuestionList(java.lang.String section,
                                               java.lang.String sorting)
Returns a list of questions in the specified section with the specified sorting method as a json string.

Parameters:
section -
sorting -
Returns:

GetQuestionResponses

public static java.lang.String GetQuestionResponses(java.lang.String id)
Returns the responses for the specified question as a json string.

Parameters:
id -
Returns:

GetUserWithID

public static java.lang.String GetUserWithID(java.lang.String id)
Returns the user with the specified ID as a json string.

Parameters:
id -
Returns:

rateQuestion

public static void rateQuestion(java.lang.String direction,
                                java.lang.String id)
Rates the specified question response up or down.

Parameters:
direction - up OR down
id -

GetNewsList

public static java.lang.String GetNewsList(java.lang.String section)
Returns the specified section of news and events as a json string.

Parameters:
section -
Returns:

GetNewsListSection

public static java.lang.String GetNewsListSection(java.lang.String section,
                                                  java.lang.String category)
Returns the specified section of news and events as a json string.

Parameters:
section -
category -
Returns:

GetNewsComments

public static java.lang.String GetNewsComments(java.lang.String id)
Returns the comments on the specified new or event item as a json string.

Parameters:
id -
Returns:

rateNews

public static void rateNews(java.lang.String direction,
                            java.lang.String id)
Rates the specified news or event item up or down.

Parameters:
direction - up OR down
id -

GetStreamComments

public static java.lang.String GetStreamComments(java.lang.String id)
Returns the comments for the specified status update as a json string.

Parameters:
id -
Returns: