https://github.com/oestrich/gossip-elixir
An Elixir client for Grapevine
https://github.com/oestrich/gossip-elixir
chat elixir gossip
Last synced: 10 months ago
JSON representation
An Elixir client for Grapevine
- Host: GitHub
- URL: https://github.com/oestrich/gossip-elixir
- Owner: oestrich
- License: mit
- Created: 2018-07-11T03:23:12.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2019-09-03T22:05:24.000Z (almost 7 years ago)
- Last Synced: 2024-10-29T08:44:50.560Z (over 1 year ago)
- Topics: chat, elixir, gossip
- Language: Elixir
- Homepage: https://grapevine.haus/
- Size: 92.8 KB
- Stars: 20
- Watchers: 1
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Gossip
A client for connecting to the Gossip MUD chat network. See [https://grapevine.haus/docs](https://grapevine.haus/docs) for more information.
## Installation
The package can be installed by adding `gossip` to your list of dependencies in `mix.exs`:
```elixir
def deps do
[
{:gossip, "~> 0.6"},
]
end
```
## Configuration
Set the following in your mix project's configuration. **Do not commit the client id and secret.** These should be in a `prod.secret.exs` file or similar that is ignored from your repo.
```elixir
config :gossip, :client_id, "CLIENT ID"
config :gossip, :client_secret, "CLIENT SECRET"
config :gossip, :callback_modules,
core: Callbacks.Core,
players: Callbacks.Players,
tells: Callbacks.Tells,
games: Callbacks.Games
```
## Callback Modules
You can opt into specific support flags on Gossip by configuring callback modules that follow the specific behaviours.
See a sample set of callbacks by viewing the `TestCallback` module for this client, [here](https://github.com/oestrich/gossip-elixir/blob/master/lib/gossip/test_callback.ex).
### Core/Channels
The `channels` flag *must* be supported and can be set up by providing a callback module that has the `Gossip.Client.Core` behaviour.
### Players
The `players` flag can be set up by providing a callback module that has the `Gossip.Client.Players` behaviour.
### Tells
The `tells` flag can be set up by providing a callback module that has the `Gossip.Client.Tells` behaviour.
### Games
the `games` flag can be set up by providing a callback module that has the `gossip.client.games` behaviour.
## Telemetry Events
- `[:gossip, :events, :channels, :broadcast]` - Received a `channels/broadcast` event
- `[:gossip, :events, :channels, :send, :request]` - Sending a `channels/send` event
- `[:gossip, :events, :core, :authenticate, :request]` - Received a response to `authenticate`
- `[:gossip, :events, :core, :authenticate, :response]` - Sending an `authenticate` event
- `[:gossip, :events, :core, :heartbeat, :request]` - Received a `heartbeat` event
- `[:gossip, :events, :core, :restart]` - Received a `restart` event
- `[:gossip, :events, :games, :connect]` - Received a `games/connect` event
- `[:gossip, :events, :games, :disconnect]` - Received a `games/disconnect` event
- `[:gossip, :events, :games, :status, :request]` - Sending a `games/status` event
- `[:gossip, :events, :games, :status, :response]` - Received a response to `games/status`
- `[:gossip, :events, :players, :sign_in]` - Received a `players/sign-in` event
- `[:gossip, :events, :players, :sign_out]` - Received a `players/sign-out` event
- `[:gossip, :events, :players, :status, :request]` - Sending a `players/status` event
- `[:gossip, :events, :players, :status, :response]` - Received a response to `players/status`
- `[:gossip, :events, :tells, :receive]` - Received a `tells/receive` event
- `[:gossip, :events, :tells, :send, :request]` - Sending a `tells/send` event
- `[:gossip, :events, :tells, :send, :response]` - Received a response to `tells/send`