https://github.com/holsee/katter
Twitter clone Kata
https://github.com/holsee/katter
Last synced: 2 months ago
JSON representation
Twitter clone Kata
- Host: GitHub
- URL: https://github.com/holsee/katter
- Owner: holsee
- Created: 2018-03-29T08:48:25.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2018-03-29T08:57:32.000Z (about 7 years ago)
- Last Synced: 2025-02-05T06:44:46.490Z (4 months ago)
- Language: Elixir
- Size: 6.84 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Katter
Implementation of twitter clone in elixir using in memory stores to index
messages by mention and username, exposed via a simple Plug based HTTP Endpoint.Kata Source: https://github.com/cork-functional-programmers/katter/
## Run
```
iex -S mix
```## Usage
`GET /katter/messages?username=$username`
Get Messages from a given user
```
$ curl http://localhost:1337/katter/messages?username=holsee
````GET /katter/messages?mention?$username`
Get Messages where a given user was mentioned
```
$ curl http://localhost:1337/katter/messages?mention=russel
````POST /katter/messages`
Message Format:
``` json
{
"username" : $username,
"messages" : $message,
"mentions" " [$username]
}
```Helper script to post message:
`./scripts/submit.sh holsee "Hello World!" '["russel", "priort"]'