ts_json_api 0.1.1 → 0.1.2

Sign up to get free protection for your applications and to get access to all the features.
data/README.md CHANGED
@@ -16,6 +16,24 @@ Run the following rails generator to setup the gem
16
16
 
17
17
  This generator creates an initializer that you will need to configure for your access token to use the API.
18
18
 
19
+ ## Configuration
20
+
21
+ This gem provides several configuration options exposed in an `ts_json_api.rb` initializer that is created for you when you run the included generator.
22
+
23
+ ```ruby
24
+ TsJsonApi::Configure.setup do |config|
25
+ config.username = ""
26
+ config.password = ""
27
+ config.api_version = 2
28
+ config.logging_enabled = true
29
+ config.server_url = ""
30
+ end
31
+ ```
32
+
33
+ The `username`, `password`, and `server_url` fields are all requried to specify which service to connect to. The `api_version` field allows you to specify a particular version or contract you have in place with the T&S team when authenticating with the service.
34
+
35
+ You can disable logging by setting `logging_enabled = false`. Logging will log the raw response from the T&S service into the Rails `tmp/ts_json_api/` directory for you to review.
36
+
19
37
  ## Usage
20
38
 
21
39
  This gem exposes several methods that map directly to API calls from the T&S team.
@@ -44,7 +62,7 @@ TsJsonApi.live_flag
44
62
  TsJsonApi.live_points
45
63
 
46
64
  # Points
47
- TsJsonApi.driver_points(race_season, series_id, race_id=nil)
65
+ TsJsonApi.points_per_race(race_season, series_id, race_id=nil)
48
66
 
49
67
  # Races
50
68
  TsJsonApi.get_race(race_id)
@@ -5,7 +5,7 @@ module TsJsonApi
5
5
  extend ActiveSupport::Concern
6
6
  module ClassMethods
7
7
 
8
- def driver_points(race_season, series_id, race_id=nil)
8
+ def points_per_race(race_season, series_id, race_id=nil)
9
9
 
10
10
  url = "driverpoints?race_season=#{race_season}&series_id=#{series_id}"
11
11
  file_type = "driver_points_#{race_season}_series_#{series_id}"
@@ -1,3 +1,3 @@
1
1
  module TsJsonApi
2
- VERSION = "0.1.1"
2
+ VERSION = "0.1.2"
3
3
  end
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.1
4
+ version: 0.1.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-10-29 00:00:00.000000000 Z
12
+ date: 2012-11-05 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rails
@@ -130,7 +130,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
130
130
  version: '0'
131
131
  segments:
132
132
  - 0
133
- hash: -2334037871197059931
133
+ hash: -840938038302504985
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: -2334037871197059931
142
+ hash: -840938038302504985
143
143
  requirements: []
144
144
  rubyforge_project:
145
145
  rubygems_version: 1.8.24