turrialba 0.1.2 → 0.1.3
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 +14 -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: 5ee5db88c1151867510b7e197d9b19226277aa60
|
4
|
+
data.tar.gz: dff57802270993d269c3d0875d5d297fe8ba61a1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2b2a3c23ffcda9447ef25fd0ef897aae43d38a42ed5c7d13beb9778a957de4b905f7d8793a00ba1619a6678807cd953e25e697fbf05d308c9ee3b682f4065b60
|
7
|
+
data.tar.gz: 717495974ba4893e78e42f62a9faac4fcd832b8ca5c3e901c0a421902845525ebf7626546767c186cafdfdfc0e053cb1c08764653d36cbd2a70cf1bcd5bb1c6a
|
data/lib/turrialba/client.rb
CHANGED
@@ -39,6 +39,20 @@ module Turrialba
|
|
39
39
|
Tweet.new(response.parsed_response)
|
40
40
|
end
|
41
41
|
|
42
|
+
def post_tweet_distribution(id_str, source, mining_cost, distribution)
|
43
|
+
response = self.class.post("/tweet/#{id_str}/distribution",
|
44
|
+
body: {
|
45
|
+
source: source,
|
46
|
+
mining_cost: mining_cost,
|
47
|
+
followers: distribution[:followers].to_json,
|
48
|
+
following: distribution[:following].to_json,
|
49
|
+
favorites: distribution[:favorites].to_json,
|
50
|
+
statuses: distribution[:statuses].to_json
|
51
|
+
},
|
52
|
+
headers: @auth_header)
|
53
|
+
response.code == 200
|
54
|
+
end
|
55
|
+
|
42
56
|
def put_favorite(uid, id_str)
|
43
57
|
response = self.class.put("/user/#{uid}/favorite/#{id_str}",
|
44
58
|
headers: @auth_header)
|
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.1.
|
4
|
+
version: 0.1.3
|
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-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: httparty
|