| 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.Types
Description
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.
Constructors
| ImageUrls | |
Instances
newtype OriginalImageUrl Source #
An object contains a single image url.
In Illust:
"meta_single_page": {
"original_image_url": "..."
}
Constructors
| OriginalImageUrl | |
Fields | |
Instances
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.
Constructors
| TrendingTag | |
Instances
| Eq TrendingTag Source # | |
Defined in Web.Pixiv.Types | |
| Read TrendingTag Source # | |
Defined in Web.Pixiv.Types Methods readsPrec :: Int -> ReadS TrendingTag # readList :: ReadS [TrendingTag] # readPrec :: ReadPrec TrendingTag # readListPrec :: ReadPrec [TrendingTag] # | |
| Show TrendingTag Source # | |
Defined in Web.Pixiv.Types Methods showsPrec :: Int -> TrendingTag -> ShowS # show :: TrendingTag -> String # showList :: [TrendingTag] -> ShowS # | |
| ToJSON TrendingTag Source # | |
Defined in Web.Pixiv.Types Methods toJSON :: TrendingTag -> Value # toEncoding :: TrendingTag -> Encoding # toJSONList :: [TrendingTag] -> Value # toEncodingList :: [TrendingTag] -> Encoding # | |
| FromJSON TrendingTag Source # | |
Defined in Web.Pixiv.Types | |
| HasTrendTag TrendingTag Text Source # | |
Defined in Web.Pixiv.Types.Lens | |
| HasIllust TrendingTag Illust Source # | |
Defined in Web.Pixiv.Types.Lens | |
| HasTranslatedName TrendingTag (Maybe Text) Source # | |
Defined in Web.Pixiv.Types.Lens Methods | |
newtype TrendingTags Source #
A wrapper of TrendingTags for JSON deserialization.
Constructors
| TrendingTags | |
Fields
| |
Instances
| Eq TrendingTags Source # | |
Defined in Web.Pixiv.Types | |
| Read TrendingTags Source # | |
Defined in Web.Pixiv.Types Methods readsPrec :: Int -> ReadS TrendingTags # readList :: ReadS [TrendingTags] # | |
| Show TrendingTags Source # | |
Defined in Web.Pixiv.Types Methods showsPrec :: Int -> TrendingTags -> ShowS # show :: TrendingTags -> String # showList :: [TrendingTags] -> ShowS # | |
| ToJSON TrendingTags Source # | |
Defined in Web.Pixiv.Types Methods toJSON :: TrendingTags -> Value # toEncoding :: TrendingTags -> Encoding # toJSONList :: [TrendingTags] -> Value # toEncodingList :: [TrendingTags] -> Encoding # | |
| FromJSON TrendingTags Source # | |
Defined in Web.Pixiv.Types | |
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.
Constructors
| TypeIllust | |
| TypeManga | |
| TypeUgoira |
Instances
Constructors
| MetaPage | |
Fields | |
Illustraion data type.
See IllustType.
Constructors
| Illust | |
Fields
| |
Instances
Response of API which returns illustrations.
newtype IllustWrapper Source #
A wrapper of Illust for JSON deserialization.
Constructors
| IllustWrapper | |
Instances
| Eq IllustWrapper Source # | |
Defined in Web.Pixiv.Types Methods (==) :: IllustWrapper -> IllustWrapper -> Bool # (/=) :: IllustWrapper -> IllustWrapper -> Bool # | |
| Read IllustWrapper Source # | |
Defined in Web.Pixiv.Types Methods readsPrec :: Int -> ReadS IllustWrapper # readList :: ReadS [IllustWrapper] # | |
| Show IllustWrapper Source # | |
Defined in Web.Pixiv.Types Methods showsPrec :: Int -> IllustWrapper -> ShowS # show :: IllustWrapper -> String # showList :: [IllustWrapper] -> ShowS # | |
| ToJSON IllustWrapper Source # | |
Defined in Web.Pixiv.Types Methods toJSON :: IllustWrapper -> Value # toEncoding :: IllustWrapper -> Encoding # toJSONList :: [IllustWrapper] -> Value # toEncodingList :: [IllustWrapper] -> Encoding # | |
| FromJSON IllustWrapper Source # | |
Defined in Web.Pixiv.Types Methods parseJSON :: Value -> Parser IllustWrapper # parseJSONList :: Value -> Parser [IllustWrapper] # | |
User
User data type.
Constructors
| User | |
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.
Constructors
| UserProfile | |
Fields
| |
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.
Constructors
| ProfilePublicity | |
Instances
Workspace information of a user. Not sure if all fields are covered, and maybe some fields should be optional.
Constructors
| Workspace | |
Instances
data UserDetail Source #
Details of a user.
Constructors
| UserDetail | |
Fields | |
Instances
data UserPreview Source #
A preview of user information.
Except getUserDetail, other API involving users return this data type.
Constructors
| UserPreview | |
Instances
| Eq UserPreview Source # | |
Defined in Web.Pixiv.Types | |
| Read UserPreview Source # | |
Defined in Web.Pixiv.Types Methods readsPrec :: Int -> ReadS UserPreview # readList :: ReadS [UserPreview] # readPrec :: ReadPrec UserPreview # readListPrec :: ReadPrec [UserPreview] # | |
| Show UserPreview Source # | |
Defined in Web.Pixiv.Types Methods showsPrec :: Int -> UserPreview -> ShowS # show :: UserPreview -> String # showList :: [UserPreview] -> ShowS # | |
| ToJSON UserPreview Source # | |
Defined in Web.Pixiv.Types Methods toJSON :: UserPreview -> Value # toEncoding :: UserPreview -> Encoding # toJSONList :: [UserPreview] -> Value # toEncodingList :: [UserPreview] -> Encoding # | |
| FromJSON UserPreview Source # | |
Defined in Web.Pixiv.Types | |
| HasUser UserPreview User Source # | |
Defined in Web.Pixiv.Types.Lens | |
| HasIsMuted UserPreview Bool Source # | |
Defined in Web.Pixiv.Types.Lens | |
| HasNovels UserPreview Value Source # | |
Defined in Web.Pixiv.Types.Lens | |
| HasIllusts UserPreview [Illust] Source # | |
Defined in Web.Pixiv.Types.Lens | |
data UserPreviews Source #
Response of API which returns user previews.
Constructors
| UserPreviews | |
Fields
| |
Instances
| Eq UserPreviews Source # | |
Defined in Web.Pixiv.Types | |
| Read UserPreviews Source # | |
Defined in Web.Pixiv.Types Methods readsPrec :: Int -> ReadS UserPreviews # readList :: ReadS [UserPreviews] # | |
| Show UserPreviews Source # | |
Defined in Web.Pixiv.Types Methods showsPrec :: Int -> UserPreviews -> ShowS # show :: UserPreviews -> String # showList :: [UserPreviews] -> ShowS # | |
| ToJSON UserPreviews Source # | |
Defined in Web.Pixiv.Types Methods toJSON :: UserPreviews -> Value # toEncoding :: UserPreviews -> Encoding # toJSONList :: [UserPreviews] -> Value # toEncodingList :: [UserPreviews] -> Encoding # | |
| FromJSON UserPreviews Source # | |
Defined in Web.Pixiv.Types | |
| HasNextUrl UserPreviews Source # | |
Defined in Web.Pixiv.Types Methods unNextUrl :: UserPreviews -> NextUrlLess UserPreviews Source # getNextUrl :: UserPreviews -> Maybe Text Source # | |
| type NextUrlLess UserPreviews Source # | |
Defined in Web.Pixiv.Types | |
Comment
A comment.
Constructors
| 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.
Instances
| HasNextUrl Illusts Source # | |
Defined in Web.Pixiv.Types | |
| HasNextUrl UserPreviews Source # | |
Defined in Web.Pixiv.Types Methods unNextUrl :: UserPreviews -> NextUrlLess UserPreviews Source # getNextUrl :: UserPreviews -> Maybe Text Source # | |
| HasNextUrl Comments Source # | |
Defined in Web.Pixiv.Types | |
| HasNextUrl SpotlightArticles Source # | |
Defined in Web.Pixiv.Types Methods unNextUrl :: SpotlightArticles -> NextUrlLess SpotlightArticles Source # getNextUrl :: SpotlightArticles -> Maybe Text Source # | |
Ugoria
data UgoiraFrame Source #
A ugoira frame.
Constructors
| UgoiraFrame | |
Fields
| |
Instances
| Eq UgoiraFrame Source # | |
Defined in Web.Pixiv.Types | |
| Read UgoiraFrame Source # | |
Defined in Web.Pixiv.Types Methods readsPrec :: Int -> ReadS UgoiraFrame # readList :: ReadS [UgoiraFrame] # readPrec :: ReadPrec UgoiraFrame # readListPrec :: ReadPrec [UgoiraFrame] # | |
| Show UgoiraFrame Source # | |
Defined in Web.Pixiv.Types Methods showsPrec :: Int -> UgoiraFrame -> ShowS # show :: UgoiraFrame -> String # showList :: [UgoiraFrame] -> ShowS # | |
| ToJSON UgoiraFrame Source # | |
Defined in Web.Pixiv.Types Methods toJSON :: UgoiraFrame -> Value # toEncoding :: UgoiraFrame -> Encoding # toJSONList :: [UgoiraFrame] -> Value # toEncodingList :: [UgoiraFrame] -> Encoding # | |
| FromJSON UgoiraFrame Source # | |
Defined in Web.Pixiv.Types | |
| HasUgoiraFile UgoiraFrame Text Source # | |
Defined in Web.Pixiv.Types.Lens Methods | |
| HasUgoiraDelay UgoiraFrame Int Source # | |
Defined in Web.Pixiv.Types.Lens Methods | |
| HasFrames UgoiraMetadata [UgoiraFrame] Source # | |
Defined in Web.Pixiv.Types.Lens Methods | |
A wrapper of ugoira zip file url.
Constructors
| ZipUrls | |
Fields
| |
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 UgoiraFrames to represents metadata of each frame.
Using getUgoiraMetadata can obtain value of this type.
See ugoiraMetadataToFFConcat and downloadUgoiraToMP4.
Constructors
| UgoiraMetadata | |
Fields
| |
Instances
newtype UgoiraMetadataWrapper Source #
A wrapper of UgoiraMetadata for JSON deserialization.
Constructors
| UgoiraMetadataWrapper | |
Fields | |
Instances
Article
data SpotlightArticle Source #
Spotlight article.
Constructors
| SpotlightArticle | |
Fields
| |
Instances
| Eq SpotlightArticle Source # | |
Defined in Web.Pixiv.Types Methods (==) :: SpotlightArticle -> SpotlightArticle -> Bool # (/=) :: SpotlightArticle -> SpotlightArticle -> Bool # | |
| Read SpotlightArticle Source # | |
Defined in Web.Pixiv.Types Methods readsPrec :: Int -> ReadS SpotlightArticle # readList :: ReadS [SpotlightArticle] # | |
| Show SpotlightArticle Source # | |
Defined in Web.Pixiv.Types Methods showsPrec :: Int -> SpotlightArticle -> ShowS # show :: SpotlightArticle -> String # showList :: [SpotlightArticle] -> ShowS # | |
| ToJSON SpotlightArticle Source # | |
Defined in Web.Pixiv.Types Methods toJSON :: SpotlightArticle -> Value # toEncoding :: SpotlightArticle -> Encoding # toJSONList :: [SpotlightArticle] -> Value # toEncodingList :: [SpotlightArticle] -> Encoding # | |
| FromJSON SpotlightArticle Source # | |
Defined in Web.Pixiv.Types Methods parseJSON :: Value -> Parser SpotlightArticle # parseJSONList :: Value -> Parser [SpotlightArticle] # | |
data SpotlightArticles Source #
Response of API which returns spotlight articles.
Constructors
| SpotlightArticles | |
Fields | |
Instances
Http
Rank mode query parm.
See getIllustRanking
Constructors
| 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 Methods toUrlPiece :: RankMode -> Text # toEncodedUrlPiece :: RankMode -> Builder # toHeader :: RankMode -> ByteString # toQueryParam :: RankMode -> Text # | |
data SearchTarget Source #
Search target query parm.
See searchIllust.
Constructors
| ExactMatchForTags | |
| PartialMatchForTags | |
| TitleAndCaption |
Instances
data SortingMethod Source #
Sorting method query parm.
See searchIllust.
Constructors
| DateDesc | |
| DateAsc | |
| PopularDesc |
Instances
Duration query parm.
See searchIllust.
Constructors
| WithinLastDay | |
| WithinLastMonth | |
| WithinLastYear |
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 Methods toUrlPiece :: Duration -> Text # toEncodedUrlPiece :: Duration -> Builder # toHeader :: Duration -> ByteString # toQueryParam :: Duration -> Text # | |