{"id":23766039,"url":"https://github.com/skukx/rlyft","last_synced_at":"2025-09-05T10:32:54.180Z","repository":{"id":56892418,"uuid":"62110782","full_name":"skukx/rlyft","owner":"skukx","description":"(rlyft) Ruby Wrapper for Lyft API","archived":false,"fork":false,"pushed_at":"2018-01-10T21:31:07.000Z","size":62,"stargazers_count":4,"open_issues_count":0,"forks_count":3,"subscribers_count":1,"default_branch":"master","last_synced_at":"2024-07-31T23:12:51.685Z","etag":null,"topics":["lyft","lyft-api"],"latest_commit_sha":null,"homepage":"","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/skukx.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}},"created_at":"2016-06-28T04:46:33.000Z","updated_at":"2021-07-12T16:50:52.000Z","dependencies_parsed_at":"2022-08-20T16:10:31.487Z","dependency_job_id":null,"html_url":"https://github.com/skukx/rlyft","commit_stats":null,"previous_names":["skukx/lyft"],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/skukx%2Frlyft","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/skukx%2Frlyft/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/skukx%2Frlyft/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/skukx%2Frlyft/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/skukx","download_url":"https://codeload.github.com/skukx/rlyft/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":232037318,"owners_count":18463714,"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":["lyft","lyft-api"],"created_at":"2024-12-31T23:36:17.979Z","updated_at":"2024-12-31T23:36:20.471Z","avatar_url":"https://github.com/skukx.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# RLyft\n[![Gem Version](https://badge.fury.io/rb/rlyft.svg)](https://badge.fury.io/rb/rlyft)\n[![CircleCI](https://circleci.com/gh/skukx/rlyft.svg?style=shield)](https://circleci.com/gh/skukx/rlyft)\n\nSimple wrapper for interacting with Lyft's public api.\n\n## Breaking Changes\n  See https://github.com/skukx/rlyft/pull/6\n\n## Installation\n\nAdd this line to your application's Gemfile:\n\n```ruby\ngem 'rlyft', require 'lyft'\n```\n\nAnd then execute:\n\n    $ bundle\n\n## Setup\n\n```ruby\nclient = Lyft::Client.new(\n  client_id: 'client_id',\n  client_secret: 'client_secret',\n  use_sandbox: true\n)\n```\n\n## Using Public Api\nGet Access Token:\n\n```ruby\n# Public token\nclient.oauth.retrieve_access_token\n\n# When using oauth.\nclient.oauth.retrieve_access_token authorization_code: 'auth_code'\n```\n\nCalculate Lyft cost.\n\n```ruby\nclient.availability.cost access_token: 'access_token',\n                         params: {\n                           start_lat: 37.7772,\n                           start_lng: -122.4233,\n                           end_lat: 37.7972,\n                           end_lng: -122.4533\n                         }\n```\n\nTime for nearest driver to reach location.\n\n```ruby\nclient.availability.eta access_token: 'token',\n                        params: {\n                          lat: 37.7772,\n                          lng: -122.4233\n                        }\n```\n\nGet the location of nearby drivers.\n\n```ruby\nclient.availability.nearby_drivers access_token: 'token',\n                                   params: {\n                                     lat: 37.7772,\n                                     lng: -122.4233\n                                   }\n```\n\nGet available ride types.\n\n```ruby\nclient.availability.ride_types access_token: 'token',\n                               params: {\n                                 lat: 37.7772,\n                                 lng: -122.4233\n                               }\n```\n\nRequest a ride\n```ruby\nclient.rides.request access_token: 'token',\n                     params: {\n                       origin: { lat: 37.7772, lng: -122.4233 },\n                       ride_type: Lyft::Ride::Type::LYFT\n                     }\n```\n\nCancel a ride\n```ruby\nclient.rides.cancel access_token: 'token',\n                    params: { ride_id: '123' }\n\n# When cancel_confirmation_token is needed.\nclient.rides.cancel access_token: 'token',\n                    params: {\n                      ride_id: '123',\n                      cancel_confirmation_token: 'cancellation_token'\n                    }\n```\n\n## Using the Sandbox:\n\nSet available ride types\n```ruby\nclient.rides.set_ridetypes(\n  access_token: 'my_token',\n  params: {\n    lat: 37.7833,\n    lng: -122.4167,\n    ride_types: [\n      Lyft::Ride::Type::LYFT,\n      Lyft::Ride::Type::LYFT_PLUS\n    ]\n  }\n)\n```\n\nSet ride status\n```ruby\nclient.rides.set_status(\n  access_token: 'my_token',\n  params: {\n    ride_id: 'my_ride_id',\n    status: Lyft::Ride::Status::ACCEPTED\n  }\n)\n```\n\nSet driver availability\n```ruby\nclient.rides.set_driver_availability(\n  access_token: 'my_token',\n  params: {\n    ride_type: Lyft::Ride::Type::LYFT_SUV\n    lat: 37.7833,\n    lng: -122.4167,\n    driver_availability: true\n  }\n)\n```\n\nSet primetime percentage\n```ruby\nclient.rides.set_primetime(\n  access_token: 'my_token',\n  params: {\n    lat: 37.7833,\n    lng: -122.4167,\n    primetime_percentage: '25%'\n  }\n)\n```\n\n## Development\n\nAfter checking out the repo, run `bin/setup` to install dependencies. You can also run `bin/console` for an interactive prompt that will allow you to experiment.\n\nTo install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).\n\n## Contributing\n\nBug reports and pull requests are welcome on GitHub at https://github.com/skukx/lyft.\n\n\n## License\n\nThe gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fskukx%2Frlyft","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fskukx%2Frlyft","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fskukx%2Frlyft/lists"}