Websocket/Api

Thoughts, Help, Feature Requests, Bug Reports, Developing code for...

Moderators: dorpond, trevor, Azhrei

Forum rules
PLEASE don't post images of your entire desktop, attach entire campaign files when only a single file is needed, or generally act in some other anti-social behavior. :)
User avatar
BearFather
Cave Troll
Posts: 45
Joined: Tue Jan 07, 2014 11:46 pm
Location: Inside Your Head! <USA>
Contact:

Websocket/Api

Post by BearFather »

So I have been gone for a long time, my last version was 1.3.94. So was curious what has changed since 1.3. And was looking thru some release notes. And saw a blurb about experimental web/api socket, I forget the exact details but it was for 1.4. Is this a thing still?

Now been a long time since I have been thru the code, so before I spend the time to relearn it so maybe i could add my class I was hoping that became something. If not ohh well maybe I will spend some hours pouring thru the code again to relearn how it works again.

User avatar
Full Bleed
Demigod
Posts: 4736
Joined: Sun Feb 25, 2007 11:53 am
Location: FL

Re: Websocket/Api

Post by Full Bleed »

BearFather wrote:
Mon Sep 30, 2019 8:44 pm
So I have been gone for a long time, my last version was 1.3.94. So was curious what has changed since 1.3.
I'd suggest that you look at the announcement posts for each version since then to get an overview of what's been added: viewforum.php?f=1
Maptool is the Millennium Falcon of VTT's -- "She may not look like much, but she's got it where it counts."

Phergus
Deity
Posts: 7132
Joined: Fri May 12, 2006 8:56 pm
Location: Middle of Nowhere, NM
Contact:

Re: Websocket/Api

Post by Phergus »

Welcome back BearFather.

We recently added some RESTful api macro functions. See this page: RESTful_Functions_Overview

User avatar
BearFather
Cave Troll
Posts: 45
Joined: Tue Jan 07, 2014 11:46 pm
Location: Inside Your Head! <USA>
Contact:

Re: Websocket/Api

Post by BearFather »

Full Bleed:
I did go thru some of those to get a basic idea of new features and the like. Where I read about the api in the first place.

Phergus:
Thanks, I did find the restAPI part, but couldn't find what port or how to enabled it. I also found in the code a websocket class, and was looking into that. But didn't go far, ended up reading thru other stuff to remember how the code worked and what to call if I do get it figured out.

EDIT:
Reading the restAPI page again, is this a api for inside macro's to pull data and push data and the like? If so that might work...I'm looking to make a webpage with some of the player stats and allow to change a few things and update hps as we go. And this would allow them to run a simple page on their phones while we play that would update stuff on the game field.

Phergus
Deity
Posts: 7132
Joined: Fri May 12, 2006 8:56 pm
Location: Middle of Nowhere, NM
Contact:

Re: Websocket/Api

Post by Phergus »

BearFather wrote:
Tue Oct 01, 2019 10:02 pm
Reading the restAPI page again, is this a api for inside macro's to pull data and push data and the like? If so that might work...I'm looking to make a webpage with some of the player stats and allow to change a few things and update hps as we go.
That should be totally doable.

User avatar
BearFather
Cave Troll
Posts: 45
Joined: Tue Jan 07, 2014 11:46 pm
Location: Inside Your Head! <USA>
Contact:

Re: Websocket/Api

Post by BearFather »

Want to say thanks, the RestApi worked great. Spent a day and wrote some macros and a webapi to do exactly what I needed.

Now got a webpage that the players can bring up on their phone/tablet. And see the health percentage of their party and mobs on the battlefield. Players can adjust only party members health, but the GM can also adjust the mobs form the website. And with a health bar the main screen will also reflect these numbers.

Images:
https://imgur.com/a/cqPhVod

Phergus
Deity
Posts: 7132
Joined: Fri May 12, 2006 8:56 pm
Location: Middle of Nowhere, NM
Contact:

Re: Websocket/Api

Post by Phergus »

Very cool!

More cool would be if you could write up an article or something on what you did that could go on the wiki or a blog post here. :wink:

User avatar
BearFather
Cave Troll
Posts: 45
Joined: Tue Jan 07, 2014 11:46 pm
Location: Inside Your Head! <USA>
Contact:

Re: Websocket/Api

Post by BearFather »

I can work on something for that. I'm willing to share all the code for this. I will write something up this week and see if I can figure out the wiki part.

User avatar
RPTroll
TheBard
Posts: 3159
Joined: Tue Mar 21, 2006 7:26 pm
Location: Austin, Tx
Contact:

Re: Websocket/Api

Post by RPTroll »

That would be awesome!
ImageImage ImageImageImageImage
Support RPTools by shopping
Image
Image

Phergus
Deity
Posts: 7132
Joined: Fri May 12, 2006 8:56 pm
Location: Middle of Nowhere, NM
Contact:

Re: Websocket/Api

Post by Phergus »

We'll have to create an account for you on the wiki if you want to put it there. Or you can just put something together in some doc/html format and we can translate it to the wiki.

User avatar
BearFather
Cave Troll
Posts: 45
Joined: Tue Jan 07, 2014 11:46 pm
Location: Inside Your Head! <USA>
Contact:

Re: Websocket/Api

Post by BearFather »

It's what ever works for you. My wiki writing experience is lacking, I know how to do very limited stuff on it. But starting to work on it tonight, so it doesn't get lost in the pile of things I plan to do.

Phergus
Deity
Posts: 7132
Joined: Fri May 12, 2006 8:56 pm
Location: Middle of Nowhere, NM
Contact:

Re: Websocket/Api

Post by Phergus »

Very good. Put it together however your comfortable with and we'll get it up on the wiki or blog.

User avatar
BearFather
Cave Troll
Posts: 45
Joined: Tue Jan 07, 2014 11:46 pm
Location: Inside Your Head! <USA>
Contact:

Re: Websocket/Api

Post by BearFather »

Okay I wrote a quick tutorial for this system. Your welcome to take the text and format how ever you like. I'm no poet with the words so I hope it all makes sense on how to use it. If not let me know and I can try to explain those sections better. There is a link to the files but I have also uploaded the file pack here.

http://bearfather.net/maptools-hp-webpage/
Attachments
webmaptools.zip
(5.21 KiB) Downloaded 40 times

Phergus
Deity
Posts: 7132
Joined: Fri May 12, 2006 8:56 pm
Location: Middle of Nowhere, NM
Contact:

Re: Websocket/Api

Post by Phergus »

Awesome. I'll see if I can't get it posted in the next few days.

User avatar
Full Bleed
Demigod
Posts: 4736
Joined: Sun Feb 25, 2007 11:53 am
Location: FL

Re: Websocket/Api

Post by Full Bleed »

Looking forward to checking this out as this is the first time I've seen someone do something like this.

To BearFather, thanks for sharing.

To Phergus, thanks for getting it up on the wiki.

:)
Maptool is the Millennium Falcon of VTT's -- "She may not look like much, but she's got it where it counts."

Post Reply

Return to “MapTool”