Context
The goal for balls.lua is to create a library where all functions are predictable and implementation is swift.
The strafesnet api requires an api key parameter to all calls, passing a key for every function would be doable:
print balls :user (" id" , " key" )
print balls :time (" id" , " key" )
print balls :map_wr (" id" , " style" , " key" )
...but there is a better, more simplistic implementation: using classes , or setting a blueprint table to gain inheritance from.
The idea of how the library will look like:
balls .new (" key" )
balls :some_function (" arg1" , " arg2" )
Every function will either be tied to a specific api call or be a mixture/sugar of two or more functions.
Tracking:
API getters
time (time_id)
time_rank (time_id)
recent_time (date?, style?, game?, map?)
recent_wr (style, game. whitelist?)
maps (game?, page?)
map_time (mapid, style?, page?)
map_wr (mapid, style)
user (userid)
user_time (userid, map?, style?, game?, page?)
user_wr (userid, game, style)
user_rank (userid, style, game,)
rank_top (style, game, page?)
Context
The goal for balls.lua is to create a library where all functions are predictable and implementation is swift.
The strafesnet api requires an api key parameter to all calls, passing a key for every function would be doable:
...but there is a better, more simplistic implementation: using classes, or setting a blueprint table to gain inheritance from.
The idea of how the library will look like:
Every function will either be tied to a specific api call or be a mixture/sugar of two or more functions.
Tracking:
API getters
time (time_id)time_rank (time_id)recent_time (date?, style?, game?, map?)recent_wr (style, game. whitelist?)maps (game?, page?)map_time (mapid, style?, page?)map_wr (mapid, style)user (userid)user_time (userid, map?, style?, game?, page?)user_wr (userid, game, style)user_rank (userid, style, game,)rank_top (style, game, page?)