turrialba 0.1.4 → 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/turrialba/client.rb +15 -0
- data/lib/turrialba/version.rb +1 -1
- 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: 88ccc4016514569f93a301cb095d0ed4000a1ae9
|
4
|
+
data.tar.gz: 2ab0e05c39f59f15911c91e31f42856fd8052510
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0d6530d7e954da1815d7f5cbbeef7698887a656fd0a2b5bc2601e5111437f5b0034d062a1bdd5078bb37c355a49bc220acee35ffd0ab6c5fa62cf717be520626
|
7
|
+
data.tar.gz: a144b2ffdcd03f04588d8653a51f59fbc3c01f24ddb633f5fa02b615fb0c80affd5663c4980eff439793a86fed505a8fa942380a3e15c59e2ea38a547d952ceb
|
data/lib/turrialba/client.rb
CHANGED
@@ -22,6 +22,21 @@ module Turrialba
|
|
22
22
|
User.new(response.parsed_response)
|
23
23
|
end
|
24
24
|
|
25
|
+
def post_user_distribution(uid, source, mining_cost, distribution)
|
26
|
+
params = {
|
27
|
+
source: source,
|
28
|
+
mining_cost: mining_cost,
|
29
|
+
}
|
30
|
+
params[:followers] = distribution[:followers].to_json if !distribution[:followers].nil?
|
31
|
+
params[:following] = distribution[:following].to_json if !distribution[:following].nil?
|
32
|
+
params[:favorites] = distribution[:favorites].to_json if !distribution[:favorites].nil?
|
33
|
+
params[:statuses] = distribution[:statuses].to_json if !distribution[:statuses].nil?
|
34
|
+
params[:retweets] = distribution[:retweets].to_json if !distribution[:retweets].nil?
|
35
|
+
|
36
|
+
response = self.class.post("/user/#{uid}/distribution", body: params, headers: @auth_header)
|
37
|
+
response.code == 200
|
38
|
+
end
|
39
|
+
|
25
40
|
def next_possessed_user
|
26
41
|
response = self.class.get("/next_possessed_user", headers: @auth_header)
|
27
42
|
User.new(response.parsed_response)
|
data/lib/turrialba/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: turrialba
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Fernando Valverde Arredondo
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-04-
|
11
|
+
date: 2017-04-30 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: httparty
|