Chris Pollett > Students > Nukala

    Print View

    [Bio]

    [Blog]

    [CS297 Project Proposal]

    [Deliverable-1]

    [Deliverable-2]

    [Deliverable-3]

    [Deliverable-4]

    [CS 297 Report_PDF]

    [CS 298 Project Proposal]

    [CS 298 Report_PDF]

    [CS 298 Presentation_PDF]

























Test weather bot in Yioop

Description: I am creating a weather bot to get weather information whenever I ask. For this, I have created a web application that gets weather forecast for a given city from yahoo weather API (external source). It requests yahoo weather API using curl and retrieves the page with the weather forecast details for a given city. The forecast details are returned as json object. To display the weather information, the returned json object is parsed and retrieved the necessary information which are temperature and condition. The response is constructed properly with temperature and condition of a particular location. On running this application, the weather information is displayed.

I have created a bot user and picked username as wbot and bot callback URL as the above running application URL. Also the bot user has joined a group. Whenever a user (bob) mention this wbot in a group thread, the bot gets activated using bot callback URL which takes message from the user and responds to it very quickly. The image below is the output when testing weather bot.

weather bot

Code for the weather bot can be found here:weather_bot.patch