Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/miguelargentina/microverse-ruby-capstone-project
A Ruby developed Telegram bot to get the weather forecast based on the GPS location or searching for a location in Open Weather Map
https://github.com/miguelargentina/microverse-ruby-capstone-project
ruby telegram-bot
Last synced: about 1 month ago
JSON representation
A Ruby developed Telegram bot to get the weather forecast based on the GPS location or searching for a location in Open Weather Map
- Host: GitHub
- URL: https://github.com/miguelargentina/microverse-ruby-capstone-project
- Owner: MiguelArgentina
- License: mit
- Created: 2021-02-25T19:13:34.000Z (almost 4 years ago)
- Default Branch: develop
- Last Pushed: 2021-03-01T03:04:09.000Z (almost 4 years ago)
- Last Synced: 2024-10-18T16:17:36.680Z (3 months ago)
- Topics: ruby, telegram-bot
- Language: Ruby
- Homepage:
- Size: 3.73 MB
- Stars: 5
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
![](https://img.shields.io/badge/Microverse-blueviolet)
# Telegram Bot
> This is the capstone project for the Ruby module in Microverse 2.0 program
## Built With
- Ruby
## Features
- Get weather forecast given the user's GPS location
- Get weather forecast for any given city within OpenWeather's API (>200.000 cities)
- Search function to retrieve up to 10 cities matching the search criteria. (if more than 20 results are given, user will be asked to narrow the search criteria)
- Echo function to test if the bot is active
- Log file to save user, location required and time## Getting Started
### Prerequisites
* Telegram application installed in your cellphone or in your computer
* Available internet connection
* Join [Weather Bot](https://t.me/tucu_clima_bot) channel or
* create a new bot sending a message to [@BotFather](https://telegram.me/BotFather) and follow further instructions to create the bot and get the token
* Get an API key from [OpenWeatherMap](https://home.openweathermap.org/) to access their forecasts [Instructions here](https://openweathermap.org/api)
>Note to TSEs: both Telegram and OW API key will be provided in Code Request
* Permission for accessing GPS from within the app
* Follow instructions### Setup
* For TSEs: please fill in Telegram Token and API key in ```tokens.rb``` class
* Clone the repository
* Get into the repository's root folder
* Run ```bundle install``` to install the needed gems
* Execute the ```./bin/main.rb``` file to start the bot (the tokens needed will be given in private)### Usage
* Once the bot has been started, you may test it via the Telegram Bot's Channel.
> Available commands
* ```/start``` to start the bot
* ```/stop``` to stop the bot
* ```/echo``` to test if the bot is active
* ```/weather``` to let the bot know the user will require a forecast
* ```/mylocation``` to let the bot know the user will require a forecast based on GPS current location> (All commands are clickable from within the Telegram app)
### Video with a presentation on how the bot works
[Link to the video](https://www.loom.com/share/4e785bb6aa1b46a88ca832df3740d493)
## Author
### Miguel Gomez
* GitHub: [@MiguelArgentina](https://github.com/MiguelArgentina)
* twitter - https://twitter.com/Qete_arg## 🤝 Contributing
Contributions, issues, and feature requests are welcome!
Feel free to check the [issues page](https://github.com/MiguelArgentina/microverse-ruby-capstone-project/issues).
## Show your support
Give a ⭐️ if you like this project!
## 📝 License
This project is [MIT](https://github.com/MiguelArgentina/microverse-ruby-capstone-project/blob/main/LICENSE) licensed.