ts_json_api 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
data/README.md
CHANGED
@@ -4,6 +4,12 @@ Use this gem to consume the T&S JSON API provided for live & summary race data.
|
|
4
4
|
|
5
5
|
## Installation
|
6
6
|
|
7
|
+
Add the gem to your Gemfile
|
8
|
+
|
9
|
+
```ruby
|
10
|
+
gem 'ts_json_api'
|
11
|
+
```
|
12
|
+
|
7
13
|
Run the following rails generator to setup the gem
|
8
14
|
|
9
15
|
> rails g ts_json_api:install
|
@@ -13,7 +13,7 @@ module TsJsonApi
|
|
13
13
|
|
14
14
|
url = "#{Configure.server_url}#{partial_url}"
|
15
15
|
|
16
|
-
response = api[partial_url].get
|
16
|
+
response = api[partial_url].get
|
17
17
|
json = response.to_str
|
18
18
|
json.gsub!(/[^\x20-\x7e]/,'')
|
19
19
|
|
@@ -44,7 +44,7 @@ module TsJsonApi
|
|
44
44
|
end
|
45
45
|
|
46
46
|
def api
|
47
|
-
@@api ||= RestClient::Resource.new(Configure.server_url, user: Configure.username, password: Configure.password, timeout: 20)
|
47
|
+
@@api ||= RestClient::Resource.new(Configure.server_url, user: Configure.username, password: Configure.password, timeout: 20, headers: { accept: "application/json;version=#{Configure.api_version}"})
|
48
48
|
end
|
49
49
|
|
50
50
|
end
|
data/lib/ts_json_api/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ts_json_api
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.1
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -130,7 +130,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
130
130
|
version: '0'
|
131
131
|
segments:
|
132
132
|
- 0
|
133
|
-
hash:
|
133
|
+
hash: -2334037871197059931
|
134
134
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
135
135
|
none: false
|
136
136
|
requirements:
|
@@ -139,7 +139,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
139
139
|
version: '0'
|
140
140
|
segments:
|
141
141
|
- 0
|
142
|
-
hash:
|
142
|
+
hash: -2334037871197059931
|
143
143
|
requirements: []
|
144
144
|
rubyforge_project:
|
145
145
|
rubygems_version: 1.8.24
|