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 
List of available REST feeds  XML
Forum Index » Developer Corner
Author Message
MaxisDangerousYams


Multicellular

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

For more details and examples check out: www.sporeapi.com
(some of these are hot off the press so please report any problems you might find and we'll fix them)

Stats
http://www.spore.com/rest/stats

Achievements for user
http://www.spore.com/rest/assets/achievements/<Username>/<StartIndex>/<Length>
http://www.spore.com/rest/achievements/MaxisLucky/0/5

Profile Data for User
http://www.spore.com/rest/user/<Username>
http://www.spore.com/rest/user/MaxisDangerousYams

Assets for User
http://www.spore.com/rest/assets/user/<Username>/<StartIndex>/<Length>
http://www.spore.com/rest/assets/user/MaxisCactus/0/3

Buddies for User
http://www.spore.com/rest/users/buddies/<UserName>/<StartIndex>/<NumberOfBuddies>
Example: http://www.spore.com/rest/users/buddies/MaxisDangerousYams/0/10

Sporecasts for user
http://www.spore.com/rest/sporecasts/<UserName>
http://www.spore.com/rest/sporecasts/MaxisMichael

Assets for Sporecast
http://www.spore.com/rest/assets/sporecast/<Sporecast Id>/<StartIndex>/<Length>
http://www.spore.com/rest/assets/sporecast/500190457259/2/3

Info about an asset
http://www.spore.com/rest/asset/<AssetId>
http://www.spore.com/rest/asset/500005649853

Comments for an asset
http://www.spore.com/rest/comments/<AssetId>/<StartIndex>/<Length>
http://www.spore.com/rest/comments/500226147573/0/5

Stats for a Creature
http://www.spore.com/rest/creature/<CreatureAssetId>
http://www.spore.com/rest/creature/500005597433

Special Feeds
http://www.spore.com/rest/assets/search/<SpecialFeed>/ <Start Index>/ <Number Of Assets>
where <SpecialFeed> is one of these:
TOP_RATED - gets the all time top rated assets
TOP_RATED_NEW - gets the latest top rated assets
FEATURED - gets featured assets
MAXIS_MADE - gets assets made by Maxis creators
CUTE_AND_CREEPY - gets assets made with the creepy and cute pack
RANDOM - gets you some random assets
NEWEST - gets the latest stuff uploaded
The max number of returned items for Random per call is 20
For the other feeds, the max number of returned items per call is 50

Examples:
http://www.spore.com/rest/assets/search/TOP_RATED/3/2
http://www.spore.com/rest/assets/search/TOP_RATED_NEW/3/2
http://www.spore.com/rest/assets/search/NEWEST/3/2
http://www.spore.com/rest/assets/search/FEATURED/4/5
http://www.spore.com/rest/assets/search/MAXIS_MADE/6/7
http://www.spore.com/rest/assets/search/RANDOM/4/4
http://www.spore.com/rest/assets/search/CUTE_AND_CREEPY/3/8
http://www.spore.com/rest/assets/search/NEWEST/0/10

Special Feeds by type
Same as above, but you can specify a type.
http://www.spore.com/rest/assets/search/<SpecialFeed>/ <Start Index>/ <Number Of Assets>/<Type>
Eg. To get 5 latest featured UFOs
http://www.spore.com/rest/assets/search/FEATURED/0/5/UFO

This message was edited 4 times. Last update was at 02/03/2009 18:43:52

Thegreatgasman


Civilized Sporeon

Joined: 09/29/2008 05:16:40
Messages: 1390
Location:
Wherever you want me to be :)

Offline

I'm not sure how to interpret those links. When I click on them, HTML code is brought up along with numbers and words. What do they mean?


failsigbydidzo
MaxisDangerousYams


Multicellular

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

Here's a sample and some explanation about the XML data that the REST service returns
http://forum.spore.com/jforum/posts/list/17801.page
hattrickster


Spacefaring Sporeling

Joined: 10/31/2008 23:13:06
Messages: 8979
Offline

Helpful, thanks!

aim icon
Amans


Microbe

Joined: 01/14/2009 03:50:05
Messages: 2
Offline


Can you explain how I can use REST to query asset types for commodities (such as spice) needed or supplied by each world in my universe?

Thanks!
FutureFilms


Civilized Sporeon

Joined: 09/12/2008 11:22:27
Messages: 1128
Location:
Melbourne, Australia

Offline

Thanks very much DangerousYams, i don't have time to look at all this today but i'll start having a play tomorrow.

[Email] [WWW] aim icon [MSN]
MinionJoe


Civilized Sporeon

Joined: 09/19/2008 22:59:19
Messages: 4324
Offline

Amans wrote:Can you explain how I can use REST to query asset types for commodities (such as spice) needed or supplied by each world in my universe?


"Your universe" is not stored on Spore.com, therefore there is no feed for it.

MinionJoe's Current Status:


Times MinionJoe Has Been Banned: 2
Times MinionJoe's Opinion Has Changed: 0

"Wish in one hand. SPORE in the other. See which one fills up first."

"Hell is other people." -Jean-Paul Sartre
Amans


Microbe

Joined: 01/14/2009 03:50:05
Messages: 2
Offline

Thank you for your speedy reply!

Since REST isn't available, then is there another published API that will provide me with this information?

If not, then I'll need to analyze the locally stored game files to locate these attributes. I wouldn't mind a pointer or two towards the right files...

Thanks!
Snobau


Microbe

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

If I ask for x number of RANDOM items, I'm always getting 20... Is there something that I'm missing? I will want 16, and I can always loop through the first 16, but I would rather just get 16 so I don't have to do anything but look through my entire resultset.
MaxisDangerousYams


Multicellular

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

Yeah, RANDOM is a little weird.
You can give the feed any parameters but it will always return 20 random assets.

We know about this and will fix it soon.
The max. limit will still probably be 20, but we'll make it so you can get less than that if you want, through a parameter.
MaxisDangerousYams


Multicellular

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

Ok, RANDOM should be fixed now.

Max limit is still 20, but you can enter a number less than 20 for fewer results
Eg.
http://www.spore.com/rest/assets/search/RANDOM/0/5
if you want just 5 assets
coolhome


Microbe

Joined: 03/08/2009 14:52:06
Messages: 8
Location:
Ohio

Offline

Hello,
I have a question about the user info. In your API there is a field named 'name' and theres nothing there

http://www.spore.com/rest/user/MaxisDangerousYams



Is that feature coming, unavailable at the moment, or just broke?

Other then that nice API =)
[Email] [WWW] [MSN]
Lone helper


Civilized Sporeon

Joined: 02/17/2009 04:36:30
Messages: 1317
Location:
A series of 1's and 0's that make up my mind that controls my robotic implants

Offline

I get a <status>0</status>

But maby that's because i don't have any creations

Travian, click here and join!
I decided to made a creation, finally. Here's a link. First creation
MaxisMichael


Microbe

Joined: 09/15/2008 19:15:35
Messages: 28
Offline

Yes, there is no 'name' in that method's response.

I am guessing you get a <status>0</status> because you are not entering a valid username. Checking the spelling and capitalization counts.
Lone helper


Civilized Sporeon

Joined: 02/17/2009 04:36:30
Messages: 1317
Location:
A series of 1's and 0's that make up my mind that controls my robotic implants

Offline

Is there a way to sort type by their stats?

0 creations have 0 social total (you have to have a singing mouth)
50000 creations have 1 social total
And on and on...

Then could you refine that by say... Show the newest creation that has 5 jump?

Travian, click here and join!
I decided to made a creation, finally. Here's a link. First creation
 
Forum Index » Developer Corner
Go to:   
 
Powered by JForum 2.1.8 © ( EA Dev Build 2009-09-21 18:45:57 ) JForum Team