Giter VIP home page Giter VIP logo

league-of-legends-xmpp-chat-library's Introduction

League of Legends XMPP Chat Library

Build Status Maven Central Dependency Status

A Java 7 XMPP library to chat and interact with the League of Legends chatservers. Built upon Smack and JDOM.

Features

Getting Started

Download

  • Option 1 (Standalone Jar):

    Download the latest release and add it to the buildpath of your project.

  • Option 2 (Maven):

<dependency>
  <groupId>com.github.theholywaffle</groupId>
  <artifactId>lolchatapi</artifactId>
  <version><!--latest version--></version>
</dependency>

Usage

  1. Create a LolChat object with the correct ChatServer of your region.
  2. Add any listeners.
  3. Login.
  4. ...

Example

final LolChat api = new LolChat(ChatServer.EUW, FriendRequestPolicy.ACCEPT_ALL, new RiotApiKey("RIOT-API-KEY", RateLimit.DEFAULT));
if (api.login("myusername", "mypassword")) {

	// Example 1: Send Chat Message to all your friends
	for (Friend f : api.getFriends()) {
		f.sendMessage("Hello " + f.getName());
	}

	// Example 2: Send Chat Message to all your friends and wait for an
	// response
	for (Friend f : api.getFriends()) {
		f.sendMessage("Hello " + f.getName(), new ChatListener() {

			@Override
			public void onMessage(Friend friend, String message) {
				System.out.println("Friend " + friend.getName()
						+ " responded to my Hello World!");
			}
		});
	}

	// Example3: Send Chat Message to an specific friend
	Friend f = api.getFriendByName("Dyrus");
	if (f != null && f.isOnline()) {
		f.sendMessage("Hi, I'm your biggest fan!");
	}
}

more examples

Javadocs

here

Questions or bugs?

Please let me know them here. I'll help you out as soon as I can.


“League of Legends XMPP Chat Library isn't endorsed by Riot Games and doesn't reflect the views or opinions of Riot Games or anyone officially involved in producing or managing League of Legends. League of Legends and Riot Games are trademarks or registered trademarks of Riot Games, Inc. League of Legends © Riot Games, Inc.”

league-of-legends-xmpp-chat-library's People

Contributors

theholywaffle avatar supericy avatar mariusoe avatar svengeance avatar

Watchers

James Cloos avatar Melih Yıldız avatar

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.