The Sporum - The Official Spore Forum
  [Search] Search   [Recent Topics] Recent Topics   [Hottest Topics] Hottest Topics   [Members]  Member Listing   [Groups] Back to forum index 

NOTE: The Sporum is migrating to EA’s Answers HQ forum environment. The Sporum is currently in Read-Only mode and will remain so for a period of time. For more information about the move and the new location, please see this post

Unofficial PHP Spore-API [v1.1.0] [3/9/09]  XML
Forum Index » Developer Corner
Author Message
PJAlva1

Microbe

Joined: 03/08/2009 19:15:57
Messages: 3
Offline

Hello everyone! Im coolhome (my screenname PJAlva1). I wrote my own SporeAPI which is in a class. It adds a lot more support then the normal Spore API.

Features:
  • All REST Feeds

  • Curl support

  • Debug support

  • Asset Subtype (magic numbers?) into a string

  • Probably a few more I forgot


  • Download [down]
    Current Version: 1.1.0
    Archive: 1.0.1 | 1.0.0

    Mirror [Up]
    Current Version: 1.1.0
    Archive: 1.0.1 | 1.0.0

    Changelog
    * =Changelog=
    * - version 1.1.0 | 3/9/09 6:00pm est
    * - Rewrote query function
    * - Added debug features
    * - Created private function _debug
    * - Added curl features
    * - Fixed UTF8 problem when data from spore's website (was known bug)
    *
    * - version 1.0.1 | 3/8/09 8:50pm est
    * - New function getSubtypeName, returns model type like Cell, Creature, Tribe Creature, Civilization Creature, Space creature, and so on.
    * - The functions getUserAssets, getSporecastAssets, getAssetInfo, and getSpecialFeed now return modelname
    *
    * - version 1.0.0 | 3/8/09
    * - Class was created.


    Please report all bugs and give me your thoughts and suggestions on this class =)

    - Preston Alvarado

    p.s. - Im 15 and a half

    This message was edited 8 times. Last update was at 03/14/2009 22:38:21

    coolhome

    Microbe

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

    Offline

    PJAlva1 wrote:I created my own Spore-API based off the real one. Mines in a class just the way I like it. Check it out

    http://coderzilla.net/spore/SporeAPI-source.php

    Ill write some documents for it later. If there are any bugs please report them. I also plan to create curl support but I haven't got there yet.

    - Preston

    I dont know why it posted that under my screenname but whatever. Anyways hers an update

    version 1.0.1 - http://coderzilla.net/spore/SporeAPI-source.php?v=1.0.1
    version 1.0.0 - http://coderzilla.net/spore/SporeAPI-source.php?v=1.0.0

    * - version 1.0.1 | 3/8/09 8:50pm est
    * - New function getSubtypeName, returns model type like Cell, Creature, Tribe Creature, Civilization Creature, Space creature, and so on.
    * - The functions getUserAssets, getSporecastAssets, getAssetInfo, and getSpecialFeed now return modelname
    [WWW] [MSN]
    MaxisMichael

    Microbe

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

    Wow, this is a big help. Thanks for your hard work!
    coolhome

    Microbe

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

    Offline

    MaxisMichael wrote:Wow, this is a big help. Thanks for your hard work!

    Thanks! I just created version 1.1.0. It adds curl / debug features. I also fixed a known bug.

    Now off to write documentation and examples.

    - Preston Alvarado
    [WWW] [MSN]
    MaxisMichael

    Microbe

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

    Can we link to your library off of the developer/php page?
    coolhome

    Microbe

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

    Offline

    MaxisMichael wrote:Can we link to your library off of the developer/php page?

    Sure I don't see why not. I did it to help people start there applications. Only thing I got to do now is write documents and an example or two but yeah. Go right ahead.

    p.s. - Can someone stick this topic?

    - Preston Alvarado

    This message was edited 1 time. Last update was at 03/11/2009 19:45:58

    [WWW] [MSN]
    svarogteuse

    Multicellular

    Joined: 09/25/2008 20:22:54
    Messages: 130
    Offline

    Using this I have created an small to show all the archtypes in a given sporecast. This should help in creating complete sporecasts. It only does the 1st 50 creatures in a cast right now and looks arnt the best but it does seem to work. Just enter a sporecast id and hit submit.

    The Archtypes in a Sporecast App


    MaxisDangerousYams

    Multicellular

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

    Wow you rock!!!
    Please post with screenshot in the "Made An App?" thread
    Great work.
    svarogteuse

    Multicellular

    Joined: 09/25/2008 20:22:54
    Messages: 130
    Offline

    Ok, I'll put a screen shot there once i get it cleaned up to look pretty.

    SporeMasterDog

    MouthBreather

    Joined: 03/02/2009 23:14:51
    Messages: 983
    Offline

    Wow this is great! It'd be helpful for the less resourceful people if you have a short guide on the page that explain how to find the sporecast ID.

    Will you be adding similar functionality for buildings and vehicles as well? I know it's a bit obvious but it'll be a great way to visualize the completeness of a sporecast.

    This message was edited 1 time. Last update was at 03/12/2009 20:52:28

    coolhome

    Microbe

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

    Offline

    SporeMasterDog wrote:Wow this is great! It'd be helpful for the less resourceful people if you have a short guide on the page that explain how to find the sporecast ID.

    Will you be adding similar functionality for buildings and vehicles as well? I know it's a bit obvious but it'll be a great way to visualize the completeness of a sporecast.


    Thanks! Well the only way to get a sporecast id is either by user input or with my function getUserSporecasts($Useranem). I need to write a guide / tutorial for my library to make it easier.

    What do you mean by adding functionality for buildings and vesicles? We can get all the details on all assets no what type. Just that creatures can go more in depth with getCreatureStats($CreatureID).

    - Preston Alvarado
    [WWW] [MSN]
    svarogteuse

    Multicellular

    Joined: 09/25/2008 20:22:54
    Messages: 130
    Offline

    Unfortunaly the get usersporecasts only gets the sporecasts subscribed to not the users own sporecasts. This cant be done with buildings, creatures are the only ones with Creature Archtypes.

    To find a sporecast id click on it from the let hand side when in the sporepedia (it need to be yours or a subscribed sporecast). Look at the url the end set of numbers is the sporecast id. I'm sure there are other ways too. but nothing I can find to say, type in a name and look it up.

    svarogteuse

    Multicellular

    Joined: 09/25/2008 20:22:54
    Messages: 130
    Offline

    Coolhome is ther some reason you didnt include the id and image informaiton in the getUserAssets function? I just beat my head against a wall an hour assuming they were there since they are in the REST feed. Are there any other functions missing data that are in the REST feeds?


    coolhome

    Microbe

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

    Offline

    svarogteuse wrote:Coolhome is ther some reason you didnt include the id and image informaiton in the getUserAssets function? I just beat my head against a wall an hour assuming they were there since they are in the REST feed. Are there any other functions missing data that are in the REST feeds?


    That has been noted and I will take a look at that once I get my server back up. My server has some corrupted files that is preventing the cpanel from working. We are working quickly to fix these. Once there fixed ill look up that issue. I was sure I put everything in there that is returned from the feed. However if its something you generate from the asset id to get the image url ill have to add that.

    In a few minutes ill put up a mirror on my files.

    - Preston Alvarado

    Now time to backup some files
    [WWW] [MSN]
     
    Forum Index » Developer Corner
    Go to:   
     
    Powered by JForum 2.1.8 © ( EA Dev Build 2018-08-14 15:53:40 ) JForum Team