Linely
Linely is inspired by LocalStack. Goal of this tool is to create a mock service for LINE.
Setup
Docker
docker run -d -p 3000:3000 dyoshikawa/linely:latest
curl http://localhost:3000/debug/ping
# => {"ping":"pong"}
Docker Compose
# docker-compose.yml
version: '3'
services:
linely:
image: dyoshikawa/linely:latest
ports:
- 3000:3000
docker compose up -d
curl http://localhost:3000/debug/ping
# => {"ping":"pong"}
Usage
curl --request POST \
--url http://localhost:3000/debug/users \
--header 'content-type: application/json' \
--data '{"id": "FOO_ID","name": "Foo","picture": "http://example.com/foo.jpg","email": "[email protected]"}'
# => null
curl -v -X POST 'http://localhost:3000/oauth2/v2.1/verify' \
-H 'Content-Type: application/x-www-form-urlencoded' \
--data-urlencode 'id_token=FOO_ID' \
--data-urlencode 'client_id=1234567890'
# => {"iss":"https://example.com","sub":"FOO_ID","aud":"1234567890","exp":1504169092,"iat":1504263657,"nonce":"0987654asdf","amr":["pwd"],"name":"Foo","picture":"http://example.com/foo.jpg","email":"[email protected]"}
Features
Login API
- Issue access token
- Verify access token
- Refresh access token
- Revoke access token
- Verify ID token
- Get user profile
- Get friendship status
Messaging API
- Send reply message
- Send push message
- Send multicast message
- Send narrowcast message
- Get narrowcast progress status
- Send broadcast message
- Get content
- Get quota
- Get consumption
- Get number of reply messages
- Get number of push messages
- Get number of multicast messages
- Get number of broadcast messages
- Retry api request