skore 0.0.1 → 0.0.2

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
  SHA1:
3
- metadata.gz: 646f83ae17d938e7f414f09fac1a8afe7f218547
4
- data.tar.gz: b8d203f3b1aa97d47bfeb9b20dfafb15fd20312d
3
+ metadata.gz: 9d77df3c902d9549be0f414d6b6ce9b6fc78f20a
4
+ data.tar.gz: 6726fed2c236b86e2c64729c98fdcb0ab147c6b1
5
5
  SHA512:
6
- metadata.gz: 31a3776dc14e712935e64d5d5e937e91e8fa2ff0cb3efaccf37b879075f0bee9d441d1b809bbe9621e1aeb49cdbc4f842e60afb9fe2eb63ecbe633d4eda1456d
7
- data.tar.gz: 0a704fabd5ed8133de57e3cdaf04824ffad02963bf13a9180e0a0e5c6b2a1ac26baf4586d4f6e7357afb7f805192f37e6bf81c511626b979106878e5f8de8884
6
+ metadata.gz: 10f63481e091dd44b07128aaf0dbb47e93601d7c254ad819e3798958c22172497fc72308db1c540ffb71c21831918091f277156be4a50794e88c564e691eeea7
7
+ data.tar.gz: 5df7296a44db79936855702d896d5bb57de5fa409c0c0e61864d2376ad29462cb3b396dc4aae8039b151016098030655945a0cd627b9be73cc7d5485442d7229
data/README.md CHANGED
@@ -19,7 +19,7 @@ Using skore is quite simple, just having the right to feed each of the platforms
19
19
  ### Get Klout Score
20
20
 
21
21
  user = Skore::KloutSkore.new(API_KEY, TWITTER_USERNAME)
22
- puts user.score_for_user
22
+ puts user.score
23
23
 
24
24
 
25
25
  return float number like 55.394093
@@ -27,7 +27,7 @@ return float number like 55.394093
27
27
  if you want to round the score simply add true method to ```score```
28
28
 
29
29
  user = Skore::KloutSkore.new(API_KEY, TWITTER_USERNAME)
30
- puts user.scorer true
30
+ puts user.score true
31
31
 
32
32
 
33
33
  return 55
@@ -45,6 +45,7 @@ return number like 777
45
45
  user = Skore::PeerIndex.new(API_KEY, TWITTER_USERNAME)
46
46
  puts user.score
47
47
 
48
+ return number like 30
48
49
 
49
50
  ## Contributing
50
51
 
@@ -8,6 +8,7 @@ module Skore
8
8
  ##
9
9
  # Include httparty module from http querys
10
10
  include HTTParty
11
+ base_uri "http://api.kred.com/kredscore"
11
12
  default_timeout 1
12
13
 
13
14
  attr_accessor :data
@@ -16,7 +17,7 @@ module Skore
16
17
  # Initialize and load data from kred api
17
18
  def initialize(app_id, app_key, username)
18
19
  begin
19
- @data = self.class.get("http://api.kred.com/kredscore?term=#{username}&source=twitter&app_id=#{app_id}&app_key=#{app_key}")
20
+ @data = self.class.get("?term=#{username}&source=twitter&app_id=#{app_id}&app_key=#{app_key}", :verify => false)
20
21
  rescue Timeout::Error
21
22
  @data = false
22
23
  end
@@ -29,7 +30,7 @@ module Skore
29
30
  result = JSON.parse(@data.body)
30
31
  result["data"][0]["influence"]
31
32
  else
32
- 0
33
+ -1
33
34
  end
34
35
  end
35
36
 
@@ -8,15 +8,16 @@ module Skore
8
8
  ##
9
9
  # Include httparty module from http querys
10
10
  include HTTParty
11
+ base_uri "https://api.peerindex.com/1/actor/topic"
11
12
  default_timeout 1
12
-
13
+
13
14
  attr_accessor :data
14
15
 
15
16
  ##
16
17
  # Initialize and load data from kred api
17
18
  def initialize(api_key, username)
18
19
  begin
19
- @data = self.class.get("https://api.peerindex.com/1/actor/topic?twitter_screen_name=#{username}&api_key=#{api_key}")
20
+ @data = self.class.get("?twitter_screen_name=#{username}&api_key=#{api_key}", :verify => false)
20
21
  rescue Timeout::Error
21
22
  @data = false
22
23
  end
@@ -29,7 +30,7 @@ module Skore
29
30
  result = JSON.parse(@data.body)
30
31
  result["peerindex"]
31
32
  else
32
- 0
33
+ -1
33
34
  end
34
35
  end
35
36
 
@@ -1,3 +1,3 @@
1
1
  module Skore
2
- VERSION = "0.0.1"
2
+ VERSION = "0.0.2"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: skore
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Angel Botto
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-09-16 00:00:00.000000000 Z
11
+ date: 2014-09-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler