See my website for more information!
Welcome to the Chord Function API! This API allows you to determine the chord function based on the key center, chord root, and chord quality.
To use the API, make a POST request to the following URL:
https://chord-function-calculator-03b3fc20902a.herokuapp.com/API/:keyCenter/:chordRoot/:quality
:keyCenter
- The key center (e.g., C, G, D#):chordRoot
- The root of the chord (e.g., C, G, D#):quality
- The quality of the chord (e.g., Major, Major7, Minor)
To get the chord function for a G Major7 chord in the key of C, you would make the following request:
POST https://chord-function-calculator-03b3fc20902a.herokuapp.com/API/C/G/Major7
The response will be a JSON object containing the chord function:
{
"chordFunction": "VIMajor7"
}
You can test the API using a tool like Postman or cURL.
curl -X POST https://chord-function-calculator-03b3fc20902a.herokuapp.com/API/C/G/Major7
I plan to extend the scope of the currently existing testing and to make the error handling more robust:
This includes unit tests for chord calculations and input validation, integration tests for API endpoints and error responses, and performance tests to ensure quick response times. I will standardize error messages, and validate inputs thoroughly.
Future improvements include supporting more chord extended chords, optimizing scalability, providing comprehensive documentation, and enhancing security measures.
I saw firsthand the value of test-driven-development! It greatly increased my development velocity as well as my confidence in the stability of my code.
I also learned that building an API is a lot more fun than I had imagined. I thought I'd like it but it was actually very enjoyable!
Finally, I learned about best practices for standardizing the way chords are represented in code.