Coder Social home page Coder Social logo

godevop / teamspeak-3-java-api Goto Github PK

View Code? Open in Web Editor NEW

This project forked from ubuntuevangelist/teamspeak-3-java-api

0.0 1.0 0.0 52.87 MB

A Java 7 implementation of TeamSpeak's 3 server query API.

License: MIT License

Java 99.66% Shell 0.22% HTML 0.12%

teamspeak-3-java-api's Introduction

TeamSpeak 3 Java API

Build Status Gitter

A Java 7 implementation of the TeamSpeak 3 Server Query API.

Features

Getting Started

Download

  • Option 1 (Standalone Jar):

    Download the latest release and add it to the buildpath of your project. (sources-jar | javadoc-jar)

  • Option 2 (Maven):

    Add the following to your pom.xml

<project>	
	
	<!-- other settings -->
	
	<repositories>
		<repository>
			<id>TeamSpeak-3-Java-API-mvn-repo</id>
			<url>https://raw.githubusercontent.com/TheHolyWaffle/TeamSpeak-3-Java-API/mvn-repo/</url>
			<snapshots>
				<enabled>true</enabled>
				<updatePolicy>always</updatePolicy>
			</snapshots>
		</repository>
	</repositories>
	
	<dependencies>
		<dependency>
			<groupId>com.github.theholywaffle</groupId>
			<artifactId>teamspeak3-api</artifactId>
			<version>[1.0.0,2.0.0)</version>
		</dependency>		
	</dependencies>

</project>

Usage

All functionality is contained in the TS3Api object.

  1. Create a TS3Config object and customize it.
  2. Create a TS3Query object with your TS3Config as argument.
  3. Call TS3Query#connect() to connect to the server.
  4. Call TS3Query#getApi() to get an TS3Api object.
  5. Do whatever you want with this api :)

Example

final TS3Config config = new TS3Config();
config.setHost("77.77.77.77");
config.setDebugLevel(Level.ALL);

final TS3Query query = new TS3Query(config);
query.connect();

final TS3Api api = query.getApi();
api.login("serveradmin", "serveradminpassword");
api.selectVirtualServerById(1);
api.setNickname("PutPutBot");
api.sendChannelMessage("PutPutBot is online!");
...

More examples

here

Javadocs

here

Important

Only use FloodRate.UNLIMITED if you are sure that your query account is whitelisted. If not, use FloodRate.DEFAULT. The server will temporarily ban your account if you send too many commands in a short period of time. For more info on this, check the TeamSpeak 3 Server Query Manual, page 6.

TS3Config Settings

Option Description Default value Required
Host/IP IP/Host of TeamSpeak 3 server. yes
QueryPort Query port of TeamSpeak 3 server. 10011 yes
FloodRate Prevents possible spam to the server. FloodRate.DEFAULT no
DebugLevel Determines how much will be logged. Level.WARNING no
Debug to file Write logs to logfile (teamspeak.log). False no
Command timeout Time until a command waiting for a response fails 4000 (ms) no

Building this project

We're using Maven to automate the build process.

Prerequisites:
Compiling:
  • Check out this repository
  • Run mvn clean install in the project directory

This will create 3 JAR files in the target directory: The compiled project, the sources, and the javadocs.

TODO

  • Add Javadoc to core API and wrapper classes.

Questions or bugs?

Please let us know here. We'll try to help you as soon as we can.

If you just have a simple question or want to talk to us about something else, feel free to join the repository chat on Gitter.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.