sourcing 0.0.5 → 0.0.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +18 -2
- data/bin/sourcing +2 -2
- data/lib/sourcing.rb +3 -0
- data/lib/sourcing/account.rb +9 -0
- data/lib/sourcing/person.rb +24 -7
- data/lib/sourcing/user.rb +9 -0
- data/lib/sourcing/version.rb +1 -1
- metadata +4 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 63dde80d8e0efe1ae59afd55cd44a227bf96894b
|
4
|
+
data.tar.gz: 7dce3f42abd8575770d36287b4ec2c38ee841022
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 92e230371b1bdec85547b5506c524250a2eb21b342a75ba465f2191bbfe6e9db95cea1a4027bfd2046ac5b0eb454f4831f5c093066c4e8131ee3a41b1effe596
|
7
|
+
data.tar.gz: 76adfa01d547b74d890e6c06ddcd99b0f527c89120da6dfc50f57a16676c735055e5624765f0287073f210a3989259bd745e47a13b19f151779394d7b1c7cb8a
|
data/README.md
CHANGED
@@ -26,6 +26,22 @@ Then you can lookup people by email address:
|
|
26
26
|
|
27
27
|
person = Sourcing::Person[email: 'info@eribium.org']
|
28
28
|
|
29
|
-
|
29
|
+
If the person can't be found, then `nil` will be returned.
|
30
30
|
|
31
|
-
|
31
|
+
You can also look people up by GitHub and Twitter handle:
|
32
|
+
|
33
|
+
person = Sourcing::Person[github: 'maccman']
|
34
|
+
person = Sourcing::Person[twitter: 'maccaw']
|
35
|
+
|
36
|
+
## CLI
|
37
|
+
|
38
|
+
The gem also includes a `sourcing` executable, which you can use like this:
|
39
|
+
|
40
|
+
$ sourcing --twitter DanielZarick
|
41
|
+
|
42
|
+
{
|
43
|
+
"id" => "7baccc21-36a7-436c-8d55-e3d15b61dbdf",
|
44
|
+
"name" => "Daniel Zarick",
|
45
|
+
"headline" => "Developer at 33cc77",
|
46
|
+
"url" => "http://danielzarick.com",
|
47
|
+
...
|
data/bin/sourcing
CHANGED
data/lib/sourcing.rb
CHANGED
data/lib/sourcing/person.rb
CHANGED
@@ -10,13 +10,6 @@ module Sourcing
|
|
10
10
|
options = options.dup
|
11
11
|
params = options.delete(:params) || {}
|
12
12
|
|
13
|
-
if key = options.delete(:api_key)
|
14
|
-
options.merge!(
|
15
|
-
auth_type: :bearer,
|
16
|
-
password: key
|
17
|
-
)
|
18
|
-
end
|
19
|
-
|
20
13
|
if email = values[:email]
|
21
14
|
self.new(get(uri(:email, email), params, options))
|
22
15
|
|
@@ -36,8 +29,32 @@ module Sourcing
|
|
36
29
|
rescue Nestful::ResourceNotFound
|
37
30
|
end
|
38
31
|
|
32
|
+
def self.search(filters, params = {})
|
33
|
+
post :search, params.merge(filters: filters)
|
34
|
+
end
|
35
|
+
|
39
36
|
class << self
|
40
37
|
alias_method :[], :find
|
41
38
|
end
|
39
|
+
|
40
|
+
def tweets
|
41
|
+
get :tweets
|
42
|
+
end
|
43
|
+
|
44
|
+
def notes
|
45
|
+
get :notes
|
46
|
+
end
|
47
|
+
|
48
|
+
def create_note!(body)
|
49
|
+
post :notes, body: body
|
50
|
+
end
|
51
|
+
|
52
|
+
def favorite!
|
53
|
+
post :favorite
|
54
|
+
end
|
55
|
+
|
56
|
+
def unfavorite!
|
57
|
+
delete :favorite
|
58
|
+
end
|
42
59
|
end
|
43
60
|
end
|
data/lib/sourcing/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sourcing
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Alex MacCaw
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2014-02-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -68,7 +68,9 @@ files:
|
|
68
68
|
- bin/sourcing
|
69
69
|
- examples/email.rb
|
70
70
|
- lib/sourcing.rb
|
71
|
+
- lib/sourcing/account.rb
|
71
72
|
- lib/sourcing/person.rb
|
73
|
+
- lib/sourcing/user.rb
|
72
74
|
- lib/sourcing/version.rb
|
73
75
|
- sourcing.gemspec
|
74
76
|
homepage: https://github.com/maccman/sourcing-ruby
|