Security News
PyPI’s New Archival Feature Closes a Major Security Gap
PyPI now allows maintainers to archive projects, improving security and helping users make informed decisions about their dependencies.
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
PyPI now allows maintainers to archive projects, improving security and helping users make informed decisions about their dependencies.
Research
Security News
Malicious npm package postcss-optimizer delivers BeaverTail malware, targeting developer systems; similarities to past campaigns suggest a North Korean connection.
Security News
CISA's KEV data is now on GitHub, offering easier access, API integration, commit history tracking, and automated updates for security teams and researchers.