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 |
Data types used in API. This module enables DuplicateRecordFields, so please consider using Web.Pixiv.Types.Lens to access fields smoothly.
Synopsis
- type ImageUrl = Text
- data ImageUrls = ImageUrls {}
- newtype OriginalImageUrl = OriginalImageUrl {}
- data Tag = Tag {
- _name :: Text
- _translatedName :: Maybe Text
- data TrendingTag = TrendingTag {}
- newtype TrendingTags = TrendingTags {
- _trend_tags :: [TrendingTag]
- data Series = Series {}
- data IllustType
- newtype MetaPage = MetaPage {}
- data Illust = Illust {
- _illustId :: Int
- _title :: Text
- _illustType :: IllustType
- _imageUrls :: ImageUrls
- _caption :: Text
- _restrict :: Int
- _user :: User
- _tags :: [Tag]
- _tools :: [Text]
- _createDate :: UTCTime
- _pageCount :: Int
- _width :: Int
- _height :: Int
- _sanityLevel :: Int
- _xRestrict :: Int
- _series :: Maybe Series
- _metaSinglePage :: Maybe OriginalImageUrl
- _metaPages :: [MetaPage]
- _totalView :: Int
- _totalBookmarks :: Int
- _isBookmarked :: Bool
- _visible :: Bool
- _isMuted :: Bool
- _totalComments :: Maybe Int
- data Illusts = Illusts {}
- newtype IllustWrapper = IllustWrapper {}
- data User = User {}
- data UserProfile = UserProfile {
- _webpage :: Maybe Text
- _gender :: Text
- _birth :: Text
- _birthDay :: Text
- _birthYear :: Int
- _region :: Text
- _addressId :: Int
- _countryCode :: Text
- _job :: Text
- _jobId :: Int
- _totalFollowUsers :: Int
- _totalMypixivUsers :: Int
- _totalIllusts :: Int
- _totalManga :: Int
- _totalIllustBookmarksPublic :: Int
- _totalIllustSeries :: Int
- _totalNovelSeries :: Int
- _backgroundImageUrl :: Maybe ImageUrl
- _twitterAccount :: Text
- _twitterUrl :: Maybe Text
- _pawooUrl :: Maybe Text
- _isPreminum :: Maybe Bool
- _isUsingCustomProfileImage :: Bool
- data Publicity
- data ProfilePublicity = ProfilePublicity {}
- data Workspace = Workspace {}
- data UserDetail = UserDetail {}
- data UserPreview = UserPreview {}
- data UserPreviews = UserPreviews {
- _userPreviews :: [UserPreview]
- _nextUrl :: Maybe Text
- data Comment = Comment {}
- data Comments = Comments {}
- type family NextUrlLess a
- class HasNextUrl a where
- unNextUrl :: a -> NextUrlLess a
- getNextUrl :: a -> Maybe Text
- data UgoiraFrame = UgoiraFrame {
- _ugoiraFile :: Text
- _ugoiraDelay :: Int
- newtype ZipUrls = ZipUrls {
- _zipMedium :: Text
- data UgoiraMetadata = UgoiraMetadata {
- _zipUrls :: ZipUrls
- _frames :: [UgoiraFrame]
- newtype UgoiraMetadataWrapper = UgoiraMetadataWrapper {}
- data SpotlightArticle = SpotlightArticle {
- _saId :: Int
- _title :: Text
- _pureTitle :: Text
- _thumbnail :: Text
- _articleUrl :: Text
- _publishDate :: UTCTime
- _category :: Text
- _subcategoryLabel :: Text
- data SpotlightArticles = SpotlightArticles {}
- data RankMode
- = Day
- | DayR18
- | DayMale
- | DayMaleR18
- | DayFemale
- | DayFemaleR18
- | Week
- | WeekR18
- | WeekR18G
- | Month
- | WeekOriginal
- | WeekRookie
- | DayManga
- data SearchTarget
- data SortingMethod
- data Duration
ImageUrl
An object contains image urls.
Instances
newtype OriginalImageUrl Source #
An object contains a single image url.
In Illust
:
"meta_single_page": {
"original_image_url": "..."
}
Instances
Eq OriginalImageUrl Source # | |
Defined in Web.Pixiv.Types (==) :: OriginalImageUrl -> OriginalImageUrl -> Bool # (/=) :: OriginalImageUrl -> OriginalImageUrl -> Bool # | |
Read OriginalImageUrl Source # | |
Defined in Web.Pixiv.Types | |
Show OriginalImageUrl Source # | |
Defined in Web.Pixiv.Types showsPrec :: Int -> OriginalImageUrl -> ShowS # show :: OriginalImageUrl -> String # showList :: [OriginalImageUrl] -> ShowS # | |
ToJSON OriginalImageUrl Source # | |
Defined in Web.Pixiv.Types toJSON :: OriginalImageUrl -> Value # toEncoding :: OriginalImageUrl -> Encoding # toJSONList :: [OriginalImageUrl] -> Value # toEncodingList :: [OriginalImageUrl] -> Encoding # | |
FromJSON OriginalImageUrl Source # | |
Defined in Web.Pixiv.Types parseJSON :: Value -> Parser OriginalImageUrl # parseJSONList :: Value -> Parser [OriginalImageUrl] # | |
HasOriginalImageUrl OriginalImageUrl (Maybe ImageUrl) Source # | |
Defined in Web.Pixiv.Types.Lens | |
HasMetaSinglePage Illust (Maybe OriginalImageUrl) Source # | |
Defined in Web.Pixiv.Types.Lens |
Tag
A tag.
Example:
{
"name": "...",
"translated_name": null
}
data TrendingTag Source #
A trending tag.
Don't confuse with Tag
. TrendingTag
contains Illust
,
and the textual name of the tag is called tag
, instead of name
in Tag
.
Instances
newtype TrendingTags Source #
A wrapper of TrendingTag
s for JSON deserialization.
Instances
Eq TrendingTags Source # | |
Defined in Web.Pixiv.Types (==) :: TrendingTags -> TrendingTags -> Bool # (/=) :: TrendingTags -> TrendingTags -> Bool # | |
Read TrendingTags Source # | |
Defined in Web.Pixiv.Types readsPrec :: Int -> ReadS TrendingTags # readList :: ReadS [TrendingTags] # | |
Show TrendingTags Source # | |
Defined in Web.Pixiv.Types showsPrec :: Int -> TrendingTags -> ShowS # show :: TrendingTags -> String # showList :: [TrendingTags] -> ShowS # | |
ToJSON TrendingTags Source # | |
Defined in Web.Pixiv.Types toJSON :: TrendingTags -> Value # toEncoding :: TrendingTags -> Encoding # toJSONList :: [TrendingTags] -> Value # toEncodingList :: [TrendingTags] -> Encoding # | |
FromJSON TrendingTags Source # | |
Defined in Web.Pixiv.Types parseJSON :: Value -> Parser TrendingTags # parseJSONList :: Value -> Parser [TrendingTags] # |
Illustration
Manga series.
data IllustType Source #
Type of illustration.
In pixiv API, all of illustrations, mangas, and ugoiras are represented in Illust
data type.
So they can be distinguished by IllustType
.
Instances
Illustraion data type.
See IllustType
.
Illust | |
|
Instances
Response of API which returns illustrations.
newtype IllustWrapper Source #
A wrapper of Illust
for JSON deserialization.
Instances
Eq IllustWrapper Source # | |
Defined in Web.Pixiv.Types (==) :: IllustWrapper -> IllustWrapper -> Bool # (/=) :: IllustWrapper -> IllustWrapper -> Bool # | |
Read IllustWrapper Source # | |
Defined in Web.Pixiv.Types readsPrec :: Int -> ReadS IllustWrapper # readList :: ReadS [IllustWrapper] # | |
Show IllustWrapper Source # | |
Defined in Web.Pixiv.Types showsPrec :: Int -> IllustWrapper -> ShowS # show :: IllustWrapper -> String # showList :: [IllustWrapper] -> ShowS # | |
ToJSON IllustWrapper Source # | |
Defined in Web.Pixiv.Types toJSON :: IllustWrapper -> Value # toEncoding :: IllustWrapper -> Encoding # toJSONList :: [IllustWrapper] -> Value # toEncodingList :: [IllustWrapper] -> Encoding # | |
FromJSON IllustWrapper Source # | |
Defined in Web.Pixiv.Types parseJSON :: Value -> Parser IllustWrapper # parseJSONList :: Value -> Parser [IllustWrapper] # |
User
User data type.
Instances
Eq User Source # | |
Read User Source # | |
Show User Source # | |
ToJSON User Source # | |
Defined in Web.Pixiv.Types | |
FromJSON User Source # | |
HasName User Text Source # | |
HasUser Illust User Source # | |
HasUser UserDetail User Source # | |
Defined in Web.Pixiv.Types.Lens | |
HasUser UserPreview User Source # | |
Defined in Web.Pixiv.Types.Lens | |
HasUser Comment User Source # | |
HasUserId User Int Source # | |
HasProfileImageUrls User ImageUrls Source # | |
Defined in Web.Pixiv.Types.Lens | |
HasAccount User Text Source # | |
HasIsFollowed User (Maybe Bool) Source # | |
Defined in Web.Pixiv.Types.Lens | |
HasComment User (Maybe Text) Source # | |
data UserProfile Source #
UserProfile data type.
Not sure if all fields are covered, and maybe some fields should be optional.
UserProfile | |
|
Instances
Publicity data type.
The value public
or private
are present in ProfilePublicity
.
This type is also used in restrict
query param.
Instances
data ProfilePublicity Source #
Profile publicity of a user.
Not sure if all fields are covered, and maybe some fields should be optional.
Instances
Workspace information of a user. Not sure if all fields are covered, and maybe some fields should be optional.
Instances
data UserDetail Source #
Details of a user.
Instances
data UserPreview Source #
A preview of user information.
Except getUserDetail
, other API involving users return this data type.
Instances
data UserPreviews Source #
Response of API which returns user previews.
Instances
Eq UserPreviews Source # | |
Defined in Web.Pixiv.Types (==) :: UserPreviews -> UserPreviews -> Bool # (/=) :: UserPreviews -> UserPreviews -> Bool # | |
Read UserPreviews Source # | |
Defined in Web.Pixiv.Types readsPrec :: Int -> ReadS UserPreviews # readList :: ReadS [UserPreviews] # | |
Show UserPreviews Source # | |
Defined in Web.Pixiv.Types showsPrec :: Int -> UserPreviews -> ShowS # show :: UserPreviews -> String # showList :: [UserPreviews] -> ShowS # | |
ToJSON UserPreviews Source # | |
Defined in Web.Pixiv.Types toJSON :: UserPreviews -> Value # toEncoding :: UserPreviews -> Encoding # toJSONList :: [UserPreviews] -> Value # toEncodingList :: [UserPreviews] -> Encoding # | |
FromJSON UserPreviews Source # | |
Defined in Web.Pixiv.Types parseJSON :: Value -> Parser UserPreviews # parseJSONList :: Value -> Parser [UserPreviews] # | |
HasNextUrl UserPreviews Source # | |
Defined in Web.Pixiv.Types | |
type NextUrlLess UserPreviews Source # | |
Defined in Web.Pixiv.Types |
Comment
A comment.
Instances
Eq Comment Source # | |
Read Comment Source # | |
Show Comment Source # | |
ToJSON Comment Source # | |
Defined in Web.Pixiv.Types | |
FromJSON Comment Source # | |
HasUser Comment User Source # | |
HasComment Comment Text Source # | |
HasDate Comment UTCTime Source # | |
HasCommentId Comment Int Source # | |
HasParentComment Comment (Maybe Value) Source # | |
Defined in Web.Pixiv.Types.Lens |
Response of API which returns comments.
NextUrl
type family NextUrlLess a Source #
Undecorate next_url
of a type.
next_url
is returned by some APIs for paging.
Instances
type NextUrlLess Illusts Source # | |
Defined in Web.Pixiv.Types | |
type NextUrlLess UserPreviews Source # | |
Defined in Web.Pixiv.Types | |
type NextUrlLess Comments Source # | |
Defined in Web.Pixiv.Types | |
type NextUrlLess SpotlightArticles Source # | |
Defined in Web.Pixiv.Types |
class HasNextUrl a where Source #
Class to get or unwrap next_url
.
unNextUrl :: a -> NextUrlLess a Source #
getNextUrl :: a -> Maybe Text Source #
Instances
HasNextUrl Illusts Source # | |
Defined in Web.Pixiv.Types | |
HasNextUrl UserPreviews Source # | |
Defined in Web.Pixiv.Types | |
HasNextUrl Comments Source # | |
Defined in Web.Pixiv.Types | |
HasNextUrl SpotlightArticles Source # | |
Defined in Web.Pixiv.Types |
Ugoria
data UgoiraFrame Source #
A ugoira frame.
UgoiraFrame | |
|
Instances
A wrapper of ugoira zip file url.
data UgoiraMetadata Source #
Ugoira is a frame animation, whose common information is represented in Illust
.
This metadata contains a link to download the zip archive, which compresses frames of the ugoira;
and UgoiraFrame
s to represents metadata of each frame.
Using getUgoiraMetadata
can obtain value of this type.
See ugoiraMetadataToFFConcat
and downloadUgoiraToMP4
.
UgoiraMetadata | |
|
Instances
newtype UgoiraMetadataWrapper Source #
A wrapper of UgoiraMetadata
for JSON deserialization.
Instances
Eq UgoiraMetadataWrapper Source # | |
Defined in Web.Pixiv.Types (==) :: UgoiraMetadataWrapper -> UgoiraMetadataWrapper -> Bool # (/=) :: UgoiraMetadataWrapper -> UgoiraMetadataWrapper -> Bool # | |
Read UgoiraMetadataWrapper Source # | |
Defined in Web.Pixiv.Types | |
Show UgoiraMetadataWrapper Source # | |
Defined in Web.Pixiv.Types showsPrec :: Int -> UgoiraMetadataWrapper -> ShowS # show :: UgoiraMetadataWrapper -> String # showList :: [UgoiraMetadataWrapper] -> ShowS # | |
ToJSON UgoiraMetadataWrapper Source # | |
Defined in Web.Pixiv.Types toJSON :: UgoiraMetadataWrapper -> Value # toEncoding :: UgoiraMetadataWrapper -> Encoding # toJSONList :: [UgoiraMetadataWrapper] -> Value # toEncodingList :: [UgoiraMetadataWrapper] -> Encoding # | |
FromJSON UgoiraMetadataWrapper Source # | |
Defined in Web.Pixiv.Types parseJSON :: Value -> Parser UgoiraMetadataWrapper # parseJSONList :: Value -> Parser [UgoiraMetadataWrapper] # |
Article
data SpotlightArticle Source #
Spotlight article.
SpotlightArticle | |
|
Instances
Eq SpotlightArticle Source # | |
Defined in Web.Pixiv.Types (==) :: SpotlightArticle -> SpotlightArticle -> Bool # (/=) :: SpotlightArticle -> SpotlightArticle -> Bool # | |
Read SpotlightArticle Source # | |
Defined in Web.Pixiv.Types | |
Show SpotlightArticle Source # | |
Defined in Web.Pixiv.Types showsPrec :: Int -> SpotlightArticle -> ShowS # show :: SpotlightArticle -> String # showList :: [SpotlightArticle] -> ShowS # | |
ToJSON SpotlightArticle Source # | |
Defined in Web.Pixiv.Types toJSON :: SpotlightArticle -> Value # toEncoding :: SpotlightArticle -> Encoding # toJSONList :: [SpotlightArticle] -> Value # toEncodingList :: [SpotlightArticle] -> Encoding # | |
FromJSON SpotlightArticle Source # | |
Defined in Web.Pixiv.Types parseJSON :: Value -> Parser SpotlightArticle # parseJSONList :: Value -> Parser [SpotlightArticle] # |
data SpotlightArticles Source #
Response of API which returns spotlight articles.
Instances
Eq SpotlightArticles Source # | |
Defined in Web.Pixiv.Types (==) :: SpotlightArticles -> SpotlightArticles -> Bool # (/=) :: SpotlightArticles -> SpotlightArticles -> Bool # | |
Read SpotlightArticles Source # | |
Defined in Web.Pixiv.Types | |
Show SpotlightArticles Source # | |
Defined in Web.Pixiv.Types showsPrec :: Int -> SpotlightArticles -> ShowS # show :: SpotlightArticles -> String # showList :: [SpotlightArticles] -> ShowS # | |
ToJSON SpotlightArticles Source # | |
Defined in Web.Pixiv.Types toJSON :: SpotlightArticles -> Value # toEncoding :: SpotlightArticles -> Encoding # toJSONList :: [SpotlightArticles] -> Value # toEncodingList :: [SpotlightArticles] -> Encoding # | |
FromJSON SpotlightArticles Source # | |
Defined in Web.Pixiv.Types parseJSON :: Value -> Parser SpotlightArticles # parseJSONList :: Value -> Parser [SpotlightArticles] # | |
HasNextUrl SpotlightArticles Source # | |
Defined in Web.Pixiv.Types | |
type NextUrlLess SpotlightArticles Source # | |
Defined in Web.Pixiv.Types |
Http
Rank mode query parm.
See getIllustRanking
Day | |
DayR18 | |
DayMale | |
DayMaleR18 | |
DayFemale | |
DayFemaleR18 | |
Week | |
WeekR18 | |
WeekR18G | |
Month | |
WeekOriginal | |
WeekRookie | |
DayManga |
Instances
Enum RankMode Source # | |
Eq RankMode Source # | |
Ord RankMode Source # | |
Defined in Web.Pixiv.Types | |
Read RankMode Source # | |
Show RankMode Source # | |
ToHttpApiData RankMode Source # | |
Defined in Web.Pixiv.Types toUrlPiece :: RankMode -> Text # toEncodedUrlPiece :: RankMode -> Builder # toHeader :: RankMode -> ByteString # toQueryParam :: RankMode -> Text # |
data SearchTarget Source #
Search target query parm.
See searchIllust
.
Instances
data SortingMethod Source #
Sorting method query parm.
See searchIllust
and searchUser
.
Instances
Duration query parm.
See searchIllust
.
Instances
Eq Duration Source # | |
Ord Duration Source # | |
Defined in Web.Pixiv.Types | |
Read Duration Source # | |
Show Duration Source # | |
ToHttpApiData Duration Source # | |
Defined in Web.Pixiv.Types toUrlPiece :: Duration -> Text # toEncodedUrlPiece :: Duration -> Builder # toHeader :: Duration -> ByteString # toQueryParam :: Duration -> Text # |