jacob-macleod / Dolphin-Flashcard-App

http://www.dolphinflashcards.com
MIT License
1 stars 3 forks source link

statistics.py: wrote the documentation for its endpoints #72

Closed kenudeh closed 4 months ago

kenudeh commented 4 months ago

I corrected all the errors you identified in the document. Meanwhile, since the data type for all the request body parameters in the /calculate-card-stats endpoint is a string, shouldn't the values in the response object also be documented as a string? Or should I leave them as is?

jacob-macleod commented 4 months ago

If the values are written as "integer", I feel that would suggest that the value is an integer, encapsulated by strings so in string format. According to that logic, if there are any values in the format float or integer, with no ", they should be changed to be encapsulated with ".

If you feel that's confusing though, then probably best to change it to just strings

kenudeh commented 4 months ago

I completely agree with your first point, however, I think there's no need to write the data types of the keys in the response object, I should just include a sample value in place of each data type. For example, the cardStreak key should have 5 instead of integer (or string). The same goes for cardStatus, it should also bear right or wrong in place of string. What do you think? If I get your opinion on that, I'll make the change and update this PR.

jacob-macleod commented 4 months ago

Ah yeah, that's a better solution. Once you've made those changes, I'll merge the pull request

kenudeh commented 4 months ago

I've now made the changes.

jacob-macleod commented 4 months ago

Thanks