public function createPost($group_id, $title, $summary)
	{
		$token = $this->oauth->getToken();

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

		// Set the success response code.
		$this->oauth->setOption('success_code', 201);

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

		// Build xml.
		$xml = '<post><title>' . $title . '</title><summary>' . $summary . '</summary></post>';

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

		$header['Content-Type'] = 'text/xml';

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

		// Return the post id.
		$response = explode('posts/', $response->headers['Location']);

		return $response[1];
	}
public function createPost($group_id, $title, $summary)
	{
		$token = $this->oauth->getToken();

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

		// Set the success response code.
		$this->oauth->setOption('success_code', 201);

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

		// Build xml.
		$xml = '<post><title>' . $title . '</title><summary>' . $summary . '</summary></post>';

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

		$header['Content-Type'] = 'text/xml';

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

		// Return the post id.
		$response = explode('posts/', $response->headers['Location']);

		return $response[1];
	}
public function createPost ( $ group_id , $ title , $ summary ) { $ token = $ this -> oauth -> getToken ( ) ; // Set parameters. $ parameters = array ( 'oauth_token' => $ token [ 'key' ] ) ; // Set the success response code. $ this -> oauth -> setOption ( 'success_code' , 201 ) ; // Set the API base $ base = '/v1/groups/' . $ group_id . '/posts' ; // Build xml. $ xml = '<post><title>' . $ title . '</title><summary>' . $ summary . '</summary></post>' ; // Build the request path. $ path = $ this -> getOption ( 'api.url' ) . $ base ; $ header [ 'Content-Type' ] = 'text/xml' ; // Send the request. $ response = $ this -> oauth -> oauthRequest ( $ path , 'POST' , $ parameters , $ xml , $ header ) ; // Return the post id. $ response = explode ( 'posts/' , $ response -> headers [ 'Location' ] ) ; return $ response [ 1 ] ; }
Method to retrieve all comments of a post.

@param   string  $group_id  The unique identifier for a group.
@param   string  $title     Post title.
@param   string  $summary   Post summary.

@return  string  The created post's id.

@since   1.0
Method to retrieve all comments of a post .