turrialba 0.1.4 → 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
  SHA1:
3
- metadata.gz: a5c7d25fa06979f69bae657f9f77b46200f8d593
4
- data.tar.gz: e9b6a36d48ab3d3b58324ec1f56f9966a4b57040
3
+ metadata.gz: 88ccc4016514569f93a301cb095d0ed4000a1ae9
4
+ data.tar.gz: 2ab0e05c39f59f15911c91e31f42856fd8052510
5
5
  SHA512:
6
- metadata.gz: 0dd9486894adc37c775a168dd921d46afd7b532bc16865c4620b7fe6e97fd2aebd6082c771681cf122d62e3f77706af148eea24e5061a04c6f9d0abc5ee476e7
7
- data.tar.gz: 9473f3f8f7f0402c7616c47d3add26d009d0e8fddd07fa68ca7c298e6daf25b86c441ff80837b4cf487dfb354d2247eba5726e225b47f0827834d136fbf0f717
6
+ metadata.gz: 0d6530d7e954da1815d7f5cbbeef7698887a656fd0a2b5bc2601e5111437f5b0034d062a1bdd5078bb37c355a49bc220acee35ffd0ab6c5fa62cf717be520626
7
+ data.tar.gz: a144b2ffdcd03f04588d8653a51f59fbc3c01f24ddb633f5fa02b615fb0c80affd5663c4980eff439793a86fed505a8fa942380a3e15c59e2ea38a547d952ceb
@@ -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)
@@ -1,3 +1,3 @@
1
1
  module Turrialba
2
- VERSION = "0.1.4"
2
+ VERSION = "0.2.0"
3
3
  end
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.1.4
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-24 00:00:00.000000000 Z
11
+ date: 2017-04-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: httparty