Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

We've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

General Questions /

General questions about getting started with SilverStripe that don't fit in any of the categories above.

Moderators: martimiz, Sean, Ed, biapar, Willr, Ingo, swaiba

RestfulService Issue getting value of node with namespace


Go to End


931 Views

Avatar
Phill

Community Member, 81 Posts

12 February 2011 at 9:55am

Hey

I'm trying to build a module to communicate with a blogspot account.

The feed im using is http://ss-moduletest.blogspot.com/feeds/posts/default

I've included the method im using below i can get the author information but cant seem to access anything contained in a namespace.

I've checked the api documentation but couldn't work it out, any ideas?

public function GetPosts($iMaxResults=false,$iStartIndex,$iPublishedMin,$iPublishedMax) {
		$url ='http://ss-moduletest.blogspot.com/feeds/posts/default';
		$cache_expiry = 3600;
		$params = array();

		$blogger = new RestfulService($url,$cache_expiry);

		$blogger->setQueryString($params);
		$con = $blogger->connect();
		$dosAuthor = $blogger->getValues($con,'author');
		echo '<pre>';
			$x = $blogger->getValues($con,'openSearch:totalResults');
			print_r($x);
		echo '</pre>';
		return $blogger->getValues($con,'entry');
	}

http://api.silverstripe.org/2.4/sapphire/integration/RestfulService.html#methodgetValue