-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add README.md to the examples directory
- Loading branch information
1 parent
9803c8d
commit 173c2cc
Showing
1 changed file
with
18 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
# Usage examples | ||
|
||
This directory contains examples on how to use the library properly. Currently two examples are available: | ||
- [Simple Telegram transport (only text messages are supported)](telegram) | ||
- [MG Webhook processing example](webhooks) | ||
|
||
## `telegram` | ||
|
||
How to run the example: | ||
1. Copy `config.json.dist` to `config.json`. | ||
2. Replace placeholder values in the `config.json` with your data. You'll need a service like ngrok.io for that. | ||
3. Navigate to `telegram` directory via terminal and run `go run ./...` | ||
|
||
The sample will automatically register itself in the target system and will begin transferring the messages between Telegram and MessageGateway. | ||
|
||
## `webhook` | ||
|
||
You can run this example by executing `go run /...`. Transport API webhooks from MessageGateway should be sent to the `/api/v1/webhook` route. |