srl-api 0.4.1 → 0.5.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.
Files changed (5) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +15 -1
  3. data/lib/srl.rb +1 -1
  4. data/lib/srl/race.rb +5 -0
  5. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 70a7c1a020ccd31a7c8b88363cf9bda2643d825b
4
- data.tar.gz: 1d00bca316857d5e38ae19181d9634b7123b4621
3
+ metadata.gz: 78e7bedc0640f9e4dcfa725d98ab77784762bc6f
4
+ data.tar.gz: 79f4830184d8765f49dce1e787e229df6a5bf5c1
5
5
  SHA512:
6
- metadata.gz: d162b873960d5b3da920b5e00f4cd84a8573564edc5fb80c23771bb58644b1f274c610f99f6cef700c6d4932aced7076b2d8da50eb1c6014ce66ffaf7f6c8c85
7
- data.tar.gz: 15c69d309ed6ab202726aaedc592755614a6112c2bd0d43ac870e757f605bf2417a567b12d653ea8e7b014e1aae04027ef9bb15740db03366f846c001a3193c1
6
+ metadata.gz: 9090f10c5fe0f4ef58f024bae4313175d280d89dbe19eabfa5272a3c2317fa5084f4f4648c439bb3f08a98a8aebbf54a879141b36b91bd672c3db110511dbdc4
7
+ data.tar.gz: a9304770d7eca80625704a563839350e78bd059fa4efcb923d47d74a62ba451daf4df153d9c088aee737dbed662b6f4e1514030573e1809d44e2e649ab0b1ecd
data/README.md CHANGED
@@ -16,7 +16,7 @@ it to your program's Gemfile and running `bundle install`.
16
16
  `rdoc lib/` from the project root, or let RubyGems do it for you in $GEM_HOME.
17
17
 
18
18
 
19
- ## Usage
19
+ ## Sample Usage
20
20
 
21
21
  Short version:
22
22
 
@@ -31,6 +31,20 @@ Client code should focus on the `SRL` module, with its relevant functions
31
31
  being found in `lib/srl/api.rb`.
32
32
 
33
33
 
34
+ ### One-liners
35
+
36
+ Fetch a player's stream:
37
+
38
+ SRL.player('Foobar').stream
39
+
40
+ Get the leaderboard for a particular game:
41
+
42
+ SRL.leaderboard('alttphacks') # => array
43
+
44
+ Retrieve a game's total time played:
45
+
46
+ SRL.game('ffhacks').stats.total_time_played
47
+
34
48
  ## OS / Ruby Support
35
49
 
36
50
  While the code probably runs on Ruby 2.1+, I have not yet tested it on
data/lib/srl.rb CHANGED
@@ -2,7 +2,7 @@ require_relative 'srl/api'
2
2
 
3
3
  module SRL
4
4
  # The current version of srl-api.
5
- RELEASE = '0.4.1'.freeze
5
+ RELEASE = '0.5.0'.freeze
6
6
 
7
7
  # Return the current release version as a dotted string.
8
8
  def self.release
@@ -41,6 +41,11 @@ module SRL
41
41
  @entrants = SRL::Utils.collection(arr, Entrant)
42
42
  end
43
43
 
44
+ attr_accessor :goal
45
+
46
+ attr_accessor :time
47
+ attr_accessor :numentrants
48
+
44
49
  # A participant in an active race.
45
50
  class Entrant
46
51
  include Unmarshalable
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: srl-api
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.1
4
+ version: 0.5.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Brian 'Artea' Edmonds
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-09-13 00:00:00.000000000 Z
11
+ date: 2018-01-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: minitest