GithubHelp home page GithubHelp logo

isabella232 / clearbit Goto Github PK

View Code? Open in Web Editor NEW

This project forked from thoughtbot/clearbit

0.0 0.0 0.0 54 KB

Go client library and command line interface to the Clearbit API

License: MIT License

Shell 3.70% Go 96.30%

clearbit's Introduction

clearbit

GoDoc Reference Circle CI

clearbit is a client library and command-line interface for the Clearbit API.

Install for the command line

For OS X users, you can install and upgrade through the Homebrew package:

brew tap thoughtbot/formulae
brew update
brew install clearbit

Or, for anyone with Go installed, you can install from the command-line:

go get -u github.com/thoughtbot/clearbit/cmd/clearbit

Then, store your Clearbit API key in ~/.clearbit_key.

Usage from the command line

Use the subcommands to interact with the different Clearbit API endpoints.

Get detailed information about a person from their email address:

$ clearbit enrich [email protected]

Get data about a company from its domain:

$ clearbit enrich thoughtbot.com

Get contact details for a company (role & seniority picklist):

$ clearbit prospect -role marketing -seniority executive thoughtbot.com

Since each command produces JSON as its output, the clearbit command pairs nicely with jq for processing.

Get company copy-pasteable company contacts:

$ clearbit prospect thoughtbot.com |
    jq '.[] | "\(.name.fullName) <\(.email)>"'

Run clearbit help [subcommand] for details on additional options.

Usage from Go

The clearbit package exposes types for interacting with the Clearbit API and the data it returns.

import "github.com/thoughtbot/clearbit"

client, _ := clearbit.NewClient(os.Getenv("CLEARBIT_API_KEY"))

bernerd, _ := client.EnrichPerson("[email protected]")
thoughtbot, _ := client.EnrichCompany(bernerd.Employment.Domain)

prospects, _ := client.Prospect(clearbit.ProspectQuery{
  Domain: "thoughtbot.com",
  Titles: []string{"CEO", "CTO", "VP"},
})

for _, prospect := range prospects {
  prospectDetails, _ := client.EnrichPerson(prospect.Email)
}

For detailed API documentation, read the go docs.

Contributing

We love pull requests from everyone. By participating in this project, you agree to abide by the thoughtbot code of conduct.

We expect everyone to follow the code of conduct anywhere in thoughtbot's project codebases, issue trackers, chatrooms, and mailing lists.

License

clearbit is Copyright (c) 2016 thoughtbot, inc. It is free software, and may be redistributed under the terms specified in the LICENSE file.

About

clearbit is maintained by Bernerd Schaefer and thoughtbot's Go development team.

thoughtbot

The names and logos for thoughtbot are trademarks of thoughtbot, inc.

We love open source software! See our other projects or hire us to help build your product.

clearbit's People

Contributors

bernerdschaefer avatar calebhearth avatar cp avatar croaky avatar gabebw avatar harlow avatar tysongach avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.