keybase-unofficial 0.0.8 → 0.1.0

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.
Files changed (4) hide show
  1. checksums.yaml +4 -4
  2. data/lib/keybase.rb +1 -1
  3. data/lib/keybase/api.rb +11 -0
  4. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 0cf9b9651e3ebf2edfa9ccc0c81a99d1154329b3
4
- data.tar.gz: 741fa785ae6295790985102ffda9535930a95f34
3
+ metadata.gz: b93d42bf74da78006d530667cf9a54988b58ccf9
4
+ data.tar.gz: 5fc32740212eae2a8d07ad87c5630b83b056e8af
5
5
  SHA512:
6
- metadata.gz: f5d2ef8ffcc544e1777528275159a802209aa96b0437f18ef86552fba69c7e1015241215a575316e831053c3b62b46c6ef59a18147414d0e6f955a3c77864a74
7
- data.tar.gz: 7df09eef6f159e6c50cd1f7f6e4f599e1c93f3953caa9f03ed3b857725c5d44b5e71ab61d3c08d3eb7e927f75a3f5532e1e61c01873b77965f8065ef6c5d3331
6
+ metadata.gz: d8c0dbb04538bd718dbdf40e920e7eaac0e2ed75ad550bc628a924d2695f0f12d8f7a52cb961cdd9d999ee9ed8a441911c6aa16a27535ecfba20384ada425faa
7
+ data.tar.gz: c055f80bdd307d9be084c418245b29719957c9ef9884497b1bc4de99eaa5f61cc2f3c7e1eb068c41720315f28d26e3e4388a49acc6270a3a05392336220917db
data/lib/keybase.rb CHANGED
@@ -11,7 +11,7 @@ require_relative "keybase/chat"
11
11
  # The primary namespace for keybase-unofficial.
12
12
  module Keybase
13
13
  # keybase-unofficial's current version
14
- VERSION = "0.0.8"
14
+ VERSION = "0.1.0"
15
15
 
16
16
  extend Configuration
17
17
  end
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.8
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-06-15 00:00:00.000000000 Z
11
+ date: 2017-07-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday