Skip to content

Instantly share code, notes, and snippets.

@Woody88
Created July 31, 2018 04:27
Show Gist options
  • Select an option

  • Save Woody88/bcb836a8caf41cd9447c963245dc7aef to your computer and use it in GitHub Desktop.

Select an option

Save Woody88/bcb836a8caf41cd9447c963245dc7aef to your computer and use it in GitHub Desktop.
module Main where
import Prelude
import Data.Either (either)
import Effect (Effect)
import Effect.Class
import Effect.Console (log)
import Effect.Aff
import Salesforce.Client
main :: Effect Unit
main = launchAff_ do
client <- liftEffect $ mkClient {}
eitherLogin <- login {} client
liftEffect $ either handleLoginError handleLoginSuccess eitherLogin
where
handleLoginError result = case result of
Cancelled -> log "cancelled"
Error msg -> log msg
handleLoginSuccess _ = log "connected"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment