public function getProfile($id = null, $url = null, $fields = null, $type = 'standard', $language = null)
	{
		$token = $this->oauth->getToken();

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

		// Set the API base
		$base = '/v1/people/';

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

		// Check if a member id is specified.
		if ($id)
		{
			$base .= 'id=' . $id;
		}
		elseif (!$url)
		{
			$base .= '~';
		}

		// Check if profile url is specified.
		if ($url)
		{
			$base .= 'url=' . $this->oauth->safeEncode($url);

			// Choose public profile
			if (!strcmp($type, 'public'))
			{
				$base .= ':public';
			}
		}

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

		// Check if language is specified.
		$header = array();

		if ($language)
		{
			$header = array('Accept-Language' => $language);
		}

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

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

		return json_decode($response->body);
	}
public function getProfile($id = null, $url = null, $fields = null, $type = 'standard', $language = null)
	{
		$token = $this->oauth->getToken();

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

		// Set the API base
		$base = '/v1/people/';

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

		// Check if a member id is specified.
		if ($id)
		{
			$base .= 'id=' . $id;
		}
		elseif (!$url)
		{
			$base .= '~';
		}

		// Check if profile url is specified.
		if ($url)
		{
			$base .= 'url=' . $this->oauth->safeEncode($url);

			// Choose public profile
			if (!strcmp($type, 'public'))
			{
				$base .= ':public';
			}
		}

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

		// Check if language is specified.
		$header = array();

		if ($language)
		{
			$header = array('Accept-Language' => $language);
		}

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

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

		return json_decode($response->body);
	}
public function getProfile ( $ id = null , $ url = null , $ fields = null , $ type = 'standard' , $ language = null ) { $ token = $ this -> oauth -> getToken ( ) ; // Set parameters. $ parameters = array ( 'oauth_token' => $ token [ 'key' ] , ) ; // Set the API base $ base = '/v1/people/' ; $ data [ 'format' ] = 'json' ; // Check if a member id is specified. if ( $ id ) { $ base .= 'id=' . $ id ; } elseif ( ! $ url ) { $ base .= '~' ; } // Check if profile url is specified. if ( $ url ) { $ base .= 'url=' . $ this -> oauth -> safeEncode ( $ url ) ; // Choose public profile if ( ! strcmp ( $ type , 'public' ) ) { $ base .= ':public' ; } } // Check if fields is specified. if ( $ fields ) { $ base .= ':' . $ fields ; } // Check if language is specified. $ header = array ( ) ; if ( $ language ) { $ header = array ( 'Accept-Language' => $ language ) ; } // Build the request path. $ path = $ this -> getOption ( 'api.url' ) . $ base ; // Send the request. $ response = $ this -> oauth -> oauthRequest ( $ path , 'GET' , $ parameters , $ data , $ header ) ; return json_decode ( $ response -> body ) ; }
Method to get a member's profile.

@param   string  $id        Member id of the profile you want.
@param   string  $url       The public profile URL.
@param   string  $fields    Request fields beyond the default ones.
@param   string  $type      Choosing public or standard profile.
@param   string  $language  A comma separated list of locales ordered from highest to lowest preference.

@return  array  The decoded JSON response

@since   1.0
Method to get a member s profile .