<commit_before># Skype-Http

Unofficial Skype API for Node.js via "Skype (HTTP)".
This relies on the Skype Web Application and requires the credentials of the account you want to use: use it with care.

If you just want to create a bot, take a look at https://github.com/Microsoft/BotBuilder first.

## Installation

````shell
npm install --save skype-http

# If you use Typescript, install the definitions with:
typings install --save npm:skype-http
````

Import for Typescript or Javascript ES6:
````
import {Skyweb} from "skype-http";
````

Import for Javascript ES5:
````
var Skyweb = require("skype-http").Skyweb;
````

## Running example

The demo will prompt you your username and password: you should use your Skype account (there is no support for Microsoft account for now).

```shell
git clone https://github.com/demurgos/skype-http
cd skype-http
npm install && typings install
npm run demo
```
After 'Skyweb is initialized now' appears in console any message you receive in your Skype will be automatically replied.

## Usage

### Initializing and login
```js
Skyweb = require('skyweb');
var skyweb = new Skyweb();
skyweb.login(username, password).then(function (skypeAccount) {
    console.log('Skyweb is initialized now');
});
```

### Getting contacts info
```js
var skyweb = new Skyweb();
skyweb.login(username, password).then((skypeAccount) => {    
    console.log('Your contacts : ' + JSON.stringify(skyweb.contactsService.contacts, null, 2));
});
```

### Setting status
```js
var skyweb = new Skyweb();
skyweb.login(username, password).then((skypeAccount) => {
    skyweb.setStatus('Hidden'); //Now everybody thinks I'm sleeping
});
```
Currently supported values are : "Hidden" | "Online" | "Away" | "Busy"

## npm scripts

### `build`

Compiles the core files to `build/local`.

### `clean`

Removes the `build` and `dist` directories

### `demo`

Compiles the demo to `build/demo` and runs the main demo file.

### `lint`

Checks the source files with `tslint`

### `prepublish`

Clean the directories, run linter and tests and if everything is fine, compile the core files and moves them to the `dist` directory to be published on `npm`.

### `test`

Lint the source files and runs the specs.

## What's not working and probably never will.
* [Old P2P group chats](https://github.com/ShyykoSerhiy/skyweb/issues/6). According to  [Skype community site ](http://community.skype.com/t5/Skype-for-Web-Beta/Group-chats-missing-on-skype-web/td-p/3884218) only new, Cloud based group chats are shown in SkypeWeb Beta(therefore works in this API). The old P2P group chats are not.  

## Disclaimer 
This project relies on SkypeWeb Skype implementation. If Microsoft Corporation decides to remove Skype
implementation (or change it in any) skyweb might not be in working state. Therefore it's not recommended to use it 
in any critical part of production code. In fact it's not recommended to use it in production at all.

[MIT License](https://github.com/demurgos/skype-http/blob/master/LICENSE.md).
<commit_msg>Add resources section in README.md<commit_after># Skype-Http

Unofficial Skype API for Node.js via "Skype (HTTP)".
This relies on the Skype Web Application and requires the credentials of the account you want to use: use it with care.

## Installation

````shell
npm install --save skype-http

# If you use Typescript, install the definitions with:
typings install --save npm:skype-http
````

Import for Typescript or Javascript ES6:
````
import {Skyweb} from "skype-http";
````

Import for Javascript ES5:
````
var Skyweb = require("skype-http").Skyweb;
````

## Running example

The demo will prompt you your username and password: you should use your Skype account (there is no support for Microsoft account for now).

```shell
git clone https://github.com/demurgos/skype-http
cd skype-http
npm install && typings install
npm run demo
```
After 'Skyweb is initialized now' appears in console any message you receive in your Skype will be automatically replied.

## Usage

### Initializing and login
```js
Skyweb = require('skyweb');
var skyweb = new Skyweb();
skyweb.login(username, password).then(function (skypeAccount) {
    console.log('Skyweb is initialized now');
});
```

### Getting contacts info
```js
var skyweb = new Skyweb();
skyweb.login(username, password).then((skypeAccount) => {    
    console.log('Your contacts : ' + JSON.stringify(skyweb.contactsService.contacts, null, 2));
});
```

### Setting status
```js
var skyweb = new Skyweb();
skyweb.login(username, password).then((skypeAccount) => {
    skyweb.setStatus('Hidden'); //Now everybody thinks I'm sleeping
});
```
Currently supported values are : "Hidden" | "Online" | "Away" | "Busy"

## npm scripts

### `build`

Compiles the core files to `build/local`.

### `clean`

Removes the `build` and `dist` directories

### `demo`

Compiles the demo to `build/demo` and runs the main demo file.

### `lint`

Checks the source files with `tslint`

### `prepublish`

Clean the directories, run linter and tests and if everything is fine, compile the core files and moves them to the `dist` directory to be published on `npm`.

### `test`

Lint the source files and runs the specs.

## Resources

If you just want to create a bot, take a look at https://github.com/Microsoft/BotBuilder first.

You can find the decompiled source code of the Skype Web Application on [the `skype-web-reversed` repository](https://github.com/demurgos/skype-web-reversed).

## What's not working and probably never will.
* [Old P2P group chats](https://github.com/ShyykoSerhiy/skyweb/issues/6). According to  [Skype community site ](http://community.skype.com/t5/Skype-for-Web-Beta/Group-chats-missing-on-skype-web/td-p/3884218) only new, Cloud based group chats are shown in SkypeWeb Beta(therefore works in this API). The old P2P group chats are not.  

## Disclaimer 
This project relies on SkypeWeb Skype implementation. If Microsoft Corporation decides to remove Skype
implementation (or change it in any) skyweb might not be in working state. Therefore it's not recommended to use it 
in any critical part of production code. In fact it's not recommended to use it in production at all.

[MIT License](https://github.com/demurgos/skype-http/blob/master/LICENSE.md).

{'fraction_non_alphanumeric': 0.11610426995042379, 'fraction_numerical': 0.004477850631696785, 'mean_word_length': 4.476357267950963, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 7, 'https://': 9, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2154140', 'n_tokens_mistral': 1941, 'n_tokens_neox': 1820, 'n_words': 747}