Jump to content
xat 1.64 public beta out! See changes ×

BOTSTAT API & stuff


oj

Recommended Posts

  • Advanced Members

https://xat.com/web_gear/chat/botstat.php?u=638877683&k2=465465465&status=tacocat

k2 or d3 i don't remember what gifts.php uses (i think d3, but k2 just for example)

 

might want to include room id as well, unless it should update for all chats the user is on, or just the last one with activity was

 

why isn't there something like this???

( @Admin , it would work like how gameban scrips unban the user, to update the info)

 

lets people who are less experienced get some use out of this without relying on bot providers or client bots

opens the door to a lot more stuff imo

  • Award 4
Link to comment
Share on other sites

  • Volunteers

What a great idea for a new API.

 

18 minutes ago, oj said:

might want to include room id as well, unless it should update for all chats the user is on, or just the last one with activity was

 

I think the ideas to include the room and update by the last activity (if no room provided) are better than updating on all chats the user is on.

 

18 minutes ago, oj said:

lets people who are less experienced get some use out of this without relying on bot providers or client bots

 

OJ is right about this. We don't need to wait for bot providers to add new features because most of them are about to do nothing.  We have developers on xat and developers want to do their own stuff.

 

The idea that OJ has suggested is really great. In term of security, I don't think there are much to care except for the auth part and spam limit (but i guess server is doing that already).

 

If we had to give an example about:

 

- User sends a request on botstat.php -> The file checks if ID, k2, options are correct and then sends back on server to update infos.

 

It's time for xat to open new doors for developers.

 

Edited by SlOom
Link to comment
Share on other sites

  • Advanced Members
8 hours ago, Laming said:

Ok guys,

 

https://github.com/xLaming/xat-botstat/

 

Sending it to xat is not my problem, handle it by yourself.

Unsure if you misunderstood the thread or if I'm misunderstanding you.

Are you saying that the users should be the ones sending the final packet? Because if that's what you mean, you misunderstood my post.

I'm asking for an official api hosted BY xat, not a packet builder for users to use to send the packet on their own.

10 hours ago, oj said:

lets people who are less experienced get some use out of this without relying on bot providers or client bots

 

Link to comment
Share on other sites

  • Advanced Members
24 minutes ago, Admin said:

Why is this better than setting your status on the chat ?

Same reason botstat was made in the first place (I'm assuming), so external resources could be used to update user info (In botstat's case as of now: bot providers) automatically.

Example: Somebody makes a hook for, say Steam, that when the user opens a game, it sends a request to this botstat API, and their information gets updated automatically on chat.

 

This saves work//time instead of having to manually do $status=I'm playing Pac-Man., for every game/application/etc. you open.

Or if the user has a callback for when they start live streaming to automatically set their status to "I'm live!"

Or DJs on xat, to change their name to [ON-AIR] when they start broadcasting.

 

This could also be used by/for other resources to do the same thing, depending on what information would be set.

Link to comment
Share on other sites

  • Advanced Members
4 hours ago, Admin said:

Why is this better than setting your status on the chat ?

 

First thing that comes to my mind : MSN-like ‘Now Playing’.

 

The ‘What song are you listening to right now’ thread is the
most-replied thread, and second most-viewed thread of the ‘General
Discussion’ board.

 

VLC Media Player allows you to add LUA plugins. It should not be too
hard to build one that uses the API to update one's status.
It should be especially easy given that there is already a similar
plugin that writes current song's info to a file :
https://addons.videolan.org/p/1172613/

 

In fact, take this post as a pledge that I will do it within a week if
you release an API... as long as nobody beats me to it. :þ

  • Award 4
Link to comment
Share on other sites

  • Advanced Members
8 hours ago, Admin said:

Why is this better than setting your status on the chat ?

Basically so users can make their own features without relying on bot providers. 

Edited by Daniel
  • Award 2
Link to comment
Share on other sites

  • Volunteers
13 minutes ago, Admin said:

It would probably need to be something like:

 

https://xat.com/web_gear/chat/botstat.php?u=638877683&r=5&t=6hfy6eyr6sk19vh&s=tacocat

 

r=roomid (I guess i could do name as well)

t=token

 

would that work ?

 

 

 

 

Where do you get the token ?

 

and yes it would work !

Edited by SlOom
Link to comment
Share on other sites

  • Advanced Members
17 minutes ago, Admin said:

It would probably need to be something like:

 

https://xat.com/web_gear/chat/botstat.php?u=638877683&r=5&t=6hfy6eyr6sk19vh&s=tacocat

 

r=roomid (I guess i could do name as well)

t=token

 

would that work ?

 

 

 

Yes, that's what I was thinking.

Would you change &s for things like name, avatar, etc.?

Like, https://xat.com/web_gear/chat/botstat.php?u=638877683&r=5&t=6hfy6eyr6sk19vh&a=144 for avatars

And for multiple things, would work like https://xat.com/web_gear/chat/botstat.php?u=638877683&r=5&t=6hfy6eyr6sk19vh&s=tacocat&a=144 ? (I'm assuming this is the case, just wanted to double check)

And as Sloom said, how would we get the token?

Link to comment
Share on other sites

  • Bot Service Providers
53 minutes ago, oj said:

Yes, that's what I was thinking.

Would you change &s for things like name, avatar, etc.?

Like, https://xat.com/web_gear/chat/botstat.php?u=638877683&r=5&t=6hfy6eyr6sk19vh&a=144 for avatars

And for multiple things, would work like https://xat.com/web_gear/chat/botstat.php?u=638877683&r=5&t=6hfy6eyr6sk19vh&s=tacocat&a=144 ? (I'm assuming this is the case, just wanted to double check)

And as Sloom said, how would we get the token?

It can be the k1 or k2 (k1 is fine since its updated every login)

Link to comment
Share on other sites

  • Advanced Members
On 5/19/2018 at 5:50 PM, Laming said:

It can be the k1 or k2 (k1 is fine since its updated every login)

That's true, or they could just have an API key generator on login under the more button or something so we don't have to worry about exposing any account info.

 

I was just thinking, when (if) this gets added, could the packet be changed so that the bot providers cannot change our info (without our API key), while still allowing users to send the packet to change our own?

Then, with the API key (or token, in your post @Admin), bot providers can have a place where we input the API key on their site, which lets them change our info only if we mean for them to.

Because as of now, bot providers can change our info without consent (if we have the power enabled), even if it's only until refresh.

Link to comment
Share on other sites

  • Bot Service Providers
15 minutes ago, oj said:

That's true, or they could just have an API key generator on login under the more button or something so we don't have to worry about exposing any account info.

 

This is also something I thought about, because if this is added, then can be rolled back the Set Scroll api, if it is being abused vols can manage/handle or punish these ppl, and maybe admins can add more useful APIs based in this "key"

Link to comment
Share on other sites

  • Advanced Members
13 minutes ago, Laming said:

This is also something I thought about, because if this is added, then can be rolled back the Set Scroll api, if it is being abused vols can manage/handle or punish these ppl, and maybe admins can add more useful APIs based in this "key"

Would also be good to have a button to generate a new API key, in case somebody who shouldn't have it gets it, or just an easy way to disable everything.

  • Award 1
Link to comment
Share on other sites

  • 3 weeks later...
  • Advanced Members
1 hour ago, Laming said:

RIP never done

It took from May 17th to June 5th to get the input on profiles changed, this is probably going to take a little longer....................... :( 

  • Award 1
Link to comment
Share on other sites

  • 2 weeks later...
  • Volunteers
2 minutes ago, Admin said:

Hmm where would the token come from ..

 

On login page, when you click the "more" button (at the bottom of login page) and it has a field "Token (API)" with the code.

 

Imo, it's the best place where it's safe. 

Edited by SlOom
  • Award 2
Link to comment
Share on other sites

  • 2 months later...
  • Bot Service Providers

Yay!!

 

It's coming!!!

 

coming.thumb.png.aa2acbe77de53a84aaef57885003e300.png

 

To reset/get your api key you need to select this option then click Update Security settings,

 

APIs or whatever may be added later (I think)

Edited by Laming
  • Wow 1
  • Meh 1
Link to comment
Share on other sites

  • 7 months later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.