DaBoyBacon / SWE_Project_S24

AI-powered game recommendations
2 stars 0 forks source link

API Limit modify #43

Closed alyxx2214 closed 6 months ago

alyxx2214 commented 6 months ago

make it so that

When timer.canInc() is called, if call# < 60, call#++, and return TRUE; else, return FALSE

alyxx2214 commented 6 months ago

ClassObject = AuthLimit.AuthTimer() ClassObject.canInc() -> If apiCallsInMinute<60: true ; else: false ClassObject.getInc() -> # of times canInc has been called before last reset

AuthTimer has a value incrVal. This gets incremented every time canInc() is called (until it reaches 60). After 60 seconds, that value gets reset to 0. Calling getInc() will give this value.

Merged to main just now