ThePrimeagen / harpoon

MIT License
7.14k stars 380 forks source link

Harpoon 2: unclear documentation for the list API #450

Open GaetanLepage opened 10 months ago

GaetanLepage commented 10 months ago

Hello,

It is unclear what are the functions in HarpoonPartialConfigItem (i.e. the configuration for a custom list). The README mentions an add function whereas in this code comment, there is no add function but there is an extra create_list_item.

Which source of information is correct ?

Thanks !

wojciech-kulik commented 10 months ago

I confirm, the example from readme is incorrect. You need to use create_list_item instead of add. Took some time to figure out what's wrong.

It would be also nice to have an example in the readme of how to use named lists. Otherwise, everyone will have to browse the code to figure it out.

GaetanLepage commented 10 months ago

Thank you for the fix :)

fira42073 commented 2 months ago

omg, thanks so much for this issue! I couldn't figure out why add wasn't being called.

Probably a good idea to fix it in the readme too