Skip to content

Telegram bot for Unsplash service in aws api gateway and aws lambda.

License

Notifications You must be signed in to change notification settings

angelabad/unsplash-telegram-bot

Repository files navigation

unsplash-telegram-bot

Build Status

Telegram bot for Unsplash service in aws api gateway and aws lambda.

This bot is built using Go Programming Language on top of Sparta library, you can see documentation about how to provision or test bot here

To run this bot you should have an AWS account, and it can incurs in costs. You also need a telegram bot created and its token and an unsplash api token.

You can use Glide to install vendor deps:

$ curl https://glide.sh/get | sh
$ glide install

(you could use only go get, but in this case its possible to have error with vendor versions)

You can define environment variables in your system (replace *** with your tokens):

BOT_TELEGRAMID=***
BOT_UNSPLASHID=***

Or if you prefer you can create a file called config.json with this content (replace *** with your tokens):

{
  "unsplashID": "***",
  "telegramID": "***"
}

Now you can explore the service with:

$ go run !(*_test).go explore

You can provision bot, you need to have your aws credentials configured:

$ export AWS_REGION=us-west-2 (or another)
$ go run !(*_test).go provision --help

Provision with existing bucket

$ export AWS_REGION=us-west-2 (or another)
$ go run !(*_test).go provision -s YOURBUCKET

About

Telegram bot for Unsplash service in aws api gateway and aws lambda.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages