Jump to content
oj

BOTSTAT API & stuff

Recommended Posts

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

  • Like 4

Share this post


Link to post
Share on other sites
Posted (edited)

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

Share this post


Link to post
Share on other sites
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

 

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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. :þ

  • Like 4

Share this post


Link to post
Share on other sites
Posted (edited)
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
  • Like 2

Share this post


Link to post
Share on other sites
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?

Share this post


Link to post
Share on other sites
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)

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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"

Share this post


Link to post
Share on other sites
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.

  • Like 1

Share this post


Link to post
Share on other sites
Posted (edited)

So, at the moment, it seems that this power is of no use... when is done this API?

@Admin

Edited by Profile

Share this post


Link to post
Share on other sites
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....................... :( 

  • Like 1

Share this post


Link to post
Share on other sites
Posted (edited)
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
  • Like 2

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign in now

×

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.