|
| 1 | +PossibleEmail |
| 2 | +========= |
| 3 | +A Ruby Gem to find someone's possible email address using their first name, last name, and domain. |
| 4 | + |
| 5 | +More information in my [blog post](http://patrickperey.com/possible-email "blog post") at [PatrickPerey.com](http://patrickperey.com "Patrick Perey Blog") |
| 6 | + |
| 7 | +Installation |
| 8 | +------------ |
| 9 | +Install the gem: |
| 10 | + |
| 11 | +``` |
| 12 | +$ gem install possible_email |
| 13 | +``` |
| 14 | + |
| 15 | +Basic Usage |
| 16 | +----- |
| 17 | + |
| 18 | +### Command Line Interface |
| 19 | + |
| 20 | + |
| 21 | +Enter target's first name, last name, and possible domain name into the terminal using `search` |
| 22 | + |
| 23 | +``` |
| 24 | +$ possible_email search first_name last_name domain |
| 25 | +``` |
| 26 | + |
| 27 | +Not sure about the domain name? Just add multiple domains at the end |
| 28 | + |
| 29 | +``` |
| 30 | +$ possible_email search first_name last_name gmail.com, yahoo.com, live.com |
| 31 | +``` |
| 32 | + |
| 33 | + |
| 34 | +Just want to Confirm a single email address? Use `find_profile` |
| 35 | + |
| 36 | +``` |
| 37 | +$ possible_email find_profile [email protected] |
| 38 | +``` |
| 39 | +Multiple email address? Same `find_profile` |
| 40 | + |
| 41 | +``` |
| 42 | + |
| 43 | +``` |
| 44 | +### Ruby |
| 45 | + |
| 46 | +```ruby |
| 47 | +require 'possible_email' |
| 48 | + |
| 49 | +profiles = PossibleEmail.search('Kevin', 'Rose', 'gmail.com') |
| 50 | +profiles #=> "#<PossibleEmail::Response>" |
| 51 | +first_profile = profiles.first |
| 52 | + |
| 53 | +first_profile.name #=> 'Kevin Rose' |
| 54 | +first_profile.email #=> '[email protected]' |
| 55 | +first_profile.location #=> 'San Francisco Bay Area' |
| 56 | +``` |
| 57 | +Documentation |
| 58 | +------------- |
| 59 | +### PossibleEmail |
| 60 | + |
| 61 | +Available methods: |
| 62 | + |
| 63 | +**search(first_name, last_name, *domain)** |
| 64 | + |
| 65 | +Accepts three arguments `first_name`, `last_name`, and `domain`. PossibleEmail will use these three arguments to generate possible email addresses based on common email address patterns. PossibleEmail would then attempt to verify and return an email profile for each email address. |
| 66 | + |
| 67 | +```ruby |
| 68 | +# Single domain name |
| 69 | +PossibleEmail.search('bob', 'jones', 'gmail.com') |
| 70 | + |
| 71 | +# Multiple domain names as Strings |
| 72 | +PossibleEmail.search('bob', 'jones', 'gmail.com', 'yahoo.com') |
| 73 | + |
| 74 | +# Multiple domain names as an Array |
| 75 | +domains = ['gmail.com', 'yahoo.com', 'live.com'] |
| 76 | +PossibleEmail.search('bob', 'jones', domains) |
| 77 | +``` |
| 78 | + |
| 79 | +**find_profile(*emails)** |
| 80 | + |
| 81 | +Accepts a list of email address string arguments or an array. Instead of generating email addresses based on name arguments, PossibleEmail would attempt to verify and return an email profile for each email addresses passed into the method. |
| 82 | + |
| 83 | +```ruby |
| 84 | +# Comma-splitted email arguments |
| 85 | +PossibleEmail.find_profile( '[email protected]', '[email protected]') |
| 86 | + |
| 87 | +# Array of emails |
| 88 | +PossibleEmail.find_profile([ '[email protected]', '[email protected]']) |
| 89 | +``` |
| 90 | + |
| 91 | +Both methods return a `PossibleEmail::Response` object. `PossibleEmail::Response` includes the `Enumerable` module, so all the methods you need to iterate through the profiles are available. The only exception when neither the `search` or `find_profile` is when there is only one profile within the response. In this case, the method returns the single Profile. |
| 92 | + |
| 93 | +### Profile |
| 94 | + |
| 95 | +Class for the associated data connnected with a specific email address. |
| 96 | + |
| 97 | +`Profile` attribute list: |
| 98 | + |
| 99 | +* `email` - Returns the profile's email address |
| 100 | +* `name` - Full name |
| 101 | +* `first_name` - First name |
| 102 | +* `last_name` - Last name |
| 103 | +* `friendly_name` - First name or named used to address this person |
| 104 | +* `location` - Location |
| 105 | +* `headline` - Short blurb about person |
| 106 | +* `success` - Type of response returned back from Rapportive API |
| 107 | +* `occupations` - Array of Occupation objects |
| 108 | +* `memberships` - Array of social network Membership objects |
| 109 | +* `images` - Array of Image objects |
| 110 | + |
| 111 | +### Occupation |
| 112 | + |
| 113 | +Class for person's jobs. |
| 114 | + |
| 115 | +`Occupation` attribute list: |
| 116 | + |
| 117 | +* `job_title` - Job title |
| 118 | +* `company` - Company |
| 119 | + |
| 120 | +### Membership |
| 121 | + |
| 122 | +Class for Social Network Accounts |
| 123 | + |
| 124 | +`Membership` attribute list: |
| 125 | + |
| 126 | +* `profile_url` - URL to person's website membership |
| 127 | +* `profile_id` - Website profile ID |
| 128 | +* `username` - Username |
| 129 | +* `site_name` - Name of the website membership |
| 130 | + |
| 131 | +### Image |
| 132 | + |
| 133 | +Class for images associated with email profile. |
| 134 | + |
| 135 | +`Image` attribute list: |
| 136 | + |
| 137 | +* `url` - Image url |
| 138 | +* `service` - Where the image is located |
| 139 | +* `url_proxied` - Rapportive image proxied URL |
| 140 | + |
| 141 | +Notes |
| 142 | +----- |
| 143 | +* With great power, comes great responsibly |
| 144 | +* Wrapper around the undocumented Rapportive API. |
| 145 | +* Valid results may be hidden due to API's limitations |
| 146 | +* Send Bitcoin `18fZ6muNmBrtENMZhnAjUw8eEsytmY8mZJ` |
| 147 | + |
| 148 | + |
| 149 | +Contributing |
| 150 | +------------ |
| 151 | + |
| 152 | +1. Fork it ( http://github.com/the4dpatrick/possible-email ) |
| 153 | +2. Create your feature branch (`git checkout -b my-new-feature`) |
| 154 | +3. Commit your changes (`git commit -am 'Add some feature'`) |
| 155 | +4. Push to the branch (`git push origin my-new-feature`) |
| 156 | +5. Create new Pull Request |
0 commit comments