-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpld.go
42 lines (37 loc) · 1.27 KB
/
pld.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
package peopledatalabs_go
import (
"github.com/peopledatalabs/peopledatalabs-go/v3/api"
)
const Version = "3.4.0"
type pld struct {
Person api.Person
Company api.Company
Location api.Location
School api.School
Autocomplete api.AutocompleteFunc
Skill api.SkillFunc
JobTitle api.JobTitleFunc
IP api.IPFunc
}
// New returns a new People Data Labs Client
// All interactions with the API must be done using this client
//
// You must provide an API KEY. Get your API key by creating a free account at https://www.peopledatalabs.com/signup.
// You can provide api.ClientOptions to customize client behaviour
func New(apiKey string, opts ...api.ClientOptions) *pld {
client := api.NewClient(apiKey, Version, opts...)
autocompleteClient := api.Autocomplete{Client: client}
skillClient := api.Skill{Client: client}
jobTitleClient := api.JobTitle{Client: client}
ipClient := api.IP{Client: client}
return &pld{
Person: api.Person{Client: client},
Company: api.Company{Client: client},
Location: api.Location{Client: client},
School: api.School{Client: client},
Autocomplete: autocompleteClient.Autocomplete,
Skill: skillClient.Skill,
JobTitle: jobTitleClient.JobTitle,
IP: ipClient.IP,
}
}