public function getDiscussions($id, $fields = null, $start = 0, $count = 0, $order = null, $category = 'discussion', $modifiedSince = null)
	{
		$token = $this->oauth->getToken();

		// Set parameters.
		$parameters = array(
			'oauth_token' => $token['key'],
		);

		// Set the API base
		$base = '/v1/groups/' . $id . '/posts';

		$data['format'] = 'json';

		// Check if fields is specified.
		if ($fields)
		{
			$base .= ':' . $fields;
		}

		// Check if start is specified.
		if ($start > 0)
		{
			$data['start'] = $start;
		}

		// Check if count is specified.
		if ($count > 0)
		{
			$data['count'] = $count;
		}

		// Check if order is specified.
		if ($order)
		{
			$data['order'] = $order;
		}

		// Check if category is specified.
		if ($category)
		{
			$data['category'] = $category;
		}

		// Check if modified_since is specified.
		if ($modifiedSince)
		{
			$data['modified-since'] = $modifiedSince;
		}

		// Build the request path.
		$path = $this->getOption('api.url') . $base;

		// Send the request.
		$response = $this->oauth->oauthRequest($path, 'GET', $parameters, $data);

		return json_decode($response->body);
	}
public function getDiscussions($id, $fields = null, $start = 0, $count = 0, $order = null, $category = 'discussion', $modifiedSince = null)
	{
		$token = $this->oauth->getToken();

		// Set parameters.
		$parameters = array(
			'oauth_token' => $token['key'],
		);

		// Set the API base
		$base = '/v1/groups/' . $id . '/posts';

		$data['format'] = 'json';

		// Check if fields is specified.
		if ($fields)
		{
			$base .= ':' . $fields;
		}

		// Check if start is specified.
		if ($start > 0)
		{
			$data['start'] = $start;
		}

		// Check if count is specified.
		if ($count > 0)
		{
			$data['count'] = $count;
		}

		// Check if order is specified.
		if ($order)
		{
			$data['order'] = $order;
		}

		// Check if category is specified.
		if ($category)
		{
			$data['category'] = $category;
		}

		// Check if modified_since is specified.
		if ($modifiedSince)
		{
			$data['modified-since'] = $modifiedSince;
		}

		// Build the request path.
		$path = $this->getOption('api.url') . $base;

		// Send the request.
		$response = $this->oauth->oauthRequest($path, 'GET', $parameters, $data);

		return json_decode($response->body);
	}
public function getDiscussions ( $ id , $ fields = null , $ start = 0 , $ count = 0 , $ order = null , $ category = 'discussion' , $ modifiedSince = null ) { $ token = $ this -> oauth -> getToken ( ) ; // Set parameters. $ parameters = array ( 'oauth_token' => $ token [ 'key' ] , ) ; // Set the API base $ base = '/v1/groups/' . $ id . '/posts' ; $ data [ 'format' ] = 'json' ; // Check if fields is specified. if ( $ fields ) { $ base .= ':' . $ fields ; } // Check if start is specified. if ( $ start > 0 ) { $ data [ 'start' ] = $ start ; } // Check if count is specified. if ( $ count > 0 ) { $ data [ 'count' ] = $ count ; } // Check if order is specified. if ( $ order ) { $ data [ 'order' ] = $ order ; } // Check if category is specified. if ( $ category ) { $ data [ 'category' ] = $ category ; } // Check if modified_since is specified. if ( $ modifiedSince ) { $ data [ 'modified-since' ] = $ modifiedSince ; } // Build the request path. $ path = $ this -> getOption ( 'api.url' ) . $ base ; // Send the request. $ response = $ this -> oauth -> oauthRequest ( $ path , 'GET' , $ parameters , $ data ) ; return json_decode ( $ response -> body ) ; }
Method to get dicussions for a group.

@param   string   $id             The unique identifier for a group.
@param   string   $fields         Request fields beyond the default ones.
@param   integer  $start          Starting location within the result set for paginated returns.
@param   integer  $count          The number of results returned.
@param   string   $order          Sort order for posts. Valid for: recency, popularity.
@param   string   $category       Category of posts. Valid for: discussion
@param   string   $modifiedSince  Timestamp filter for posts created after the specified value.

@return  array  The decoded JSON response

@since   1.0
Method to get dicussions for a group .