turrialba 0.1.0 → 0.1.1
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 +4 -4
- data/README.md +2 -0
- data/lib/turrialba/client.rb +2 -2
- data/lib/turrialba/version.rb +1 -1
- data/turrialba.gemspec +1 -0
- metadata +15 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 177e3540f86caeb7b16c8b4c9b838d28cd3b39ca
|
4
|
+
data.tar.gz: f8a2d00f467d2efea3cf63392dd39732dc074ffd
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 110f30f2929f8179c51dc1453cec788af911f99d0c72f1709324c936ee984a5bf2dd7a1c532d615d09e965e2e98bc5a90354577ac63715c5b2c862e7cb3bae09
|
7
|
+
data.tar.gz: fe1b68df9b62a2749a2b845604c732b58dba45af15f306b9225db1e24857037ad6f75040c19a5a688e38028eeb890133867e4dccd606e34a9d72b7558239092d
|
data/README.md
CHANGED
@@ -27,6 +27,8 @@ client = Turrialba::Client.new
|
|
27
27
|
user = client.user(360962402) # Fetches a user by uid
|
28
28
|
```
|
29
29
|
|
30
|
+
By default, the server authenticates requests using a `X-AUTH-TOKEN` header. Defaults are set for server url (`localhost:3000`) and auth token (`hashlol`). A custom server url will need to be set using `TURRIALBA_URL` ENV variable. You can initialize the Client with a custom auth token.
|
31
|
+
|
30
32
|
## Development
|
31
33
|
|
32
34
|
After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
|
data/lib/turrialba/client.rb
CHANGED
@@ -15,7 +15,7 @@ module Turrialba
|
|
15
15
|
end
|
16
16
|
|
17
17
|
def put_user(hash)
|
18
|
-
uid = hash[
|
18
|
+
uid = hash[:uid] || hash[:id_str]
|
19
19
|
response = self.class.put("/user/#{uid}",
|
20
20
|
body: filter_user_params(hash),
|
21
21
|
headers: @auth_header)
|
@@ -33,7 +33,7 @@ module Turrialba
|
|
33
33
|
end
|
34
34
|
|
35
35
|
def put_tweet(uid, hash)
|
36
|
-
response = self.class.put("/user/#{uid}/tweet/#{hash[
|
36
|
+
response = self.class.put("/user/#{uid}/tweet/#{hash[:id_str]}",
|
37
37
|
body: filter_tweet_params(hash),
|
38
38
|
headers: @auth_header)
|
39
39
|
Tweet.new(response.parsed_response)
|
data/lib/turrialba/version.rb
CHANGED
data/turrialba.gemspec
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
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.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Fernando Valverde Arredondo
|
@@ -108,6 +108,20 @@ dependencies:
|
|
108
108
|
- - "~>"
|
109
109
|
- !ruby/object:Gem::Version
|
110
110
|
version: '3.0'
|
111
|
+
- !ruby/object:Gem::Dependency
|
112
|
+
name: pry-byebug
|
113
|
+
requirement: !ruby/object:Gem::Requirement
|
114
|
+
requirements:
|
115
|
+
- - "~>"
|
116
|
+
- !ruby/object:Gem::Version
|
117
|
+
version: '3.4'
|
118
|
+
type: :development
|
119
|
+
prerelease: false
|
120
|
+
version_requirements: !ruby/object:Gem::Requirement
|
121
|
+
requirements:
|
122
|
+
- - "~>"
|
123
|
+
- !ruby/object:Gem::Version
|
124
|
+
version: '3.4'
|
111
125
|
description: A Ruby interface to the Turrialba API.
|
112
126
|
email:
|
113
127
|
- fdov88@gmail.com
|