Skip to content

ComfyFluffy/go-pixiv

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

package main

import (
    "log"
    "github.com/WOo0W/go-pixiv/pixiv"
)

func main() {
    api := pixiv.New()

    api.SetUser("xxx@xxx.com", "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())
}

About

A Go API for pixiv's AppAPI.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages