In this project, I created a chatbot that you can run from your IDE. It connects to the Kiwi IRC Client with Pircbot, and allows access to two API's: OpenWeather and OfficialJokes.
- OpenWeather
- Input -> City and ZIP Code
- Output -> Current Temperature, High, and Low (in Fahrenheit)
- OfficialJokes
- https://github.com/15Dkatz/official_joke_api
- Input -> N/A
- Ouput -> Joke Setup & Punchline
FUNCTION TO RUN: MainFunction.java
- Run MainFunction.java
- It will prompt you with either choosing to get the weather or the second API
- choose A to follow prompts for Weather
- choose B to follow prompts for Jokes
FUNCTION TO RUN: PircBotMain.java
- Open Kiwi IRC & enter a nickname for yourself, and join the channel ‘#pircbot’
- Run PircBotMain.java
- On the freenode site, follow the prompts and the appropriate syntax to call each respective API
- Type 'sohail' to get the respective commands
- ParameterStringBuilder.java
- Called by the API’s when establishing the Http Request connection, gets parameters
- JokesAPI.java
- Calls the OfficialJokes API
- OfficialJokesObject.java
- Used by gson to parse the JSON into this object
- WeatherAPI.java
- Calls the OpenWeather API
- OpenWeather.java
- Used by gson to parse the JSON into this object
- OpenWeather Folder (contains all the child objects of the OpenWeather.java class, for retrieving each individual component from the JSON)
- Clouds.java
- Coordinates.java
- Main.java
- Sys.java
- Weather.java
- Wind.java
- MyBot.java
- Calls the WeatherAPI & JokesAPI. called by PircBotMain in running the bot