Module

MeowClient.Forum

Package
purescript-meowclient
Repository
userfriendanonymous/purescript-meowclient

#Pointer Source

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

Forum pointer.

Example

do
   let forum = { id : 31, session }
   result <- topics 1 forum

#Topic Source

type Topic = Value

#createTopic Source

createTopic :: String -> String -> Pointer -> Aff (Either JsonOrJsError Unit)

Creates a topic in a forum.

createTopic [body] [title] [forum]

Example

do
   result <- createTopic "Welcome to this topic" "Topic title" forum
   case result of
       Left error -> -- ...
       Right _ -> -- ...

#topics Source

topics :: Int -> Pointer -> Aff (Either JsonOrJsError (Array Value))

Gets forum's topics.

topics [page] [forum]

Example

do
   result <- topics 3 forum
   case result of
       Left error -> -- ...
       Right topics' -> -- ...