-
Notifications
You must be signed in to change notification settings - Fork 0
Individual Contribution Report 2 | Emre Türker
- Learning Flask and Git
- Creating Meeting Notes #17
- Creating Meeting Notes #18
- Researching the Bored API
- Integrating the Bored API and Implementing Related Functionalities
- Implementing Unit Tests
- Writing the Executive Summary Section
- Forming an Individual Contribution Page
- Creating Meeting Notes #20
During this project, I have made use of the Bored API. The Bored API is a free public API that provides a way for developers to access a database of activity suggestions for people who are bored and looking for something to do. The suggestions range from "Learn Kotlin" to "Go to the gym".
I used this application to implement the GET functionality. The URL I have sent requests to is:
http://www.boredapi.com/api/activity/ This request takes no argument, and returns a response that includes the activity name.
I have implemented 4 endpoints.
-
**"bored()" -- "/bored"**
: Whenever a GET request comes to this endpoint, the handler function sends a request to the Bored API and presents the response by rendering a HTML page to the client. -
**"bored_save()" -- "/bored/save"**
: Whenever a POST request comes to this endpoint, the handler functions takes the input activity and saves it to the database -
**"get_bored_saved()" -- "/bored/getSaved"**
: Whenever a GET request comes to this endpoint, the handler function runs a query and gets all the activities that are stored in the database and renders an HTML page to the client with the activities in it. -
**"delete_bored_saved()" -- "/bored/delete"**
: Whenever a POST request comes to this endpoint, the handler function runs a query and deletes all the activities that are present in the database.
There are 7 unit tests that I have included
- test_signup() => Checks if the user was able to successfully sign up to the system
- test_login() => Checks if the user was able to successfully log in to the system, and that the user is a member of the system.
- test_invalied_login() => Checks if the system was able to detect that the user was not a member of the system.
- test_save_bored() => Checks if a mockup activity was successfully saved to the database
- test_show_saved_activities() => Checks if the system was able to show all the activities that are present in the database
Since I am directly rendering HTML templates from the server, there is no actual JSON data that is going on between the frontend and backend. If we had an actual frontend that was sending real AJAX calls rather than using HTML templating I could easily detect the JSON information that was sent back and forth.
The request header that I send to the Bored API is as follows
The request body is empty.
The response is as follows
{ "activity": "Learn to write with your nondominant hand", "type": "recreational", "participants": 1, "price": 0, "link": "", "key": "1645485", "accessibility": 0.02 }
The hardest challenge I have come across was how counter intuitive was the Flask framework. I am used to the mechanics Node.js and Go, and I believe that the rendering mechanism of Flask was a real pain.
- Ahmet Kudu
- Beyzanur Bektan
- Emre Sin
- Emre Türker
- Erkam Kavak
- Halis Ayberk Erdem
- Hüseyin Çivi
- Ömer Bahadıroğlu
- Ömer Talip Akalın
- Sena Özpınar
- Süleyman Melih Portakal
- Umut Demir
- Muhammet Mustafa Küçük
- Scenarios
- Mockups
- Meeting #1 - 03.03.2023
- Meeting #2 - 10.03.2023
- Meeting #3 - 12.03.2023
- Meeting #4 - 13.03.2023
- Meeting #5 - 19.03.2023
- Meeting #6 - 24.03.2023
- Meeting #7 - 26.03.2023
- Meeting #8 - 30.03.2023
- Meeting #9 - 02.04.2023
- Meeting #10 - 04.04.2023
- Meeting #11 - 05.04.2023
- Meeting #12 - 06.04.2023
- Meeting #13 - 07.04.2023
- Meeting #14 - 08.04.2023
- Meeting #15 - 09.04.2023
- Meeting #16 - 27.04.2023
- Meeting #17 - 30.04.2023
- Meeting #18 - 04.05.2023
- Meeting #19 - 07.05.2023
- Meeting #20 - 11.05.2023
- Meeting #21 - 05.10.2023
- Meeting #22 - 11.10.2023
- Meeting #23 - 16.10.2023
- Meeting #1 - 21.10.2023 (Backend)
- Meeting #1 - 22.10.2023 (Frontend)