{"id":20803297,"url":"https://github.com/naveed-ahmad/smashrun-ruby","last_synced_at":"2026-04-26T07:34:19.425Z","repository":{"id":35113739,"uuid":"105523958","full_name":"naveed-ahmad/smashrun-ruby","owner":"naveed-ahmad","description":"Ruby gem for Smashrun api","archived":false,"fork":false,"pushed_at":"2023-03-16T05:48:34.000Z","size":38,"stargazers_count":1,"open_issues_count":4,"forks_count":0,"subscribers_count":4,"default_branch":"master","last_synced_at":"2024-04-27T00:23:21.488Z","etag":null,"topics":["smashrun","sports-data"],"latest_commit_sha":null,"homepage":null,"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/naveed-ahmad.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-10-02T10:46:53.000Z","updated_at":"2021-03-01T19:55:09.000Z","dependencies_parsed_at":"2024-11-18T01:04:00.694Z","dependency_job_id":null,"html_url":"https://github.com/naveed-ahmad/smashrun-ruby","commit_stats":null,"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/naveed-ahmad%2Fsmashrun-ruby","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/naveed-ahmad%2Fsmashrun-ruby/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/naveed-ahmad%2Fsmashrun-ruby/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/naveed-ahmad%2Fsmashrun-ruby/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/naveed-ahmad","download_url":"https://codeload.github.com/naveed-ahmad/smashrun-ruby/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243147100,"owners_count":20243746,"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":["smashrun","sports-data"],"created_at":"2024-11-17T18:49:15.160Z","updated_at":"2025-12-26T07:16:09.527Z","avatar_url":"https://github.com/naveed-ahmad.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# smashrun\n\nRuby gem for [Smashrun api](https://api.smashrun.com/v1/documentation)\n\nRegister your application for getting client id and secret: https://api.smashrun.com/register\n\n## Usage\n\n### Authentication\n\n```ruby\nSmashrun.configure do |config|\n  config.client_id = 'your app client id'\n  config.client_secret = 'your app client secret'\nend\n\nclient = Smashrun::Client.new(user_access_token)\n```\n\n### Refresh user's access token\nSmashrun tokens are valid for 12 weeks, you can refresh access tokens using user's refresh token. \n\n```ruby\nclient.refresh_token(refresh_token)\n```\nYou better save new access token and refresh token.\n\n\n### Fetching activities\n\n```ruby\nclient.activities # =\u003e list of recent activities\n```\nYou can also use **fromDateUTC**, **page** or **count** for filtering and paginating activities list\n\n```ruby\nclient.activities page: 1, count: 100\n\nclient.activities fromDateUTC: 2.days.ago.to_i, page: 2\n```\n\nIf you want to minimize download size or need to quickly check for new activities, use following api methods instead.\n```ruby\nclient.latest_activities_briefs # retrive activities with minimal info( id, startTime, distance and duration)\n\nclient.latest_activities_ids    # or just ids\n````\n\n\n### Fetching single activity detail\n\n```ruby\nclient.activity_detail activity_id        # full activity detail \nclient.activity_svg_polyline activity_id  # retrive SVG polyline for route of activity\nclient.activity_geojson activity_id       # retrive activity route in GeoJSON format\nclient.activity_splits activity_id, 'distance_unit'        # retrive splits of an activity in specified unit ( mi for mile and km for kilometer)\n````\n\n### Fetching user detail\n```ruby\nclient.athlete\n```\n\n### Posting new activities \n\nPending...\n \n\n## Copyright\n\nCopyright (c) 20117 Naveed Ahmad. See LICENSE.txt for further details.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnaveed-ahmad%2Fsmashrun-ruby","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnaveed-ahmad%2Fsmashrun-ruby","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnaveed-ahmad%2Fsmashrun-ruby/lists"}