Module

MeowClient.Studio

Package
purescript-meowclient
Repository
userfriendanonymous/purescript-meowclient

#Api Source

type Api = Value

#MyStatus Source

#Pointer Source

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

Studio pointer.

Example

do
   let studio = { id : 34104548, session }
   result <- api studio

#Project Source

type Project = Value

#acceptInvite Source

acceptInvite :: Pointer -> Aff (Either Value Unit)

Accepts an invite to curate a studio.

acceptInvite [studio]

Example

do
   result <- acceptInvite { session, id : 34104548 }
   case result of
       Left error -> -- ...
       Right _ -> -- ...

#addProject Source

addProject :: Int -> Pointer -> Aff (Either Value Unit)

Adds a project to a studio.

addProject [id] [studio]

Example

do
   result <- addProject 912075221 { session, id : 34104548 }
   case result of
       Left error -> -- ...
       Right _ -> -- ...

#api Source

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

Gets API information.

api [studio]

Example

do
   result <- api { session, id : 34104548 }
   case result of
       Left error -> -- ...
       Right info -> -- ...

#curators Source

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

Gets studio's curators.

curators [offset] [limit] [studio]

Example

do
   result <- curators 0 20 { session, id : 34104548 }
   case result of
       Left error -> -- ...
       Right curators' -> -- ...

#follow Source

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

Follows a studio.

follow [studio]

Example

do
   result <- follow { session, id : 34104548 }
   case result of
       Left error -> -- ...
       Right _ -> -- ...

#inviteCurator Source

inviteCurator :: String -> Pointer -> Aff (Either Value Unit)

Invites a curator.

inviteCurator [username] [studio]

Example

do
   result <- inviteCurator "griffpatch" { session, id : 34104548 }
   case result of
       Left error -> -- ...
       Right _ -> -- ...

#managers Source

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

Gets studio's managers.

managers [offset] [limit] [studio]

Example

do
   result <- managers 0 20 { session, id : 34104548 }
   case result of
       Left error -> -- ...
       Right managers' -> -- ...

#myStatus Source

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

Gets logged in user's status in a studio.

myStatus [studio]

Example

do
   result <- myStatus { session, id : 34104548 }
   case result of
       Left error -> -- ...
       Right status -> -- ...

#projects Source

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

Gets studio's projects.

projects [offset] [limit] [studio]

Example

do
   result <- projects 0 20 { session, id : 34104548 }
   case result of
       Left error -> -- ...
       Right projects' -> -- ...

#removeCurator Source

removeCurator :: String -> Pointer -> Aff (Either Value Unit)

Removes a curator.

removeCurator [username] [studio]

Example

do
   result <- removeCurator "griffpatch" { session, id : 34104548 }
   case result of
       Left error -> -- ...
       Right _ -> -- ...

#removeProject Source

removeProject :: Int -> Pointer -> Aff (Either Value Unit)

Removes a project from a studio.

removeProject [id] [studio]

Example

do
   result <- removeProject 912075221 { session, id : 34104548 }
   case result of
       Left error -> -- ...
       Right _ -> -- ...

#sendComment Source

sendComment :: Int -> Int -> String -> Pointer -> Aff (Either Value Int)

Leaves a comment on a studio.

sendComment [commentee id] [parent id] [studio]

Example

do
   result <- sendComment 0 0 { session, id : 34104548 }
   case result of
       Left error -> -- ...
       Right commentId -> -- ...

#setDescription Source

setDescription :: String -> Pointer -> Aff (Either Value Unit)

Sets description of a studio.

setDescription [content] [studio]

Example

do
   result <- setDescription "Welcome to the studio" { session, id : 34104548 }
   case result of
       Left error -> -- ...
       Right _ -> -- ...

#setTitle Source

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

Sets title of a studio.

setTitle [content] [studio]

Example

do
   result <- setTitle "New title" { session, id : 34104548 }
   case result of
       Left error -> -- ...
       Right _ -> -- ...

#toggleCommenting Source

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

Toggles studio commenting.

toggleCommenting [studio]

Example

do
   result <- toggleCommenting { session, id : 34104548 }
   case result of
       Left error -> -- ...
       Right _ -> -- ...

#unfollow Source

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

Unfollows a studio.

unfollow [studio]

Example

do
   result <- unfollow { session, id : 34104548 }
   case result of
       Left error -> -- ...
       Right _ -> -- ...