servant-pushbullet-client-0.0.3.0: Bindings to the Pushbullet API using servant-client

Safe HaskellNone
LanguageHaskell2010

Network.Pushbullet.Types

Contents

Synopsis

Pagination

data Paginated a Source #

A single page of data, possibly with a cursor attached to it. The cursor may be used in routes that return paginated data to produce the next page of data.

Constructors

Page 

Fields

Instances

Functor Paginated Source # 

Methods

fmap :: (a -> b) -> Paginated a -> Paginated b #

(<$) :: a -> Paginated b -> Paginated a #

Eq a => Eq (Paginated a) Source # 

Methods

(==) :: Paginated a -> Paginated a -> Bool #

(/=) :: Paginated a -> Paginated a -> Bool #

Show a => Show (Paginated a) Source # 
FromJSON a => FromJSON (Paginated a) Source # 

Pushes

data Push s Source #

A push. We reuse the same datatype for representing new pushes and existing pushes. The EqT type family is used to enable fields selectively according to whether we're making a new push or representing an existing one.

simpleNewPush :: PushTarget New -> PushData New -> Push New Source #

Constructs a new Push with the source device and guid set to Nothing.

newtype ExistingPushes Source #

A newtype wrapper for a list of existing pushes. We need this to get a nonstandard FromJSON instance for the list, because Pushbullet gives us the list wrapped in a trivial object with one key.

Constructors

ExistingPushes [Push Existing] 

Ephemerals

Devices

data Device s Source #

A device attached to a Pushbullet account.

data HasSms Source #

Whether the device has SMS capabilities.

Constructors

NoSms 
HasSms 

newtype ExistingDevices Source #

A newtype wrapper for a list of existing devices. We need this to get a nonstandard FromJSON instance for the list, because Pushbullet gives us the list wrapped in a trivial object with one key.

newDevice :: HasSms -> DeviceIcon -> Nickname -> Maybe Manufacturer -> Maybe Model -> Maybe AppVersion -> Device New Source #

Smart constructor for a new device that fills in the ignored fields.

Users

Permanents

SMS

Misc

Data

newtype Url Source #

Constructors

Url Text 

data Status Source #

Constructors

New 
Existing 

newtype Name Source #

Constructors

Name 

Fields

Type-level stuff

type family EqT (s :: k) (s' :: k) (a :: *) :: * where ... Source #

If the first two types are the same, return the third; else, return unit.

This type family is used to disable certain fields according to the Status datakind.

Equations

EqT s s a = a 
EqT _ _ _ = () 

Lenses

Device

deviceManufacturer :: forall s. Lens' (Device s) (Maybe Manufacturer) Source #

deviceModel :: forall s. Lens' (Device s) (Maybe Model) Source #

deviceAppVersion :: forall s. Lens' (Device s) (Maybe AppVersion) Source #

deviceFingerprint :: forall s. Lens' (Device s) (EqT Existing s (Maybe Fingerprint)) Source #

deviceKeyFingerprint :: forall s. Lens' (Device s) (EqT Existing s (Maybe KeyFingerprint)) Source #

User

SMS

Ephemerals

Clipboard

Pagination

pageData :: forall a a. Lens (Paginated a) (Paginated a) a a Source #