Module

MeowClient.Profile

Package
purescript-meowclient
Repository
userfriendanonymous/purescript-meowclient

#Api Source

type Api = Value

#Comment Source

type Comment = Value

#Pointer Source

type Pointer = { session :: Value, username :: String }

Profile pointer.

Example

do
   let profile = { username : "griffpatch", session }
   result <- api profile

#Status Source

type Status = Value

#api Source

api :: Pointer -> Aff (Either Value Value)

Gets api information of a profile.

api [profile]

Example

do
   result <- api profile
   case result of
       Left error -> -- ...
       Right info -> -- ...

#comments Source

comments :: Int -> Pointer -> Aff (Either Value (Array Value))

Gets comments on a profile.

comments [page] [profile]

Example

do
   result <- comments 1
   case result of
       Left error -> -- ...
       Right comments' -> -- ...

#deleteComment Source

deleteComment :: Int -> Pointer -> Aff (Either Error Unit)

Deletes a comment on a profile.

deleteComment [comment id] [profile]

Example

do
   result <- deleteComment 104027540 profile
   case result of
       Left error -> -- ...
       Right _ -> -- ...

#follow Source

follow :: Pointer -> Aff (Either Error Unit)

Follow a user.

follow [profile]

Example

do
   result <- follow profile
   case result of
       Left error -> -- ...
       Right _ -> -- ...

#messagesCount Source

messagesCount :: Pointer -> Aff (Either Value Int)

Gets messages' count of a user.

messagesCount [profile]

Example

do
   result <- messagesCount profile
   case result of
       Left error -> -- ...
       Right count -> -- ...

#sendComment Source

sendComment :: Int -> Int -> String -> Pointer -> Aff (Either Error Unit)

Leaves a comment on a profile.

sendComment [commentee id] [parent id] [content] [profile]

Example

do
   result <- sendComment 0 0 "Hello!" profile
   case result of
       Left error -> -- ...
       Right _ -> -- ...

#sendComment' Source

sendComment' :: String -> Pointer -> Aff (Either Error Unit)

Alias for sendComment 0 0.

#status Source

status :: Pointer -> Aff (Either Value Value)

Gets profile status (scratcher / new scratcher / scratch team).

status [profile]

Example

do
   result <- status profile
   case result of
       Left error -> -- ...
       Right status -> -- ...

#toggleCommenting Source

toggleCommenting :: Pointer -> Aff (Either Error Unit)

Toggles profile commenting.

toggleCommenting [profile]

Example

do
   result <- toggleCommenting profile
   case result of
       Left error -> -- ...
       Right _ -> -- ...

#unfollow Source

unfollow :: Pointer -> Aff (Either Error Unit)

Unfollows a user.

unfollow [profile]

Example

do
   result <- unfollow profile
   case result of
       Left error -> -- ...
       Right _ -> -- ...