42Berlin/api42lib ? reverse-engineered prompt
Reverse engineered prompt
Build me a small Python library that makes it easy to talk to the 42 Network API.
I want one simple client class that reads a YAML config file with my API credentials, handles login and token refresh automatically, and lets me call endpoints with plain strings instead of worrying about the full URL. It should work with both the older 42 API routes and the newer v3 routes, and support basic request methods like GET, POST, PATCH, PUT, and DELETE.
Please also add helpers to fetch every page of a paginated endpoint, including a threaded version that speeds things up when there are lots of pages. It should accept request parameters like filters, sorting, and ranges, and return normal response objects I can turn into JSON.
Make it easy to use from a script, include a sample config file, and add tests for the main behavior. If you need to check the current API docs online, go ahead and do that.
Are you gonna build this?
make sure you review the code using coderabbit