This is an unofficial Golang SDK to integrate with the Bullhorn system
go get github.com/adwitiyaio/bullhorn-go-sdk
go get github.com/adwitiyaio/bullhorn-go-sdk@v0.1.2
- Create a new bullhorn client with the below method:
ap := &bullhorn.AuthParams{
ClientId: "",
ClientSecret: "",
Username: "",
Password: "",
AuthenticationUrl: "",
LoginUrl: "",
ApiUrl: "",
RestTokenTTL: 1440,
AuthorizationCode: "",
AccessToken: "",
RefreshToken: "",
RestToken: "",
}
c, err := bullhorn.NewClient(ap)
- It is mandatory to specify the clientId, clientSecret, username, password, authentication url & login url. Api URL is automatically created
- Rest Token TTL is optional, in which case, the default is
1440
(i.e. 24 hours)
- If the Rest Token is still valid, the above method will return an existing client, if it is expired, it creates a new Rest Token
- If the Access / Refresh Tokens are still valid, the above method will create a new Rest Token, otherwise, it'll create new access / refresh tokens and a new rest token
- If the Authorization code is still valid, the above method will create new access, refresh & rest tokens, otherwise, it'll create new authorization code, access token, refresh token & a rest token
Once a client is obtained through authentication, you can use the client to invoke bullhorn APIs
For example, to use the GET Entity API, you can invoke the below method:
client.GetEntity(entityType, entityId, options)
- In the above case, entityType can be
Candidate
for example, entityId is the corresponding entityId. - Options correspond to the following:
type QueryOptions struct {
Fields []string
Associations []string
Layout string
Meta string
ShowEditable string
Start int
Count int
OrderBy string
Sort string
}
- Ping
- GetEntity
- QueryEntity
- SearchEntity
- CreateEntity
- UpdateEntity
- DeleteEntity
- AssociateEntities
- [] Get All Corp Notes
- [] Get Entitlements
- [] Effective Dated Entity
- [] Get Department Entities
- [] Get My Entities
- [] Get File
- [] Get Entity File Attachments
- [] Put File
- [] Post File
- [] Delete File
- [] Logout
- [] Get Mass Update
- [] Get Mass Update by Entity Type
- [] Post Mass Update by Entity Type
- [] Get Metadata (for all entities)
- [] Get Metadata for Entity
- [] Get Options (for all list based entities)
- [] Get Options by Option Type
- [] Query Entity (GET)
- [] Resume Related APIs
- [] Saved Search Related APIs
- [] Search Entity (GET)
- [] Services Related APIs
- [] Get Settings
- [] Events Related APIs
- [] User Headshot Related APIs
- Currently, no tests are created for any methods. This is another thing to be implemented in the future