Question about Flashes

Discuss everything related to Maniaplanet.

Moderator: English Moderator

Post Reply
User avatar
SoraTWE
Posts: 77
Joined: 24 Mar 2012, 10:56
Location: Germany,NRW

Question about Flashes

Post by SoraTWE »

Hi all !

In the past we had that ML Bookmark buttons
Image

but instead we have now the Flashes function,but there I can only use my gameprofile to release flashes on it..
I would more like to put the news/flashes on my manialink..

https://image.noelshack.com/fichiers/20 ... 28-777.jpg

does someone know how to do this ?
I don't want to have the news in the mainmenue of the game,I want to reach the people who are interested about my import stuff..
but without bookmark button..?!
Image
User avatar
Dommy
Translator
Translator
Posts: 1901
Joined: 25 Aug 2011, 21:45
Location: Poland
Contact:

Re: Question about Flashes

Post by Dommy »

New Flash service allows you to post messages either on your profile, or in front page of your title pack.

Messages shared on profile appear in your ingame profile and here:
https://www.maniaplanet.com/players/domino54/flashes

Messages shared via titles appear on the title station Home tab and title website:
https://www.maniaplanet.com/titles/Gala ... 54/flashes

However, nowadays you would probably reach larger audience, by either posting on this forum or one of TM/SM/MP community Discord servers.
Ryzen 7 2700X, GTX 1070 Ti, 16 GB RAM, Windows 10 Insider Build
FORUM MODERATOR • CREATOR OF SHOOTMANIA GALAXY & TRACKMANIA² PURSUIT

Contact me via GALAXY & PURSUIT DISCORD
User avatar
Miss
Posts: 2155
Joined: 05 Jan 2016, 11:34
Location: The Netherlands
Contact:

Re: Question about Flashes

Post by Miss »

I think they're asking for a web API to get mania flashes though, in order to show it on a manialink. Is that available?
3080 RTX, Ryzen 3700X, 32GB RAM, Windows 11
Forum moderator, opinions are my own. :thx:
Check out Image openplanet, the alternative ManiaPlanet & Turbo scripting platform! (Openplanet subforum)
I also stream and tweet.
User avatar
Dommy
Translator
Translator
Posts: 1901
Joined: 25 Aug 2011, 21:45
Location: Poland
Contact:

Re: Question about Flashes

Post by Dommy »

There is a route returning posts information, see here.

Code: Select all

https://v4.live.maniaplanet.com/webservices/flashes/post/{liveUID}
The only question is, what does the liveUID stand for?
Ryzen 7 2700X, GTX 1070 Ti, 16 GB RAM, Windows 10 Insider Build
FORUM MODERATOR • CREATOR OF SHOOTMANIA GALAXY & TRACKMANIA² PURSUIT

Contact me via GALAXY & PURSUIT DISCORD
User avatar
SoraTWE
Posts: 77
Joined: 24 Mar 2012, 10:56
Location: Germany,NRW

Re: Question about Flashes

Post by SoraTWE »

I tried for example [manialink]tmsora isntead of [player] sora ..
I guess MLs aren't made for flashes it seems,but ye its ok I gonna post somewhere else as discord channel etc. ;)
thx for discussing :)
Image
User avatar
Qlex
Posts: 239
Joined: 03 Jun 2012, 13:17

Re: Question about Flashes

Post by Qlex »

Hi,

It is possible to look for it using the route Dommy described. liveUID can be the title or a user.

In this quick example, UidFlash can be either a user (@mylogin) or a title (+TMStadium@nadeo)

Code: Select all

declare Text Url = "https://www.maniaplanet.com/webservices/flashes/post/"^UidFlash^"?offset=0&length=3";
		declare Request = Http.CreateGet(Url, False, """Maniaplanet-Auth: Login="{{{ LocalUser.Login }}}", Token="{{{ Authentication_Token }}}" """ ^"\nAccept: application/xml");

	wait(Request.IsCompleted);
	if (Request.StatusCode < 200 || Request.StatusCode >= 300) {
		log("""ERROR Url     {{{Request.Url}}}""");
		log("""ERROR Code    {{{Request.StatusCode}}}""");
		log("""ERROR Content {{{Request.Result}}}""");
	} else {
		declare CXmlDocument XmlDoc = Xml.Create(Request.Result);
		if(XmlDoc == Null)
		{
			log("XmlDoc is Null");
			Http.Destroy(Request);
			return;
		}
		declare ResultNode = XmlDoc.GetFirstChild("response");
		if (ResultNode != Null) {
			/* look at the nodes with ResultNode.GetFirstChild("media_url")
			same for "headline"
			and "body" */
		} else {
		    log("ERROR API Response is " ^ Request.Result);
		}
		ResultNode = Null;
		Xml.Destroy(XmlDoc);
	}
You can create your own title pack and then have the flashes there. Tell me if it helps :)
User avatar
Miss
Posts: 2155
Joined: 05 Jan 2016, 11:34
Location: The Netherlands
Contact:

Re: Question about Flashes

Post by Miss »

Oh cool, that's nice! Here's an example link, doesn't seem to require the authentication header though:

Code: Select all

https://www.maniaplanet.com/webservices/flashes/post/@ansjh
3080 RTX, Ryzen 3700X, 32GB RAM, Windows 11
Forum moderator, opinions are my own. :thx:
Check out Image openplanet, the alternative ManiaPlanet & Turbo scripting platform! (Openplanet subforum)
I also stream and tweet.
User avatar
SoraTWE
Posts: 77
Joined: 24 Mar 2012, 10:56
Location: Germany,NRW

Re: Question about Flashes

Post by SoraTWE »

Thank you very much for an official answer here.
Sorry,I had not recognized :oops: .

Unfortunately I absolutely do not understand much about xml and that coding..
Just that I should go ahead now and create a titlepack,to have a platform posting my news on it for the manialink.

I will try now to create a titlepack ;)
Image
Post Reply

Return to “Maniaplanet”

Who is online

Users browsing this forum: No registered users and 2 guests