<commit_before># Kik Bot API #
Use this library to develop bots for [Kik Messenger](https://www.kik.com) that are essentially automated humans.

It basically lets you do the same things as the offical Kik app by pretending to be a real smartphone client: It communicates with Kik's servers at `talk1110an.kik.com:5223` over a modified version of the [XMPP](https://xmpp.org/about/technology-overview.html) protocol.

This is the new branch of this project and is recommended.
## Installation and dependencies ##
First, make sure you are using **Python 3.6**, not python 2.7. Second, just install it directly from GitHub:
```
git clone -b new https://github.com/tomer8007/kik-bot-api-unofficial
pip3 install ./kik-bot-unofficial-api
```
## Usage ##
An example is worth a thoursand words. a good place to start is the `examples/` directory. 

It is as simple as:
```python
from kik_unofficial.client import KikClient
from kik_unofficial.callbacks import KikClientCallback
import kik_unofficial.datatypes.xmpp.chatting as chatting

class EchoBot(KikClientCallback):
    def __init__(self):
        self.client = KikClient(self, "your_kik_username", "your_kik_password")

    def on_authenticated(self):
        self.client.request_roster()

    def on_chat_message_received(self, chat_message: chatting.IncomingChatMessage):
        self.client.send_chat_message(chat_message.from_jid, "You said \"" + chat_message.body + "\"!")
```
Currently Supported Operations:
- Log in with kik username and password, retrieve user information (such as email, name, etc).
- Fetch chat partners information
- Send text messages to users\groups and listen for incoming messages
- Send and receive 'is-typing' status
- Send and receive read receipts
- Fetch group information (name, participants, etc.)
- Receive media content: camera, gallery, stickets
- Add a kik user as a friend

Sending multimedia (images, videos) is not suported yet.

## Troubleshooting
If you are on Windows and you are unable to install the lxml pacakge, use the binary installers from PyPi [here](https://pypi.python.org/pypi/lxml/3.3.5#downloads).<commit_msg>Updated features<commit_after># Kik Bot API #
Use this library to develop bots for [Kik Messenger](https://www.kik.com) that are essentially automated humans.

It basically lets you do the same things as the offical Kik app by pretending to be a real smartphone client: It communicates with Kik's servers at `talk1110an.kik.com:5223` over a modified version of the [XMPP](https://xmpp.org/about/technology-overview.html) protocol.

This is the new branch of this project and is recommended.
## Installation and dependencies ##
First, make sure you are using **Python 3.6**, not python 2.7. Second, just install it directly from GitHub:
```
git clone -b new https://github.com/tomer8007/kik-bot-api-unofficial
pip3 install ./kik-bot-unofficial-api
```
## Usage ##
An example is worth a thoursand words. a good place to start is the `examples/` directory. 

It is as simple as:
```python
from kik_unofficial.client import KikClient
from kik_unofficial.callbacks import KikClientCallback
import kik_unofficial.datatypes.xmpp.chatting as chatting

class EchoBot(KikClientCallback):
    def __init__(self):
        self.client = KikClient(self, "your_kik_username", "your_kik_password")

    def on_authenticated(self):
        self.client.request_roster()

    def on_chat_message_received(self, chat_message: chatting.IncomingChatMessage):
        self.client.send_chat_message(chat_message.from_jid, "You said \"" + chat_message.body + "\"!")
```
Currently Supported Operations:
- Log in with kik username and password, retrieve user information (such as email, name, etc).
- Fetch chat partners information
- Send text messages to users\groups and listen for incoming messages
- Send and receive 'is-typing' status
- Send and receive read receipts
- Fetch group information (name, participants, etc.)
- Admin groups (add, remove or ban members, etc)
- Search for groups and join them [Experimental]
- Receive media content: camera, gallery, stickets
- Add a kik user as a friend

Sending multimedia (images, videos) is not suported yet.

## Troubleshooting
If you are on Windows and you are unable to install the lxml pacakge, use the binary installers from PyPi [here](https://pypi.python.org/pypi/lxml/3.3.5#downloads).
{'fraction_non_alphanumeric': 0.08942152569716524, 'fraction_numerical': 0.00921871398939848, 'mean_word_length': 4.571245186136072, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 8, 'lorem ipsum': 0, 'www.': 2, 'xml': 4}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3968300', 'n_tokens_mistral': 1348, 'n_tokens_neox': 1260, 'n_words': 493}