Module

MeowClient.Project

Package
purescript-meowclient
Repository
userfriendanonymous/purescript-meowclient

#Comment Source

type Comment = Value

#CommentReply Source

#Pointer Source

type Pointer = { id :: Int, session :: Value }

Project pointer.

Example

do
   let project = { id : 874061786, session }
   result <- api project

#api Source

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

Gets api information for a project.

api [project]

Example

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

#commentReplies Source

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

Gets replies of a comment in a project.

commentReplies [offset] [limit] [comment id] [project]

Example

do
   result <- commentReplies 0 20 43409410
   case result of
       Left error -> -- ...
       Right replies -> -- ...

#comments Source

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

Gets comments of a project.

comments [offset] [limit] [project]

Example

do
   result <- comments 0 20 project
   case result of
       Left error -> -- ...
       Right arrayOfComments -> -- ...

#favorite Source

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

Alias for setFavoriting true.

#isFavoriting Source

isFavoriting :: Pointer -> Aff (Either Value Boolean)

Checks whether logged in user is favoriting a project.

isFavoriting [project]

Example

do
   result <- isFavoriting project
   case result of
       Left error -> -- ...
       Right isFavoriting' -> -- ...

#isLoving Source

isLoving :: Pointer -> Aff (Either Value Boolean)

Checks whether logged in user is loving a project.

isLoving [project]

Example

do
   result <- isLoving project
   case result of
       Left error -> -- ...
       Right isLoving' -> -- ...

#love Source

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

Alias for setLoving true.

#sendComment Source

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

Leaves a comment on a project.

sendComment [commentee id] [parent id] [content] [project]

Example

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

#sendComment' Source

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

Alias for sendComment 0 0.

#setCommenting Source

setCommenting :: Boolean -> Pointer -> Aff (Either Error Unit)

Sets commenting of a project (open or closed).

setCommenting [is open?] [project]

Example

do
   result <- setCommenting false project
   case result of
       Left error -> -- ...
       Right _ -> -- ...

#setFavoriting Source

setFavoriting :: Boolean -> Pointer -> Aff (Either Error Unit)

Favorites/unfavorites a project.

setFavoriting [is favoriting?] [project]

Example

do
   result <- setFavoriting true project
   case result of
       Left error -> -- ...
       Right _ -> -- ...

#setInstructions Source

setInstructions :: String -> Pointer -> Aff (Either Error Unit)

Sets instructions of a project.

setInstructions [content] [project]

Example

do
   result <- setInstructions "Use WASD to move!" project
   case result of
       Left error -> -- ...
       Right _ -> -- ...

#setLoving Source

setLoving :: Boolean -> Pointer -> Aff (Either Error Unit)

Loves/unloves a project.

setLoving [is loving?] [project]

Example

do
   result <- setLoving true project
   case result of
       Left error -> -- ...
       Right _ -> -- ...

#setNotesAndCredits Source

setNotesAndCredits :: String -> Pointer -> Aff (Either Error Unit)

Sets "Notes and Credits" of a project.

setNotesAndCredits [content] [project]

Example

do
   result <- setNotesAndCredits "Thanks to everyone!" project
   case result of
       Left error -> -- ...
       Right _ -> -- ...

#setThumbnail Source

setThumbnail :: Buffer -> Pointer -> Aff (Either Error Unit)

Sets thumbnail of a project.

setThumbnail [buffer] [project]

Example

do
   result <- setThumbnail buffer project
   case result of
       Left error -> -- ...
       Right _ -> -- ...

#setTitle Source

setTitle :: String -> Pointer -> Aff (Either Error Unit)

Sets title of a project.

setTitle [content] [project]

Example

do
   result <- setTitle "New title!" project
   case result of
       Left error -> -- ...
       Right _ -> -- ...

#share Source

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

Shares a project.

share [project]

Example

do
   result <- share project
   case result of
       Left error -> -- ...
       Right _ -> -- ...

#unfavorite Source

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

Alias for setFavoriting false.

#unlove Source

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

Alias for setLoving false.

#unshare Source

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

Unshares a project.

unshare [project]

Example

do
   result <- unshare project
   case result of
       Left error -> -- ...
       Right _ -> -- ...