Difference between revisions of "User:Ethan"

From xat wiki
Jump to: navigation, search
(8 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.
{{error|title=Not available (1): Group has not been deemed inactive (must be 3 months of no staff).}}
 
  
<!--T:29-->
+
==Usage==
{{error|title=Not available (5): Group has been [[Chat blocks|delisted]].|content=The chat has most likely been [[Chat blocks|delisted]] due to breaking xat's [http://xat.com/terms.html Terms of Service]. A [[ticket]] must be opened under "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
{{error|title=Not available (6): Group has already been purchased.|content=Group has already been purchased once and can't be purchased again.}}
 
  
<!--T:31-->
+
'''Example''':
{{error|title=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''':
{{error|title=Not available (8): Group was deleted.|content=A [[ticket]] must be created under "Chat Block" to find out the reason why the chat has been deleted.}}
+
{{pre|<nowiki>
 +
$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}";
{{error|title=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''':
{{error|title=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.
{{error|title=Not available (12): Group name has a reserved word.|content=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.
{{error|title=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-->
 
{{error|title=Name taken (1): Sorry, name already taken.}}
 
 
 
<!--T:39-->
 
{{error|title=Name taken (2): Sorry, name already taken.|content=Name can be enabled again, open a [[ticket]] if you are a paid user and would like it.}}
 
 
 
<!--T:40-->
 
{{error|title=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[edit]

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.