User:Ethan: Difference between revisions

From xat wiki
No edit summary
No edit summary
(11 intermediate revisions by 2 users not shown)
Line 1: Line 1:
==Group Errors== <!--T:27-->
__NOTOC__
SetScroller is a feature aimed at advanced users who want to set the chat scroller automatically from their server. e.g. showing tweets, displaying now/next on their radio station.


<!--T:28-->
To use it, you will need your chat's '''id''' and '''pw''', which can be found in  your chat's Extra features link.
*Not available (1): Group has not been deemed inactive (must be 3 months of no staff).


<!--T:29-->
==Usage==
*Not available (5): Group has been [[Chat blocks|delisted]].
**The chat is most likely been [[Chat blocks|delisted]] due to breaking the xat [http://xat.com/terms.html Terms of Service]. A [[ticket]] must be opened under Help Topic "Chat Block" to find out why your chat was [[Chat blocks|delisted]].


<!--T:30-->
You can use the API manually via a web page here: http://xat.com/web_gear/chat/SetScroller.php
*Not available (6): Group has already been purchased.


<!--T:31-->
'''Example''':
*Not available (7): Group was created less than 6 months ago.
{{pre|<nowiki>http://xat.com/web_gear/chat/SetScroller.php?Message=Hello%20all!&id=12345&pw=1234567890</nowiki>}}
Or you can access the API using a programming language.


<!--T:32-->
'''Example of how to access the API in PHP''':
*Not available (8): Group was deleted.
{{pre|<nowiki>
**A [[ticket]] must be created under "Chat Block" Help Topic to find out the reason why the chat has been deleted.
$message = "Hello all!"
$id = 12345;
$pw = 1234567890;


<!--T:33-->
$url = "http://xat.com/web_gear/chat/SetScroller.php?Message=".urlencode($message)."&id={$id}&pw={$pw}";
*Not available (9): Group has a low ID.
$ch = curl_init();
curl_setopt ($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt ($ch, CURLOPT_URL, $url);
curl_setopt ($ch, CURLOPT_TIMEOUT, 60);
$content = curl_exec ($ch);
print "$content\n";
curl_close ($ch);
</nowiki>
}}


<!--T:34-->
'''Notes''':
*Not available (11): Group has not been deemed inactive (must be 3 months of no staff).


<!--T:35-->
*You are limited to 1 update every minute.
*Not available (12): Group name has a reserved word.
**The group name has a reserved word such as "xat" or "chat". Choose another name.


<!--T:36-->
*The above uses the GET HTTP method, POST will also work.
*Not available (13): Group cannot be purchased.


==Short Names Errors== <!--T:37-->
*If you reset your chat you will need to update your software to go to the new ID and PW. If you change your group password you'll need to update to use the new pass.
 
<!--T:38-->
*Name taken (1): Sorry, name already taken.
 
<!--T:39-->
*Name taken (2): Sorry, name already taken.
**Name can be enabled again, open a [[ticket]] if you are a paid user and would like it.
 
<!--T:40-->
*Not allowed: Reserved word e.g. "xat" or a swear word in the name.

Revision as of 12:35, 4 September 2016

SetScroller is a feature aimed at advanced users who want to set the chat scroller automatically from their server. e.g. showing tweets, displaying now/next on their radio station.

To use it, you will need your chat's id and pw, which can be found in your chat's Extra features link.

Usage

You can use the API manually via a web page here: http://xat.com/web_gear/chat/SetScroller.php

Example:

http://xat.com/web_gear/chat/SetScroller.php?Message=Hello%20all!&id=12345&pw=1234567890

Or you can access the API using a programming language.

Example of how to access the API in PHP:

$message = "Hello all!"
$id = 12345;
$pw = 1234567890;

$url = "http://xat.com/web_gear/chat/SetScroller.php?Message=".urlencode($message)."&id={$id}&pw={$pw}";
$ch = curl_init();
curl_setopt ($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt ($ch, CURLOPT_URL, $url);
curl_setopt ($ch, CURLOPT_TIMEOUT, 60);
$content = curl_exec ($ch);
print "$content\n";
curl_close ($ch);

Notes:

  • You are limited to 1 update every minute.
  • The above uses the GET HTTP method, POST will also work.
  • If you reset your chat you will need to update your software to go to the new ID and PW. If you change your group password you'll need to update to use the new pass.