Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/comfyfluffy/go-pixiv
A Go API for pixiv's AppAPI.
https://github.com/comfyfluffy/go-pixiv
pixiv pixiv-api
Last synced: about 1 month ago
JSON representation
A Go API for pixiv's AppAPI.
- Host: GitHub
- URL: https://github.com/comfyfluffy/go-pixiv
- Owner: ComfyFluffy
- License: mit
- Created: 2020-03-18T09:31:38.000Z (almost 5 years ago)
- Default Branch: master
- Last Pushed: 2020-10-31T15:12:46.000Z (about 4 years ago)
- Last Synced: 2024-11-13T16:11:57.674Z (about 2 months ago)
- Topics: pixiv, pixiv-api
- Language: Go
- Homepage:
- Size: 84 KB
- Stars: 2
- Watchers: 1
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# go-pixiv
go-pixiv is a Go client for AppAPI of Pixiv.
## Features
* AppAPI
* Auth
* User
* `Detail`
* `Illusts`
* `Novels`
* `BookmarkedIllusts`
* `BookmarkedNovels`
* `Followings`
* `Recommended`
* `IllustBookmarkTags`
* `NovelBookmarkTags`
* Illust
* `AddBookmark`
* `DeleteBookmark`
* `AddHistory`
* `Comments`
* `Detail`
* `Related`
* `NewFromFollowings`
* `NewFromAll`
* `NewFromMyPixiv`
* `UgoiraMetadata`
* `RecommendedIllusts`
* `RecommendedManga`
* `Ranking`
* Novel
* `AddBookmark`
* `DeleteBookmark`
* `AddHistory`
* `Text`
* `Comments`
* `Detail`
* `Recommended`
* `Ranking`
* Comment
* `RepliesIllust`
* `RepliesNovel`
* `AddToIllust`
* `AddToNovel`
* `DeleteFromIllust`
* `DeleteFromNovel`
* Search
* `IllustTrendingTags`
* `NovelTrendingTags`
* `Illusts`
* `PopularIllustsPreview`
* `Novels`
* `PopularNovelsPreview`
* `TagsStartWith`
* `Users`## Install
`go get github.com/WOo0W/go-pixiv`
## Example
```go
package mainimport (
"log"
"github.com/WOo0W/go-pixiv/pixiv"
)func main() {
api := pixiv.New()api.SetUser("[email protected]", "password")
// or api.SetRefreshToken("xxx")r, err := api.User.Detail(123, nil)
if err != nil {
log.Fatal(err)
}
log.Printf("%+v", r)api.Illust.AddBookmark(123, pixiv.RPublic, nil)
api.Illust.AddBookmark(456, pixiv.RPrivate,
&pixiv.AddBookmarkOptions{
Tags: []string{"風景"},
})r2, err := api.Search.Illusts("風景", &pixiv.SearchQuery{
SearchTarget: pixiv.STExactMatchTags,
Sort: pixiv.SDateDesc,
})
if err != nil {
log.Fatal(err)
}
log.Printf("%+v", r2)
log.Print(r2.NextIllusts())
}
```