Security News
Fluent Assertions Faces Backlash After Abandoning Open Source Licensing
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
Uber Estimates is a small gem that wraps estimate endpoints from Uber API. Using this gem you will be able to get estimates about Uber rides nice and smooth.
Add this line to your application's Gemfile:
gem 'uber-estimates'
And then execute:
$ bundle
Or install it yourself as:
$ gem install uber-estimates
Uber::Estimates.configure do |config|
config.server_token = "your server token"
end
To get price estimates you need to provide ruby :price
as estimations type, start point and end point coordinates, as below. More details at Uber Docs
Uber::Estimates.get_estimations(:price,
{start_latitude: 44.427587, start_longitude: 26.0987345,
end_latitude: 44.4599565, end_longitude: 26.0984328
}
)
#<Uber::Estimates::Response:0x0000000345cce0
@code=200,
@data=
[#<Uber::Estimates::ResponseTypes::Price:0x0000000345b9f8
@currency_code="RON",
@display_name="uberX",
@distance=3.24,
@duration=840,
@estimate="RON20-27",
@high_estimate=27,
@localized_display_name="uberX",
@low_estimate=20,
@product_id="1ca8d691-9f67-4bfb-9c57-cb727b52b7b7",
@surge_multiplier=2>,
#<Uber::Estimates::ResponseTypes::Price:0x0000000345b9d0
@currency_code="RON",
@display_name="uberSELECT",
@distance=3.24,
@duration=840,
@estimate="RON19-26",
@high_estimate=26,
@localized_display_name="uberSELECT",
@low_estimate=19,
@product_id="df439009-d1de-4a3c-9ead-9e0e6f0294b9",
@surge_multiplier=1.5>,
#<Uber::Estimates::ResponseTypes::Price:0x0000000345b9a8
@currency_code="RON",
@display_name="Uber Child Seat",
@distance=3.24,
@duration=840,
@estimate="RON20-24",
@high_estimate=24,
@localized_display_name="Uber Child Seat",
@low_estimate=20,
@product_id="99e0492a-acc1-412d-b650-48ed7fed9788",
@surge_multiplier=1.0>]>
To get time estimates you need to provide ruby :time
as estimations type, start point and end point coordinates, or a product_id. More details at Uber Docs
Uber::Estimates.get_estimations(:time,
{start_latitude: 44.427587, start_longitude: 26.0987345,
end_latitude: 44.4599565, end_longitude: 26.0984328
}
)
or
Uber::Estimates.get_estimations(:time,
{start_latitude: 44.427587, start_longitude: 26.0987345,
product_id: "99e0492a-acc1-412d-b650-48ed7fed9788"
}
)
#<Uber::Estimates::Response:0x00000001cf2730
@code=200,
@data=
[#<Uber::Estimates::ResponseTypes::Time:0x00000001cf1790
@display_name="uberX",
@estimate=300,
@localized_display_name="uberX",
@product_id="1ca8d691-9f67-4bfb-9c57-cb727b52b7b7">,
#<Uber::Estimates::ResponseTypes::Time:0x00000001cf1768
@display_name="uberSELECT",
@estimate=420,
@localized_display_name="uberSELECT",
@product_id="df439009-d1de-4a3c-9ead-9e0e6f0294b9">]>
git checkout -b my-new-feature
)git commit -am 'Add some feature'
)git push origin my-new-feature
)FAQs
Unknown package
We found that uber-estimates demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
Research
Security News
Socket researchers uncover the risks of a malicious Python package targeting Discord developers.
Security News
The UK is proposing a bold ban on ransomware payments by public entities to disrupt cybercrime, protect critical services, and lead global cybersecurity efforts.