Xwilarg / BooruSharp

A C# library to browse Booru websites (Gelbooru, Konachan, E621...) easily
https://boorusharp.zirk.eu
MIT License
75 stars 6 forks source link

Pixiv Bookmarks? #31

Closed da3dsoul closed 3 years ago

da3dsoul commented 3 years ago

I'm trying to port an excessively bad tool I threw together in Python to a legit netcore service, and I'm looking for Pixiv tools to replace PixivUtil2.

The big feature I'm looking for is the ability to get the latest x (pages) of bookmarked images. Is that a possibility?

I looked around in the code, and I saw no mention of it, so I figured I'd ask.

Xwilarg commented 3 years ago

Hi, For now there are only the options to add and remove bookmarks. I'll have a look if I can implement the ability to get bookmarks easily but I can't promise anything tho

I'll keep you in touch with my progresses

da3dsoul commented 3 years ago

I appreciate it. I like that this one implements other options in a generic way. I might take a stab at it if I can get a testing environment up and going.

Xwilarg commented 3 years ago

The ability to get bookmark might not be as generic as the others features since I don't think booru websites have an API endpoint for that

da3dsoul commented 3 years ago

I honestly don't even know which boorus have bookmark-like features.

da3dsoul commented 3 years ago

A flag like many of the others as HasBrowseableBookmarks could be implemented. The only boorus I've used personally are Gelbooru and Konachan

Xwilarg commented 3 years ago

I honestly don't even know which boorus have bookmark-like features.

I think most of them have something like that, if you're asking which ones are implemented in this library, you can use the big table in the README as a reference

A flag like many of the others as HasBrowseableBookmarks could be implemented. The only boorus I've used personally are Gelbooru and Konachan

Since no booru have a "get bookmark" endpoint (except Pixiv) I'll probably only look into this one for now

Xwilarg commented 3 years ago

Well I think I found what was the endpoint to get the bookmarked illustrations ( https://app-api.pixiv.net/v1/user/bookmarks/illust ) I will just need to find a way to clean the unit tests a bit before trying anything, since they are a huge mess right now

Xwilarg commented 3 years ago

Hey,

It's been a bit of time but I began to work on Pixiv bookmark and I wanted to know if it was okay for you before merging it with the main branch It works like that:

var booru = new Pixiv();
await booru.LoginAsync(refresh_token);
var result = await booru.GetFavoritesAsync(profile_id);
da3dsoul commented 3 years ago

Ah neat. Thanks much!

Xwilarg commented 3 years ago

The feature is now available on BooruSharp.Others 2.2.0 (You may need to wait a bit for the page to work)

Feel free to tell me if you need some additional features or if you encounter an issue with this one

da3dsoul commented 3 years ago

Will do. Thanks