Module
MeowClient.Session
- Package
- purescript-meowclient
- Repository
- userfriendanonymous/purescript-meowclient
#logOut Source
logOut :: Value -> Aff (Either Error Unit)
Performs a log-out API call.
logOut [session]
Note
Session that's passed into this function, will not change. If it was logged in, it will stay logged in even after it's passed into this function.
Example
do
result <- logOut session
case result of
Left error -> -- ...
Right _ -> -- ...
#searchProjects Source
searchProjects :: Value -> Int -> Int -> String -> Value -> Aff (Either JsonOrJsError (Array Item))
Searches projects.
searchProjects [mode] [offset] [limit] [query string] [session]
Example
import MeowClient.SearchMode as SearchMode
do
result <- searchProjects SearchMode.Popular 0 20 "cat" session
case result of
Left error -> -- ...
Right projects -> -- ...
#setSignature Source
setSignature :: String -> Value -> Aff (Either JsonOrJsError Unit)
Sets logged in user's forums signature.
setSignature [content] [session]
Example
do
result <- setSignature "My new signature!" session
case result of
Left error -> -- ...
Right _ -> -- ...
#uploadToAssets Source
uploadToAssets :: Buffer -> String -> Value -> Aff (Either Value String)
Uploads a file to https://assets.scratch.mit.edu/.
This can be used for adding images to be used in a forum post or signature.
uploadToAssets [buffer] [file extension] [session]
Example
do
result <- uploadToAssets buffer "txt" session
case result of
Left error -> -- ...
Right assetUrl -> -- ...
- Modules
- MeowClient
- MeowClient.
CloudSocket - MeowClient.
Forum - MeowClient.
Forum. Topic - MeowClient.
ForumPost - MeowClient.
ForumPost. Info - MeowClient.
ForumTopic - MeowClient.
ForumTopic. Info - MeowClient.
JsonOrJsError - MeowClient.
Message - MeowClient.
Profile - MeowClient.
Profile. Api - MeowClient.
Profile. Comment - MeowClient.
Profile. Comment. Reply - MeowClient.
Profile. Status - MeowClient.
Project - MeowClient.
Project. Api - MeowClient.
Project. Comment - MeowClient.
Project. Comment. Reply - MeowClient.
SearchMode - MeowClient.
SearchProjects - MeowClient.
Session - MeowClient.
Session. Auth - MeowClient.
Studio - MeowClient.
Studio. Api - MeowClient.
Studio. MyStatus - MeowClient.
Studio. Project - MeowClient.
Utils - MeowClient.
Visibility