To get the time for a place we need to geocode the location we were asked for. Let's use an API by Google to accomplish that.
- [Instructor] Our goal is to get the local time…for city name,…and to find that out we need the time zone a city is in.…Luckily, Google provides an API for getting the time zone…for our location;…and if we look how this time zone API works actually,…so there is aN sample request down here.…We see that the location has to be paste in…as coordinates longitude and latitude.…To get this information,…we need to geocode the city name;…and Google provides a geocoding API as well.…
So geocoding means that a location name…will be converted into longitude and latitude coordinates.…To use this API, you will need a Google account…to create an API key.…You most probably have one;…otherwise please create one.…Then on top of the page,…let's click on get a key.…You might be asked to select a project…and then click on enable API here.…And here is your API key.…We copy this out…and open visual studio…and let's put it in here as comment…and to know which key this is,…this is the geocoding key.…
We copy it in here,…just for later reference.…
After explaining some basics about Node.js and microservices, Daniel shows you how to sketch out the planned architecture for your application and get the boilerplate code, modules, and credentials in place. Next, he shows how to create a bot user in Slack, connect to Slack, and post messages. He also shows you how to get your bot to process variations in text by creating logic that delegates the processing of intent to dedicated modules. Lastly, he shows how to register additional services and he covers how to use monitoring to identify architectural or performance issues.
- Using Slack APIs
- Sketching out a Slack bot architecture
- Setting up a project and choosing modules
- Creating and naming your bot
- Connecting to Slack
- Setting up and using natural language processing
- Routing by intents
- Implementing geocoding and time calculation
- Adding and monitoring services