keybase-unofficial 0.0.8 → 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/keybase.rb +1 -1
- data/lib/keybase/api.rb +11 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b93d42bf74da78006d530667cf9a54988b58ccf9
|
4
|
+
data.tar.gz: 5fc32740212eae2a8d07ad87c5630b83b056e8af
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d8c0dbb04538bd718dbdf40e920e7eaac0e2ed75ad550bc628a924d2695f0f12d8f7a52cb961cdd9d999ee9ed8a441911c6aa16a27535ecfba20384ada425faa
|
7
|
+
data.tar.gz: c055f80bdd307d9be084c418245b29719957c9ef9884497b1bc4de99eaa5f61cc2f3c7e1eb068c41720315f28d26e3e4388a49acc6270a3a05392336220917db
|
data/lib/keybase.rb
CHANGED
data/lib/keybase/api.rb
CHANGED
@@ -29,6 +29,17 @@ module Keybase
|
|
29
29
|
fetch_and_structify "/user/lookup.json", query
|
30
30
|
end
|
31
31
|
|
32
|
+
# Test whether the given user exists on Keybase.
|
33
|
+
# @param user [String] the username to test
|
34
|
+
# @return [Boolean] whether or not the user exists
|
35
|
+
# @example
|
36
|
+
# Keybase::API.user? "yossarian" # => true
|
37
|
+
# Keybase::API.user? "idonotexist" # => false
|
38
|
+
# @note This call only works on Keybase usernames, not external identities.
|
39
|
+
def user?(user)
|
40
|
+
lookup(username: user).status.code.zero?
|
41
|
+
end
|
42
|
+
|
32
43
|
# Search Keybase for identity components.
|
33
44
|
# @param query [String] the string to search for
|
34
45
|
# @return [OpenStruct] a struct mapping of the JSON response
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: keybase-unofficial
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0
|
4
|
+
version: 0.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- William Woodruff
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-
|
11
|
+
date: 2017-07-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: faraday
|