hashbender / gosalesforce

Basic Salesforce library for Golang inspired by the excellent Python Simple-Salesforce library. The return type is an interface{} to keep things simple, instead of creating SObjects, etc

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Gosalesforce

Golang Salesforce REST API library. This library is inspired by the excellent "Simple-Salesforce" Python library. Currently only OAuth2 is supported and an interface{} object is returned to keep things simple.

API documentation can be found at the Godoc page

Examples

package main

import (
  "fmt"
  "encoding/json"
  "github.com/tux0010/gosalesforce"
)

func main() {
  instanceURL := "https://na23.salesforce.com"
  sessionID := "deadbeefbeefcafe"
  
  client := NewSalesforceClient(instanceURL, sessionID)
  data, err := client.Get("Someobject__C", "somerecordID")
  if err != nil {
    panic(err)
  }
  
  j, _ := json.MarshalIndent(data, "", " ")
  fmt.Println(string(j))
}

About

Basic Salesforce library for Golang inspired by the excellent Python Simple-Salesforce library. The return type is an interface{} to keep things simple, instead of creating SObjects, etc

License:Apache License 2.0


Languages

Language:Go 100.0%