Class: MLB::PeopleChanges
- Inherits:
-
Shale::Mapper
- Object
- Shale::Mapper
- MLB::PeopleChanges
- Defined in:
- lib/mlb/people_changes.rb
Overview
Provides methods for fetching people changes from the API
Instance Attribute Summary collapse
-
#people ⇒ Array<Player>
Returns the changed people.
Class Method Summary collapse
-
.since(date:) ⇒ Array<Player>
Retrieves people changes since a date.
Instance Attribute Details
Class Method Details
.since(date:) ⇒ Array<Player>
Retrieves people changes since a date
27 28 29 30 31 32 |
# File 'lib/mlb/people_changes.rb', line 27 def self.since(date:) params = {updatedSince: date.to_s} query_string = URI.encode_www_form(params) response = CLIENT.get("people/changes?#{query_string}") from_json(response).people end |