Cleaner API #2

Open
opened 2026-02-04 22:59:18 +01:00 by theBreadCompany · 0 comments

Currently the bindings are pretty "raw", i.e. the data models are used directly instead of nice wrappers that prevent the need for map chains just to dig through to some property. The same goes for the endpoints, the client provides access to most of the routes, but in a pretty raw sharp way without i.e. builder patterns, which makes clippy mad because i.e. too many arguments per function.

This will be a breaking change.

  • Wrap types where it makes sense
  • Provide those wrapper types with methods that take a client and return a builder or smth
Currently the bindings are pretty "raw", i.e. the data models are used directly instead of nice wrappers that prevent the need for map chains just to dig through to some property. The same goes for the endpoints, the client provides access to most of the routes, but in a pretty raw sharp way without i.e. builder patterns, which makes clippy mad because i.e. too many arguments per function. _This will be a breaking change._ - [ ] Wrap types where it makes sense - [ ] Provide those wrapper types with methods that take a client and return a builder or smth
Sign in to join this conversation.
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
theBreadCompany/libpixiv#2
No description provided.