| Copyright | (c) 2021 The closed eye of love |
|---|---|
| License | BSD-3-Clause |
| Maintainer | Poscat <poscat@mail.poscat.moe>, berberman <berberman@yandex.com> |
| Stability | alpha |
| Portability | portable |
| Safe Haskell | None |
| Language | Haskell2010 |
Web.Pixiv.API
Description
Functions to access pixiv api. They are supposed to be run in Web.Pixiv.Types.PixivT.
You may notice that except getUserBookmarks, many of functions take a page as input.
This is because each query contains 30 entries (except getSpotlightArticles's , which containes 10), i.e. you should pass 2 if you want items ranged from 31 to 60.
Synopsis
- getTrendingTags :: MonadPixiv m => Maybe Bool -> m [TrendingTag]
- getRecommendedIllusts :: MonadPixiv m => Maybe Bool -> Maybe Bool -> m [Illust]
- getRecommendedMangas :: MonadPixiv m => Maybe Bool -> Maybe Bool -> m [Illust]
- getIllustDetail :: MonadPixiv m => Int -> m Illust
- getIllustComments :: MonadPixiv m => Int -> Int -> m Comments
- getIllustRelated :: MonadPixiv m => Int -> Int -> m [Illust]
- getIllustRanking :: MonadPixiv m => Maybe RankMode -> Int -> m [Illust]
- getIllustFollow :: MonadPixiv m => Publicity -> Int -> m [Illust]
- getIllustNew :: MonadPixiv m => Int -> m [Illust]
- getUgoiraMetadata :: MonadPixiv m => Int -> m UgoiraMetadata
- searchIllust :: MonadPixiv m => SearchTarget -> Text -> Maybe Bool -> Maybe SortingMethod -> Maybe Duration -> Int -> m [Illust]
- searchUser :: MonadPixiv m => Text -> Int -> m [UserPreview]
- getUserDetail :: MonadPixiv m => Int -> m UserDetail
- getUserIllusts :: MonadPixiv m => Int -> Maybe IllustType -> Int -> m [Illust]
- getUserFollowing :: MonadPixiv m => Int -> Publicity -> Int -> m [UserPreview]
- getUserFollower :: MonadPixiv m => Int -> Int -> m [UserPreview]
- getUserMypixiv :: MonadPixiv m => Int -> Int -> m [UserPreview]
- getUserBookmarks :: MonadPixiv m => Int -> Publicity -> Maybe Int -> m ([Illust], Maybe Int)
- getSpotlightArticles :: MonadPixiv m => Maybe Text -> Int -> m [SpotlightArticle]
Trending
Arguments
| :: MonadPixiv m | |
| => Maybe Bool | includes translated tag results |
| -> m [TrendingTag] |
Gets trending tags.
getRecommendedIllusts Source #
Arguments
| :: MonadPixiv m | |
| => Maybe Bool | includes privacy policy |
| -> Maybe Bool | includes translated tag results |
| -> m [Illust] |
Gets recommended illustrations of the account which is used for login.
getRecommendedMangas :: MonadPixiv m => Maybe Bool -> Maybe Bool -> m [Illust] Source #
Gets recommended mangas of the account which is used for login.
Illust
Arguments
| :: MonadPixiv m | |
| => Int | illust id |
| -> m Illust |
Gets the details of a illustration.
Arguments
| :: MonadPixiv m | |
| => Int | illust id |
| -> Int | page |
| -> m Comments |
Gets the comments of a illustration.
Arguments
| :: MonadPixiv m | |
| => Int | illust id |
| -> Int | page |
| -> m [Illust] |
Gets related illustrations.
Arguments
| :: MonadPixiv m | |
| => Maybe RankMode | rank mode |
| -> Int | page |
| -> m [Illust] |
Gets ranking illustrations.
Arguments
| :: MonadPixiv m | |
| => Publicity | restrict |
| -> Int | page |
| -> m [Illust] |
Gets illustrations of artists which the login account follows.
Arguments
| :: MonadPixiv m | |
| => Int | page |
| -> m [Illust] |
Gets the newest illustrations.
Arguments
| :: MonadPixiv m | |
| => Int | illust id |
| -> m UgoiraMetadata |
Gets the metadata of a ugoira
Search
Arguments
| :: MonadPixiv m | |
| => SearchTarget | search target |
| -> Text | word |
| -> Maybe Bool | includes translated tag |
| -> Maybe SortingMethod | sorting method |
| -> Maybe Duration | duration |
| -> Int | page |
| -> m [Illust] |
Searches an illustration.
Arguments
| :: MonadPixiv m | |
| => Text | word |
| -> Int | page |
| -> m [UserPreview] |
Searches an user.
User
Arguments
| :: MonadPixiv m | |
| => Int | user id |
| -> m UserDetail |
Gets the details of an user.
Arguments
| :: MonadPixiv m | |
| => Int | user id |
| -> Maybe IllustType | illust type |
| -> Int | page |
| -> m [Illust] |
Gets illustrations submitted by a specific user.
Arguments
| :: MonadPixiv m | |
| => Int | user id |
| -> Publicity | restrict |
| -> Int | page |
| -> m [UserPreview] |
Gets the following of an user.
Arguments
| :: MonadPixiv m | |
| => Int | user id |
| -> Int | page |
| -> m [UserPreview] |
Gets the followers of an user.
Arguments
| :: MonadPixiv m | |
| => Int | user id |
| -> Int | page |
| -> m [UserPreview] |
Gets mypixiv of an user.
Arguments
| :: MonadPixiv m | |
| => Int | user id |
| -> Publicity | restrict |
| -> Maybe Int | the last illust id of this query |
| -> m ([Illust], Maybe Int) |
Gets illustrations collected by a specific user. Returns the a list of illustrations and result and an integer for paging.
Article
Arguments
| :: MonadPixiv m | |
| => Maybe Text | category |
| -> Int | page |
| -> m [SpotlightArticle] |
Gets spotlight articles