TMXInfoSearcher class

This is the place where you can find everything related to the dedicated server, control scripts and community tools.

Moderators: Pit Crew, TM-Patrol

Post Reply
Xymph
Pit Crew
Pit Crew
Posts: 5645
Joined: 19 Aug 2007 12:58
Owned TM-games: TMN, TMU, TMF, TM²
Contact:

TMXInfoSearcher class

Post by Xymph » 12 Jul 2008 00:12

The new TMX Info Searcher class released with XAseco v1.01 is also available for download separately. This class works a bit differently than my InfoFetcher classes, because searching TMX can return a variable number of results. Therefore I built it as an Iterator class, meaning the object returned by instantiating the class with some search parameters can by looped over in a 'foreach' statement, which automatically causes each track "value" to be delivered as an TMXInfo object itself, allowing for easy use of all the track data.

Lots of fancy words :wink:, so perhaps the easiest way to understand how to use this class is a look at the simple driver script that's included in the download, from which this is excerpted:

Code: Select all

        $tmx = new TMXInfoSearcher($game, $name, $author, $env, $recent);
        // check for any results
        if ($tmx->valid()) {
                // display all results
                foreach ($tmx as $key => $value) {
                        echo "key: $key\n";
                        echo "value: ";
                        print_r($value);
                        echo "\n";
                }
        } else {
                echo "not found\n";
        }
Hope this is of use to other programmers. And the new ShareMania Info Fetcher class is also separately available.
Developer of XASECO for TMF/TMN ESWC & XASECO2 for TM²: see XAseco.org
Find your way around the Mania community from the TMN ESWC hub, TMF hub, TM² hub, and SM hub

User avatar
soehest
happy cruiser
happy cruiser
Posts: 160
Joined: 07 Jun 2007 13:52
Owned TM-games: TMU
Contact:

Re: TMXInfoSearcher class

Post by soehest » 17 Jul 2008 16:55

Xymph wrote:The new TMX Info Searcher class released with
...
Hope this is of use to other programmers. And the new ShareMania Info Fetcher class is also separately available.
Great addition which i am sure someone will find great use for. I am working on something using this Searcher class so i will probably will you later :D

Regards

Xymph
Pit Crew
Pit Crew
Posts: 5645
Joined: 19 Aug 2007 12:58
Owned TM-games: TMN, TMU, TMF, TM²
Contact:

Re: TMXInfoSearcher class

Post by Xymph » 17 Jul 2008 21:41

soehest wrote:
Xymph wrote:The new TMX Info Searcher class released with
...
Hope this is of use to other programmers. And the new ShareMania Info Fetcher class is also separately available.
Great addition which i am sure someone will find great use for. I am working on something using this Searcher class so i will probably will you later :D
Thanks. So you will will me? Should I be afraid now? :o
Developer of XASECO for TMF/TMN ESWC & XASECO2 for TM²: see XAseco.org
Find your way around the Mania community from the TMN ESWC hub, TMF hub, TM² hub, and SM hub

User avatar
soehest
happy cruiser
happy cruiser
Posts: 160
Joined: 07 Jun 2007 13:52
Owned TM-games: TMU
Contact:

Re: TMXInfoSearcher class

Post by soehest » 18 Jul 2008 07:59

Xymph wrote:
soehest wrote:
Xymph wrote:The new TMX Info Searcher class released with
...
Hope this is of use to other programmers. And the new ShareMania Info Fetcher class is also separately available.
Great addition which i am sure someone will find great use for. I am working on something using this Searcher class so i will probably will you later :D
Thanks. So you will will me? Should I be afraid now? :o
Haha, yes you really should be very afraid :-) To be will'ed is not a nice thing :roflol: Actually I wanted to type i would bug you later, but managed to get it to work. My first expierience with objects in php (not as kinky as it sounds) Now i only need to learn som html but that is beoynd the scope if this thread :-)

Xymph
Pit Crew
Pit Crew
Posts: 5645
Joined: 19 Aug 2007 12:58
Owned TM-games: TMN, TMU, TMF, TM²
Contact:

Re: TMXInfoSearcher class

Post by Xymph » 25 Jun 2009 08:54

I discovered that for the past year I misinterpreted one of the fields in one of TMX's API links. The necessary corrections to both the TMXInfoFetcher class (v1.12) and the TMXInfoSearcher class (v1.3) are now available in the usual place. Programmers using either or both classes are advised to upgrade.

Edit: for further updates to these classes, see this related thread.
Developer of XASECO for TMF/TMN ESWC & XASECO2 for TM²: see XAseco.org
Find your way around the Mania community from the TMN ESWC hub, TMF hub, TM² hub, and SM hub

Fleppie
Pit Crew
Pit Crew
Posts: 18
Joined: 08 Aug 2008 22:02
Owned TM-games: TMNF TMN TMU
Location: Dordrecht, Zuid-Holland, The Netherlands

Re: TMXInfoSearcher class

Post by Fleppie » 25 Jul 2009 00:01

Hi All!

Some news from the TMX front here :)
The old API will be replaced by a brand new one...with documentation ;)

We will offer 2 services:

- SOAP Webservice
- REST(ful) Webservice -> URL XML messages

These services are developed as we speak, and will be online after the summer :)
Fleppie
TMX Coder for Trackmania Nations Forever

Scordo
cyclist
cyclist
Posts: 46
Joined: 01 Feb 2009 00:22
Owned TM-games: TMU

Re: TMXInfoSearcher class

Post by Scordo » 26 Jul 2009 19:07

Fleppie wrote:Hi All!

Some news from the TMX front here :)
The old API will be replaced by a brand new one...with documentation ;)

We will offer 2 services:

- SOAP Webservice
- REST(ful) Webservice -> URL XML messages

These services are developed as we speak, and will be online after the summer :)
As I can see TMX is implemented with ASP.Net. Is the API written using WCF? If so, did you split the WCF-API into a sepperate assembly, so you can provide the assembly to other .Net developers? TMSPS is implemented in .Net and I hate Web-References. An assembly containing the WCF-Contracts and so on would be nice :)

Thanks,
SCO
Debuggers don't remove bugs, they only show them in slow motion

>> Help me and contribute to: TMSPS <<

Post Reply

Who is online

Users browsing this forum: No registered users and 6 guests