pixiv-0.1.1: Pixiv API binding based on servant-client
Copyright(c) 2021 The closed eye of love
LicenseBSD-3-Clause
MaintainerPoscat <poscat@mail.poscat.moe>, berberman <berberman@yandex.com>
Stabilityalpha
Portabilityportable
Safe HaskellNone
LanguageHaskell2010

Web.Pixiv.Auth

Description

Authentication pixiv API. Users should not use logics in this module directly, since Web.Pixiv.Types.PixivT takes over token management, providing user friendly operations.

Synopsis

Documentation

newtype Token Source #

A wrapped Text represents a token.

Constructors

Token 

Fields

Instances

Instances details
Eq Token Source # 
Instance details

Defined in Web.Pixiv.Auth

Methods

(==) :: Token -> Token -> Bool #

(/=) :: Token -> Token -> Bool #

Read Token Source # 
Instance details

Defined in Web.Pixiv.Auth

Show Token Source # 
Instance details

Defined in Web.Pixiv.Auth

Methods

showsPrec :: Int -> Token -> ShowS #

show :: Token -> String #

showList :: [Token] -> ShowS #

IsString Token Source # 
Instance details

Defined in Web.Pixiv.Auth

Methods

fromString :: String -> Token #

ToJSON Token Source # 
Instance details

Defined in Web.Pixiv.Auth

FromJSON Token Source # 
Instance details

Defined in Web.Pixiv.Auth

newtype Credential Source #

Authentication credentials for pixiv API.

Password authentication is no longer supported by pixiv. You may consult https://github.com/upbit/pixivpy/issues/158 to get the information of how to acquire refresh token. Normally, users are supposed to create value of this data type and then pass it to runPixivT.

Constructors

RefreshToken 

Instances

Instances details
Eq Credential Source # 
Instance details

Defined in Web.Pixiv.Auth

Show Credential Source # 
Instance details

Defined in Web.Pixiv.Auth

data OAuth2Result Source #

Authentication result.

Instances

Instances details
Eq OAuth2Result Source # 
Instance details

Defined in Web.Pixiv.Auth

Show OAuth2Result Source # 
Instance details

Defined in Web.Pixiv.Auth

FromJSON OAuth2Result Source # 
Instance details

Defined in Web.Pixiv.Auth

data Errors Source #

Authentication failure reasons.

Instances

Instances details
Enum Errors Source # 
Instance details

Defined in Web.Pixiv.Auth

Eq Errors Source # 
Instance details

Defined in Web.Pixiv.Auth

Methods

(==) :: Errors -> Errors -> Bool #

(/=) :: Errors -> Errors -> Bool #

Ord Errors Source # 
Instance details

Defined in Web.Pixiv.Auth

Read Errors Source # 
Instance details

Defined in Web.Pixiv.Auth

Show Errors Source # 
Instance details

Defined in Web.Pixiv.Auth

ToJSON Errors Source # 
Instance details

Defined in Web.Pixiv.Auth

FromJSON Errors Source # 
Instance details

Defined in Web.Pixiv.Auth

auth :: Manager -> Credential -> IO OAuth2Result Source #

Given a credential, performs a authentication request.

auth' :: Manager -> Credential -> IO OAuth2Token Source #

Like auth, but immediately throws OAuth2Error if auth failed.