devinfo 0.1.0 → 0.2.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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 5bc4c9a27d7ed90403149581cc4effdb1086205bcdf2bfa7d919860a04e701b7
4
- data.tar.gz: a5cb6bd0babfc1ef836ca98a6df61006181bb607cc918a34b7e1b20ecd429bce
3
+ metadata.gz: 2963e83c4920559d9f26130dcb19d5c5df41a309fba3720651403d466b33977a
4
+ data.tar.gz: b0b5441670581195492fc45cd7dbd4f00f776eeb78e5a3b8cf022672524ecda3
5
5
  SHA512:
6
- metadata.gz: 45479f46e252c93b341c5b571fef45b2ef8efee2fcac78f0c56e033ca2af08a1323f50845a8cfa906b539491c67efec25361608b92c52dbd58751e30e919ab2c
7
- data.tar.gz: 97a618138ff78a99826aae5e3d54fbc3e993208305726ca8bcd3885fba9c6dcd89d8ee538b5436645f05cb105c01da6bd4a6bcf6f94ca529593d205b9c08d88e
6
+ metadata.gz: f78be4a750f8b1dba168fbfc258a7d6066650b30ced1cf4aa0f2429c979c86561b364fb0746f822291374e3f34a665566d54c18525a24b1fcaa8f9009387d176
7
+ data.tar.gz: 38bfc1761f1455f093006818a1371ad0785a7be621880ee384b3d8a11525206de174eb1ab93eaee24c7029d12d4e951e04d9738b7ec09b9ed17fb1bf0637c9ef
@@ -9,7 +9,7 @@ Gem::Specification.new do |spec|
9
9
  spec.authors = ["Junying Sun"]
10
10
  spec.email = ["haitte111@gmail.com"]
11
11
 
12
- spec.summary = "Gem to get dev information"
12
+ spec.summary = "Gem to get dev information from github and StackOverflow"
13
13
 
14
14
 
15
15
  # Specify which files should be added to the gem when it is released.
@@ -14,9 +14,17 @@ module Devinfo
14
14
  ""
15
15
  end
16
16
  end
17
- def self.stackoverflow
18
- response = HTTParty.get('https://api.github.com/users/octocat')
19
- response["followers"]
17
+
18
+ def self.stackoverflow(user_id)
19
+ if user_id != ""
20
+ response = HTTParty.get('https://api.stackexchange.com/users/'+user_id+'?site=stackoverflow')
21
+ if response.code != 200
22
+ return "error"
23
+ end
24
+ response["items"][0]["reputation"]
25
+ else
26
+ ""
27
+ end
20
28
  end
21
29
  end
22
30
  end
@@ -1,3 +1,3 @@
1
1
  module Devinfo
2
- VERSION = "0.1.0"
2
+ VERSION = "0.2.0"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: devinfo
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Junying Sun
@@ -89,5 +89,5 @@ requirements: []
89
89
  rubygems_version: 3.0.1
90
90
  signing_key:
91
91
  specification_version: 4
92
- summary: Gem to get dev information
92
+ summary: Gem to get dev information from github and StackOverflow
93
93
  test_files: []