Documentation ¶
Index ¶
- Constants
- type AboutMeProfile
- type AngelListProfile
- type Client
- type Company
- type CompanyMetrics
- type CompanySite
- type CrunchBaseProfile
- type Employment
- type Error
- type ErrorResponse
- type FacebookProfile
- type Geo
- type GitHubProfile
- type GooglePlusProfile
- type GravatarAvatar
- type GravatarProfile
- type GravatarURL
- type LinkedInProfile
- type Name
- type Person
- type Prospect
- type ProspectQuery
- type TwitterID
- type TwitterProfile
Constants ¶
const ( ProspectURL = "https://prospector.clearbit.com/v1/people/search" EnrichCompanyStreamingURL = "https://company-stream.clearbit.com/v2/companies/find" EnrichPersonStreamingURL = "https://person-stream.clearbit.com/v2/people/find" )
These are the valid services and resources of the Clearbit API.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AboutMeProfile ¶
type AboutMeProfile struct { Avatar string `json:"avatar"` Bio string `json:"bio"` Handle string `json:"handle"` }
AboutMeProfile describes a person's About.me profile.
type AngelListProfile ¶
type AngelListProfile struct { Avatar string `json:"avatar"` Bio string `json:"bio"` Blog string `json:"blog"` Followers int `json:"followers"` Handle string `json:"handle"` ID int `json:"id"` Site string `json:"site"` }
AngelListProfile describes a person or company's AngelList profile.
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client provides access to the Clearbit API.
func NewClient ¶
NewClient initializes a Clearbit API client with the provided apiKey.
If httpClient is nil, http.DefaultClient will be used.
func (*Client) EnrichCompany ¶
EnrichCompany finds a company by its domain and returns detailed information about it.
func (*Client) EnrichPerson ¶
EnrichPerson finds a person by their email address and returns detailed information about them.
type Company ¶
type Company struct { Description string `json:"description"` Domain string `json:"domain"` DomainAliases []string `json:"domainAliases"` EmailProvider bool `json:"emailProvider"` FoundedDate string `json:"foundedDate"` Geo Geo `json:"geo"` ID string `json:"id"` LegalName string `json:"legalName"` Location string `json:"location"` Logo string `json:"logo"` Metrics CompanyMetrics `json:"metrics"` Name string `json:"name"` Phone string `json:"phone"` Site CompanySite `json:"site"` Tags []string `json:"tags"` Tech []string `json:"tech"` TimeZone string `json:"timeZone"` Type string `json:"type"` URL string `json:"url"` UTCOffset int `json:"utcOffset"` AngelList AngelListProfile `json:"angellist"` CrunchBase CrunchBaseProfile `json:"crunchbase"` Facebook FacebookProfile `json:"facebook"` LinkedIn LinkedInProfile `json:"linkedin"` Twitter TwitterProfile `json:"twitter"` }
Company describes company data known to Clearbit.
https://clearbit.com/docs#enrichment-api-company-api-attributes
type CompanyMetrics ¶
type CompanyMetrics struct { AlexaGlobalRank int `json:"alexaGlobalRank"` AlexaUsRank int `json:"alexaUsRank"` AnnualRevenue int `json:"annualRevenue"` Employees int `json:"employees"` GoogleRank int `json:"googleRank"` MarketCap int `json:"marketCap"` Raised int `json:"raised"` }
CompanyMetrics describes a company's metrics across different sites, services, and other metrics.
type CompanySite ¶
type CompanySite struct { EmailAddresses []string `json:"emailAddresses"` H1 string `json:"h1"` MetaAuthor string `json:"metaAuthor"` MetaDescription string `json:"metaDescription"` PhoneNumbers []string `json:"phoneNumbers"` Title string `json:"title"` URL string `json:"url"` }
CompanySite describes information about and from a company's site.
type CrunchBaseProfile ¶
type CrunchBaseProfile struct {
Handle string `json:"handle"`
}
CrunchBaseProfile describes a company's CrunchBase profile.
type Employment ¶
type Employment struct { Domain string `json:"domain"` Name string `json:"name"` Role string `json:"role"` Seniority string `json:"seniority"` Title string `json:"title"` }
Employment describes a person's current employment status.
type Error ¶
Error describes an error returned by Clearbit's API.
For a list of error types, see https://clearbit.com/docs#errors-error-types.
type ErrorResponse ¶
type ErrorResponse struct {
Error `json:"error"`
}
ErrorResponse describes the structure of non-successful responses from the Clearbit API.
type FacebookProfile ¶
type FacebookProfile struct {
Handle string `json:"handle"`
}
FacebookProfile describes a person or company's Facebook profile.
type Geo ¶
type Geo struct { City string `json:"city"` Country string `json:"country"` CountryCode string `json:"countryCode"` Lat float64 `json:"lat"` Lng float64 `json:"lng"` PostalCode string `json:"postalCode"` State string `json:"state"` StateCode string `json:"stateCode"` StreetName string `json:"streetName"` StreetNumber string `json:"streetNumber"` SubPremise string `json:"subPremise"` }
Geo represents a person or comapny's location.
Some fields are only available for companies.
type GitHubProfile ¶
type GitHubProfile struct { Avatar string `json:"avatar"` Blog string `json:"blog"` Company string `json:"company"` Followers int `json:"followers"` Following int `json:"following"` Handle string `json:"handle"` }
GitHubProfile describes a person's GitHub profile.
type GooglePlusProfile ¶
type GooglePlusProfile struct {
Handle string `json:"handle"`
}
GooglePlusProfile describes a person's Google+ profile.
type GravatarAvatar ¶
GravatarAvatar describes an avatar associated with a person's Gravatar profile. For example, the type may be "thumbnail" and the URL to view it.
type GravatarProfile ¶
type GravatarProfile struct { DefaultAvatarURL string `json:"avatar"` Avatars []GravatarAvatar `json:"avatars"` Handle string `json:"handle"` URLs []GravatarURL `json:"urls"` }
GravatarProfile describes a person's public Gravatar profile.
type GravatarURL ¶
GravatarURL describes a URL associated with a person's Gravatar profile, like a link to their blog.
type LinkedInProfile ¶
type LinkedInProfile struct {
Handle string `json:"handle"`
}
LinkedInProfile describes a person or company's public LinkedIn profile.
type Name ¶
type Name struct { FamilyName string `json:"familyName"` FullName string `json:"fullName"` GivenName string `json:"givenName"` }
Name describes a person's name.
type Person ¶
type Person struct { Avatar string `json:"avatar"` Bio string `json:"bio"` Email string `json:"email"` Employment Employment `json:"employment"` Fuzzy bool `json:"fuzzy"` Gender string `json:"gender"` Geo Geo `json:"geo"` ID string `json:"id"` Location string `json:"location"` Name Name `json:"name"` Site string `json:"site"` TimeZone string `json:"timeZone"` UTCOffset int `json:"utcOffset"` AboutMe AboutMeProfile `json:"aboutme"` AngelList AngelListProfile `json:"angellist"` Facebook FacebookProfile `json:"facebook"` GitHub GitHubProfile `json:"github"` GooglePlus GooglePlusProfile `json:"googleplus"` Gravatar GravatarProfile `json:"gravatar"` Twitter TwitterProfile `json:"twitter"` LinkedIn LinkedInProfile `json:"linkedin"` }
Person describes person data known to Clearbit.
https://clearbit.com/docs#enrichment-api-person-api-attributes
type Prospect ¶
type Prospect struct { ID string `json:"id"` Name Name `json:"name"` Title string `json:"title"` Email string `json:"email"` }
Prospect describes the basic contact information for a person found through the Prospector API.
https://clearbit.com/docs#prospector-api-person-search-response-body
type ProspectQuery ¶
type ProspectQuery struct { // Company's domain name to look up (required). Domain string // Filters results by first or last name (case-insensitive). Name string // Filters results by one or more titles. Titles []string }
ProspectQuery defines the available options for querying the Prospector API.
type TwitterID ¶
type TwitterID string
TwitterID is a person or company's Twitter profile ID.
It is stored as a string, though it can be also be an integer in Clearbit API responses.
func (*TwitterID) UnmarshalJSON ¶
UnmarshalJSON implements json.Unmarshaler.
type TwitterProfile ¶
type TwitterProfile struct { Avatar string `json:"avatar"` Bio string `json:"bio"` Followers int `json:"followers"` Following int `json:"following"` Handle string `json:"handle"` ID TwitterID `json:"id"` Location string `json:"location"` Site string `json:"site"` }
TwitterProfile describes a person or company's public Twitter profile.