Popularity
3.1
Declining
Activity
0.0
Stable
2
2
3
Monthly Downloads: 6
Programming language: Haskell
License: BSD 3-clause "New" or "Revised" License
Tags:
Web
hsforce alternatives and similar packages
Based on the "Web" category.
Alternatively, view hsforce alternatives based on common mentions on social networks and blogs.
-
haskell-bitmex-rest
swagger-codegen contains a template-driven engine to generate documentation, API clients and server stubs in different languages by parsing your OpenAPI / Swagger definition. -
swagger-petstore
swagger-codegen contains a template-driven engine to generate documentation, API clients and server stubs in different languages by parsing your OpenAPI / Swagger definition. -
servant
Main repository for the servant libraries — DSL for describing, serving, querying, mocking, documenting web applications and more! -
scotty
Haskell web framework inspired by Ruby's Sinatra, using WAI and Warp (Official Repository) -
neuron
Future-proof note-taking and publishing based on Zettelkasten (superseded by Emanote: https://github.com/srid/emanote) -
haskell-kubernetes
Haskell bindings to the Kubernetes API (via swagger-codegen) -
apecs-gloss
a fast, extensible, type driven Haskell ECS framework for games -
digestive-functors
A general way to consume input using applicative functors -
tagsoup
Haskell library for parsing and extracting information from (possibly malformed) HTML/XML documents -
airship
Helium + Webmachine = Airship. A toolkit for building declarative, RESTful web apps. -
hbro
[Unmaintained] A minimal web-browser written and configured in Haskell. -
backprop
Heterogeneous automatic differentiation ("backpropagation") in Haskell -
servant-elm
Automatically derive Elm functions to query servant webservices -
keera-hails-reactive-htmldom
Keera Hails: Haskell on Rails - Reactive Programming Framework for Interactive Haskell applications -
kubernetes-client-core
Haskell client for the kubernetes API. A work in progress. -
ghcjs-base
base library for GHCJS for JavaScript interaction and marshalling, used by higher level libraries like JSC -
ghcjs-dom
Make Document Object Model (DOM) apps that run in any browser and natively using WebKitGtk
InfluxDB - Power Real-Time Data Analytics at Scale
Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.
Promo
www.influxdata.com
* Code Quality Rankings and insights are calculated and provided by Lumnify.
They vary from L1 to L5 with "L5" being the highest.
Do you think we are missing an alternative of hsforce or a related project?
README
hsforce
Salesforce API Client for Haskell
Usage
Login and create Salesforce client.
main :: IO ()
main = do
-- get parameter from environment variables by default
loginRequest <- defaultLoginRequest
-- modify login paramter
let loginRequest' = loginRequest{
sfUsername = Just username,
sfPassword = Just password,
sfEndpoint = Just "test.salesforce.com",
sfVersion = Just "v44.0"
}
-- login
client <- login loginRequest'
defaultLoginRequest is extracted value from environment variables.
Environment Variable | Description |
---|---|
SALESFORCE_USERNAME | Salesforce Username |
SALESFORCE_PASSWORD | Salesforce Password |
SALESFORCE_ENDPOINT | Salesforce Login Endpoint(e.g. "login.salesforce.com") |
SALESFORCE_VERSION | API Version(e.g. "v44.0" |
SALESFORCE_CLIENT_ID | Salesforce Application Client ID |
SALESFORCE_CLIENT_SECRET | Salesforce Application Client Secret |
create data type that is SObject class.
import Data.Aeson as JSON
import Data.Maybe
data Account = Account{
sfid :: Maybe String,
name :: Maybe String,
ex :: Maybe String
} deriving Show
instance SObject Account where
typeName a = "Account"
getSfid = fromJust . sfid
instance FromJSON Account where
parseJSON = withObject "Account" $ \v -> do
sfid <- v .: "Id"
name <- v .:? "Name"
ex <- v .:? "Ex__c"
return Account{..}
instance ToJSON Account where
toJSON (Account{sfid, name, ex}) =
object ["Name" .= name]
CRUD API
-- insert object
insert client Account{sfid = Nothing, name = Just "hogehoge", ex = Nothing}
-- update object
update client Account{sfid = Just "xxxx", name = Just "foobar"}
-- upsert object
upsert client Account{sfid = Nothing, name = Just "foobar", ex = Just "aaa"} "Ex__c" "aaa"
-- delete object
delete client Account{sfid = Just "xxxx"}
-- query
query client "SELECT Id, Name FROM Account WHERE Name = 'foobar'" (Proxy :: Proxy Account)
-- queryMore
queryMore client "/services/data/v20.0/query/01gD0000002HU6KIAW-2000" (Proxy :: Proxy Account)
-- queryAll
queryAll client "SELECT Id, Name FROM Account WHERE Name = 'foobar'" (Proxy :: Proxy Account)
-- queryAllMore
queryAllMore client "/services/data/v20.0/queryMore/01gD0000002HU6KIAW-2000" (Proxy :: Proxy Account)
-- explain
explain client "SELECT Id FROM Account"
-- describe
describe client "Account" (Proxy :: Proxy Account)
-- describeDetail
describeDetail client "Account"
-- describeGlobal
describeGlobal client
-- recordCount
recordCount client ["Account", "Contact", "Opportunity"]
-- versions
versions client