The Sporum - The Official Spore Forum
  [Search] Search   [Recent Topics] Recent Topics   [Hottest Topics] Hottest Topics   [Members]  Member Listing   [Groups] Back to forum index 
[Login] Login 
Stuck while using the Spore API? Post a question  XML
Forum Index » Developer Corner
Author Message
Snobau


Microbe

Joined: 11/01/2008 09:18:18
Messages: 17
Offline

As long as they are unique, I guess it's 6 of 1 1/2 dozen of the other.. They are case sensetive, but as long as I'm uisng the Author from the REST feed, I should be OK.

Are you planning on using the UserID for any future feeds? I would assume you are since there are not any that are using the UserID right now, but you have an article on how to find the UserID.


LOL... PS... Your forum displays a different username depending on where you log in from... If you log in directly from www.spore.com/forum, you get the last username that is associated with the last ScreenName you setup... At least that's how I'm guessing you have it setup as the username that came up here is my wife's screenname (Snobau)... And when you login via www.spore.com and navigate to the forums you get the username that is associated with your account (JoeyBagOfDonuts)...
MaxisDangerousYams


Multicellular

Joined: 10/20/2008 18:30:28
Messages: 141
Offline

The buddies feed uses the username right now...
http://www.spore.com/rest/users/buddies/<Username>/<StartIndex>/<Length>
http://www.spore.com/rest/users/buddies/MaxisDangerousYams/0/10

Are you planning on using the UserID for any future feeds?


Yes.
In the future (tomorrow actually) we'll be releasing
assets for user
achievements for user
profile data for user
... all based on the username
HirameHito


Multicellular

Joined: 01/11/2009 16:51:32
Messages: 160
Offline

What exactly is a rigblock? I checked the help portion of the site and came up with no results.
Snobau


Microbe

Joined: 11/01/2008 09:18:18
Messages: 17
Offline

http://www.spore.com/rest/assets/search/TOP_RATED/90/150

returns invalid XML which causes the feed to stop
MaxisDangerousYams


Multicellular

Joined: 10/20/2008 18:30:28
Messages: 141
Offline

What exactly is a rigblock?

A rigblock just means a part in the editors... a mouth, a grasper, a roof ... just any block in the editors is called a rigblock.
dragoonreas


Microbe

Joined: 10/17/2008 06:58:51
Messages: 61
Location:
Sydney, Australia

Offline

Snobau wrote:http://www.spore.com/rest/assets/search/TOP_RATED/90/150

returns invalid XML which causes the feed to stop

I think your requesting too many assets. The maximum number of assets you can request is 50 for all the sporepedia based feeds, except the Random feed with which the maximum is 20.

I can't remember if the feed gets automatically truncated if you request more than the maximum amount of assets, or if it causes the invalid XML your getting, and I can't test it as the feeds seem to be being updated (which might be another reason for the error your getting).

Snobau


Microbe

Joined: 11/01/2008 09:18:18
Messages: 17
Offline

Even 20 assets returned via http://www.spore.com/rest/assets/search/TOP_RATED/90/110

returns

- <asset>
<id>500257436646</id>
<name>Demon Dragon</
The XML page cannot be displayed

Cannot view XML input using XSL style sheet. Please correct the error and then click the Refresh button, or try again later.


--------------------------------------------------------------------------------

An invalid character was found in text content. Error processing resource 'http://www.spore.com/rest/assets/search/TOP_RATE...

<parent>NULL</parent></asset><asset><id>500239524324</id><name>Somafin</name>...
class="t">name>
<author>werderfan2012</author>
<created>2009-01-24 11:30:51.395</created>
<rating>86.53845</rating>
<type>CREATURE</type>

PS... I was able to return 500 assets using
http://www.spore.com/rest/assets/search/CUTE_AND_CREEPY/0/500
Well, I didn't count them... Maybe there were less than 500, but the count comes back as
- <assets>
<input>CUTE_AND_CREEPY</input>
<count>500</count>
- <asset>

and I counted at least 50 and only made it 1/100 of the way down the page
MaxisDangerousYams


Multicellular

Joined: 10/20/2008 18:30:28
Messages: 141
Offline

http://www.spore.com/rest/assets/search/TOP_RATED/90/150

returns invalid XML which causes the feed to stop


Hmm.. I've been trying to hit that feed all day today but haven't gotten an error yet.
It could be an unhandled character in a certain user or asset name, but that's a wild guess.
The max limit is 500

PM me the exact error if it happens again.
Thanks.

Also, there are new developments regarding your question about query by model type
Check this out:
http://forum.spore.com/jforum/posts/list/17803.page#399317

and for the Sporenament, you might find this new puppy useful
http://www.spore.com/rest/creature/<CreatureAssetId>
http://www.spore.com/rest/creature/500005597433
MaxisDangerousYams


Multicellular

Joined: 10/20/2008 18:30:28
Messages: 141
Offline

Wow... we posted at the same time!
Thanks for posting the error message.
Having a look...
MaxisDangerousYams


Multicellular

Joined: 10/20/2008 18:30:28
Messages: 141
Offline

Cannot view XML input using XSL style sheet.


Hmm... looks like the XSL is having trouble transforming our XML.
It loads up fine as raw XML in firefox, but I noticed that we don't have an XML header in our feeds which could be tripping your XML transformer.

Try copying to a local xml file and adding...
<?xml version="1.0" encoding="UTF-8"?>
at the top and then see if you can parse it.

Meanwhile we'll add <?xml version="1.0" encoding="UTF-8"?> to our REST feeds as soon as possible
Snobau


Microbe

Joined: 11/01/2008 09:18:18
Messages: 17
Offline

Just so we are on the same page... Just hitting the URL http://www.spore.com/rest/assets/search/TOP_RATED/90/110 with IE8...

These URLs do not cause an error
http://www.spore.com/rest/assets/search/TOP_RATED/100/6
http://www.spore.com/rest/assets/search/TOP_RATED/105/1

but these will
http://www.spore.com/rest/assets/search/TOP_RATED/100/7
http://www.spore.com/rest/assets/search/TOP_RATED/105/2

What is the 106th (or is it 107th) asset? Could the user have put one of the illegal chars in <>"' etc... in the Author or Name?
MaxisDangerousYams


Multicellular

Joined: 10/20/2008 18:30:28
Messages: 141
Offline

ok, apparently IE does not like the å character in that username
Troågg Grunt

It works fine in Firefox... does your application's parsing break because of this?
HirameHito


Multicellular

Joined: 01/11/2009 16:51:32
Messages: 160
Offline

MaxisDangerousYams wrote:
A rigblock just means a part in the editors... a mouth, a grasper, a roof ... just any block in the editors is called a rigblock.


Ohhhhhh ok. Thanks for the information!

My Profile Page

HirameHito or = FlounderMan
Snobau


Microbe

Joined: 11/01/2008 09:18:18
Messages: 17
Offline

MaxisDangerousYams wrote:ok, apparently IE does not like the å character in that username
Troågg Grunt

It works fine in Firefox... does your application's parsing break because of this?


Yams:
I would have to test to see if my app's parsing breaks... I doubt it... I only reported it b/c I saw it while looking through some of the feeds and saw the issue.
JoeyBagOfDonuts


Microbe

Joined: 09/13/2008 12:08:12
Messages: 34
Offline

Snobau wrote:As long as they are unique, I guess it's 6 of 1 1/2 dozen of the other.. They are case sensetive, but as long as I'm uisng the Author from the REST feed, I should be OK.

Are you planning on using the UserID for any future feeds? I would assume you are since there are not any that are using the UserID right now, but you have an article on how to find the UserID.


LOL... PS... Your forum displays a different username depending on where you log in from... If you log in directly from www.spore.com/forum, you get the last username that is associated with the last ScreenName you setup... At least that's how I'm guessing you have it setup as the username that came up here is my wife's screenname (Snobau)... And when you login via www.spore.com and navigate to the forums you get the username that is associated with your account (JoeyBagOfDonuts)...


Well, I'm back to my original request of asking if we can get the UserID as one of the params of the REST feeds... Seems like I need it to display your webpage of a user's assets.. Example

http://www.spore.com/sporepedia#qry=usr-JoeyBagOfDonuts|2262934961

I have the username as part of the feed, but without the ID, I am unable to navigate to your page. I could get the ID but that would require me to make 16 additional calls per Sporenament in order to get them. Any way you could add it?
 
Forum Index » Developer Corner
Go to:   
 
Powered by JForum 2.1.8 © ( EA Dev Build 2016-08-15 15:16:49 ) JForum Team