NewsCloud Web Services
API Categories
Group Functions- groupCreate
- groupGetId
- groupGetInfo
- groupGetPhotoUrlFromImageId
- groupJoin
- groupLeave
- groupListMembers
- groupListStories
- groupListAll
- groupSetInfo
groupCreate
Create a group. Under special restriction.
Arguments
uid: the user id for this user
groupName: the name of the group
description: The body of the message for the user comment. Alternately, a description of a group.
tagList: a list of tags
isTest: Used for testing APIs that write to the database. When isTest is true, nothing gets written to the database.
REST Format:
http://api.newscloud.com/services/node.php?apikey=your-apikeyhere&method=groupCreate&groupName=New%20Test%20Group&uid=38&description=Fans of the Daily Show&tagList=funny jon+stewart&isTest=trueSpecial Restriction: Because this is an intensive or important write operation, this method is under tight restrictions to prevent spam and abuse. Please email us if you have a valid use for your Web site and would like your limit increased. In most cases, we will be glad to accomodate you.
groupGetId
Get groupid for a group by its name.
Arguments
groupName: the name of the group
REST Format:
http://api.newscloud.com/services/node.php?apikey=your-apikeyhere&method=groupGetId&groupName=Daily%20Show%20Fans
groupGetInfo
Get properties of a group by its groupid.
Arguments
groupid: the groupid for the group
REST Format:
http://api.newscloud.com/services/node.php?apikey=your-apikeyhere&method=groupGetInfo&groupid=81
groupGetPhotoUrlFromImageId
Private function in apiNewsCloud.class.php. Returns the url to a photo from an imageid.
Arguments
imageid: The imageid for the photo.
Usage:
$temp=$this->apiNewsCloud->groupGetPhotoUrlFromImageId($imageid)
<img src="'.$temp.'">
groupJoin
Add user to a group as a member
Arguments
groupid: the groupid for the group
uid: the user id for this user
REST Format:
http://api.newscloud.com/services/node.php?apikey=your-apikeyhere&method=groupJoin&groupid=81&uid=1
groupLeave
Remove a user from a group
Arguments
groupid: the groupid for the group
uid: the user id for this user
REST Format:
http://api.newscloud.com/services/node.php?apikey=your-apikeyhere&method=groupLeave&groupid=81&uid=1
groupListMembers
List the members of a group.
Arguments
groupid: the groupid for the group
startRow: the start row to begin the query
REST Format:
http://api.newscloud.com/services/node.php?apikey=your-apikeyhere&method=groupListMembers&groupid=81&startRow=0
groupListStories
List the recent stories for a group.
Arguments
groupid: the groupid for the group
startRow: the start row to begin the query
REST Format:
http://api.newscloud.com/services/node.php?apikey=your-apikeyhere&method=groupListStories&groupid=81&startRow=0
groupListAll
List all the groups in our directory.
Arguments
startRow: the start row to begin the query
REST Format:
http://api.newscloud.com/services/node.php?apikey=your-apikeyhere&method=groupListAll&startRow=0
groupSetInfo
Update properties of a group by its groupid. User must be the owner of the group. Requires account access.
Arguments
groupid: the groupid for the group
uid: the user id for this user
groupName: the name of the group
description: The body of the message for the user comment. Alternately, a description of a group.
tagList: a list of tags
REST Format:
http://api.newscloud.com/services/node.php?apikey=your-apikeyhere&method=groupSetInfo&groupid=81&groupName=Daily%20Show%20Fans&uid=38&description=Fans of the Daily Show&tagList=funny jon+stewartAccount Access: Because this method accesses a specific user account's private data, you either need to use the API key from the account of this user OR you must authenticate access to the user's account with userSignIn method before calling this function. Once signed in for this user's account, your session will last one hour.
groupCreate
Create a group. Under special restriction.
Arguments
uid: the user id for this user
groupName: the name of the group
description: The body of the message for the user comment. Alternately, a description of a group.
tagList: a list of tags
isTest: Used for testing APIs that write to the database. When isTest is true, nothing gets written to the database.
REST Format:
http://api.newscloud.com/services/node.php?apikey=your-apikeyhere&method=groupCreate&groupName=New%20Test%20Group&uid=38&description=Fans of the Daily Show&tagList=funny jon+stewart&isTest=trueSpecial Restriction: Because this is an intensive or important write operation, this method is under tight restrictions to prevent spam and abuse. Please email us if you have a valid use for your Web site and would like your limit increased. In most cases, we will be glad to accomodate you.
groupGetId
Get groupid for a group by its name.
Arguments
groupName: the name of the group
REST Format:
http://api.newscloud.com/services/node.php?apikey=your-apikeyhere&method=groupGetId&groupName=Daily%20Show%20FansgroupGetInfo
Get properties of a group by its groupid.
Arguments
groupid: the groupid for the group
REST Format:
http://api.newscloud.com/services/node.php?apikey=your-apikeyhere&method=groupGetInfo&groupid=81groupGetPhotoUrlFromImageId
Private function in apiNewsCloud.class.php. Returns the url to a photo from an imageid.
Arguments
imageid: The imageid for the photo.
Usage:
$temp=$this->apiNewsCloud->groupGetPhotoUrlFromImageId($imageid)<img src="'.$temp.'">
groupJoin
Add user to a group as a member
Arguments
groupid: the groupid for the group
uid: the user id for this user
REST Format:
http://api.newscloud.com/services/node.php?apikey=your-apikeyhere&method=groupJoin&groupid=81&uid=1groupLeave
Remove a user from a group
Arguments
groupid: the groupid for the group
uid: the user id for this user
REST Format:
http://api.newscloud.com/services/node.php?apikey=your-apikeyhere&method=groupLeave&groupid=81&uid=1groupListMembers
List the members of a group.
Arguments
groupid: the groupid for the group
startRow: the start row to begin the query
REST Format:
http://api.newscloud.com/services/node.php?apikey=your-apikeyhere&method=groupListMembers&groupid=81&startRow=0groupListStories
List the recent stories for a group.
Arguments
groupid: the groupid for the group
startRow: the start row to begin the query
REST Format:
http://api.newscloud.com/services/node.php?apikey=your-apikeyhere&method=groupListStories&groupid=81&startRow=0groupListAll
List all the groups in our directory.
Arguments
startRow: the start row to begin the query
REST Format:
http://api.newscloud.com/services/node.php?apikey=your-apikeyhere&method=groupListAll&startRow=0groupSetInfo
Update properties of a group by its groupid. User must be the owner of the group. Requires account access.
Arguments
groupid: the groupid for the group
uid: the user id for this user
groupName: the name of the group
description: The body of the message for the user comment. Alternately, a description of a group.
tagList: a list of tags
REST Format:
http://api.newscloud.com/services/node.php?apikey=your-apikeyhere&method=groupSetInfo&groupid=81&groupName=Daily%20Show%20Fans&uid=38&description=Fans of the Daily Show&tagList=funny jon+stewartAccount Access: Because this method accesses a specific user account's private data, you either need to use the API key from the account of this user OR you must authenticate access to the user's account with userSignIn method before calling this function. Once signed in for this user's account, your session will last one hour.
