{"id":23564557,"url":"https://github.com/parnic/shift_stats","last_synced_at":"2025-04-30T16:19:35.702Z","repository":{"id":56895324,"uuid":"128284317","full_name":"parnic/shift_stats","owner":"parnic","description":"Ruby gem for pulling data from any Digital Shift site (HockeyShift, BasketballShift, etc.)","archived":false,"fork":false,"pushed_at":"2018-04-28T12:53:24.000Z","size":11,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-28T05:47:56.575Z","etag":null,"topics":["baseball","basketball","football","gem","hockey","lacrosse","ruby","ruby-gem","rubygem","shift","soccer","sports"],"latest_commit_sha":null,"homepage":"https://rubygems.org/gems/shift_stats","language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/parnic.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-04-06T01:37:58.000Z","updated_at":"2023-03-21T14:08:28.000Z","dependencies_parsed_at":"2022-08-20T17:10:26.410Z","dependency_job_id":null,"html_url":"https://github.com/parnic/shift_stats","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/parnic%2Fshift_stats","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/parnic%2Fshift_stats/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/parnic%2Fshift_stats/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/parnic%2Fshift_stats/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/parnic","download_url":"https://codeload.github.com/parnic/shift_stats/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251425694,"owners_count":21587435,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["baseball","basketball","football","gem","hockey","lacrosse","ruby","ruby-gem","rubygem","shift","soccer","sports"],"created_at":"2024-12-26T17:16:45.248Z","updated_at":"2025-04-30T16:19:35.681Z","avatar_url":"https://github.com/parnic.png","language":"Ruby","readme":"# ShiftStats gem\nThis gem pulls data from Digital Shift sites such as HockeyShift, SoccerShift, LacrosseShift, FootballShift, BasketballShift, and BaseballShift.\n\n[![Gem Version](https://badge.fury.io/rb/shift_stats.svg)](http://badge.fury.io/rb/shift_stats)\n\n## Install\nYou can install shift_stats via rubygems: `gem install shift_stats`\n\n## Usage\n\n```ruby\nrequire 'shift_stats'\n```\n\nOptionally configure your API key (note: by default uses the same API key as the Android HockeyShift app)\n\n```ruby\nShiftStats.configure do |config|\n  config.api_key 'my_api_key'\nend\n```\n\nCreate a new instance of ShiftStats with `s = ShiftStats.new`. This connects to the ShiftStats server, logs in, and stores the ticket hash. This ticket is only valid for a limited amount of time.\n\nCreating an instance of the class can raise an error if there are network issues or the API key is invalid.\n\n### Available methods\n\n* `leagues` - Get a list of all available leagues.\n* `league(league_id)` - Show details for a specific league.\n* `league_seasons(league_id)` - Get a list of seasons for a specific league.\n* `league_suspensions(league_id, only_active: true)` - Get a list of suspended players for the specified league.\n  * `only_active` controls whether expired suspensions are included or not.\n  * WARNING: this response can be very large, especially if `only_active` is false.\n* `team_search(sport_name, team_name)` - Search for the given team in the given sport for all active seasons.\n* `team_schedule(team_id)` - Retrieve the game schedule for the supplied team.\n* `team_players_list(team_id)` - Get the list of players on a specific team.\n* `teams_in_division(division_name, league_id, current_season: true)` - Get all teams in the named division in the specific league.\n  * This is an odd API that requires the division be a name, not an ID, and requires specifying a league ID to search in.\n* `team_games(team_id, include_future: true, include_today: true)` - Get all games for a specific team.\n* `team_games_for_status(team_id, status: 'Final,In Progress,Forfeit')` - Get a list of all games for a specific team matching the specified type.\n  * Valid values for `status` are `Final`, `In Progress`, and `Forfeit`, and can be mixed and matched, separated by commas.\n* `team_practices(team_id, include_future: true, include_today: true)` - Get a list of practices schedule for the specified team.\n* `team_suspensions(team_id, only_active: true)` - Get a list of suspensions of players on the specified team.\n  * `only_active` controls whether expired suspensions are included or not.\n* `game(game_id)` - Returns data about the specified game.\n* `game_goals(game_id, only: nil)` - Returns a list of goals in the specified game.\n  * Valid values for `only` are `:home` and `:away`. If not specified, both teams' goals are included.\n* `game_goalies(game_id, only: nil)` - Returns a list of goalies in the specified game.\n  * Valid values for `only` are `:home` and `:away`. If not specified, both teams' goalies are included.\n* `game_penalties(game_id, only: nil)` - Returns a list of penalties in the specified game.\n  * Valid values for `only` are `:home` and `:away`. If not specified, both teams' penalties are included.\n* `game_roster(game_id, only: nil)` - Returns the roster for the specified game.\n  * Valid values for `only` are `:home` and `:away`. If not specified, both teams' rosters are included.\n* `division_games_list(division_id)` - Returns all games for a specified division.\n* `division_standings(division_id, type: 'Regular Season')` - Returns a ranked list of teams for the specified division.\n  * Valid values for `type` are `Regular Season`, `Playoffs`, and `Exhibition`.\n* `division_teams(division_id)` - Lists all teams in the specified division.\n* `division_leaders(division_id, type: 'Regular Season', limit: 20, metrics: [:points, :goals])` - Lists up to `limit` number of leaders for the specified division.\n  * Valid values for `type` are `Regular Season`, `Playoffs`, and `Exhibition`.\n  * Valid values for `metrics` include anything listed in `league(league_id)['league']['view_settings']['leader_metrics']`.\n* `division_suspensions(division_id, only_active: true)` - Get a list of suspensions of players in the specified division.\n  * `only_active` controls whether expired suspensions are included or not.\n* `season(season_id)` - Show details for a specific season.\n* `season_divisions_list(season_id)` - Lists all divisions for the specified season.\n* `season_suspensions(season_id, only_active: true)` - Get a list of suspended players for the specified season.\n  * `only_active` controls whether expired suspensions are included or not.\n\n## Bug reports, feature requests, contributions\n\nPlease create an issue or pull request on github. Assistance is most welcome.\n\nThere are more endpoints available on Shift sites, but none are documented. Running a mobile app inside an emulator and watching wireshark, fiddler, etc. is how the current endpoints were discovered.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fparnic%2Fshift_stats","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fparnic%2Fshift_stats","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fparnic%2Fshift_stats/lists"}