# ~~wechaty-puppet-hostie~~

## This module has been renamed to **wechaty-puppet-service**

The ~~wechaty-puppet-hostie~~ module has been renamed to [wechaty-puppet-service](https://github.com/wechaty/wechaty-puppet-service),
please use **wechaty-puppet-service** instead.

## Use **wechaty-puppet-service** instead of ~~wechaty-puppet-hostie~~

### Migration Guide

1. Replace `wechaty-puppet-hostie` by `wechaty-puppet-service`
1. Replace `WECHATY_PUPPET_HOSTIE_TOKEN` by `WECHATY_PUPPET_SERVICE_TOKEN`
1. Replace `PuppetHostie` by `PuppetService` (if applicatory)
1. Replace `WECHATY_PUPPET_HOSTIE_ENDPOINT` by
`WECHATY_PUPPET_SERVICE_ENDPOINT` (if applicatory)

If you have any questions, please feel free to ask in our Gitter room: <https://gitter.im/wechaty/wechaty>

-----

[![NPM Version](https://badge.fury.io/js/wechaty-puppet-hostie.svg)](https://www.npmjs.com/package/wechaty-puppet-hostie)
[![NPM](https://github.com/Chatie/grpc/workflows/NPM/badge.svg)](https://github.com/wechaty/wechaty-puppet-hostie/actions?query=workflow%3ANPM)

![Hostie](https://wechaty.github.io/wechaty-puppet-hostie/images/hostie.png)

Hostie Puppet for Wechaty

[![Powered by Wechaty](https://img.shields.io/badge/Powered%20By-Wechaty-brightgreen.svg)](https://github.com/Wechaty/wechaty)

## Features

1. Consume hostie service
1. Provide hostie service

## Usage

```ts
import { Wechaty } from 'wechaty'

const wechaty = new Wechaty({
  puppet: 'wechaty-puppet-hostie',
  puppetOptions: {
    token: 'hostie_token'
  }
})

wechaty.start()
```

## Environment Variables

### 1 `WECHATY_PUPPET_HOSTIE_TOKEN`

The token set to this environment variable will become the default value of `puppetOptions.token`

```sh
WECHATY_PUPPET_HOSTIE_TOKEN=hostie_token node bot.js
```

## History

### master

### v0.12.255 (Jan 23, 2021)

The ~~wechaty-puppet-hostie~~ module has been renamed to [wechaty-puppet-service](https://github.com/wechaty/wechaty-puppet-service),
please use **wechaty-puppet-service** instead.

### v0.10.4 (Oct 2020)

1. Add 'grpc.default_authority' to gRPC client option.  
    > See: [Issue #78: gRPC server can use the authority  to identify current user](https://github.com/wechaty/wechaty-puppet-hostie/pull/78)

### v0.6 (Apr 2020)

Beta Version

1. Reconnect to Hostie Server with RxSJ Observables

### v0.3 (Feb 2020)

1. Publish the NPM module [wechaty-puppet-hostie](https://www.npmjs.com/package/wechaty-puppet-hostie)
1. Implemented basic hostie features with gRPC module: [@chatie/grpc](https://github.com/Chatie/grpc)

### v0.0.1 (Jun 2018)

Designing the puppet hostie with the following protocols:

1. [gRPC](https://grpc.io/)
1. [JSON RPC](https://www.jsonrpc.org/)
1. [OpenAPI/Swagger](https://swagger.io/docs/specification/about/)

## Author

[Huan LI](https://github.com/huan) ([李卓桓](http://linkedin.com/in/zixia)),
Tencent TVP of Chatbot, \<zixia@zixia.net\>

[![Profile of Huan LI (李卓桓) on StackOverflow](https://stackexchange.com/users/flair/265499.png)](https://stackexchange.com/users/265499)

## Copyright & License

* Code & Docs © 2018-now Huan LI \<zixia@zixia.net\>
* Code released under the Apache-2.0 License
* Docs released under Creative Commons
