Research
Security News
Malicious npm Package Targets Solana Developers and Hijacks Funds
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
Ruby wrapper for the Yahoo! Gemini API
Add this line to your application's Gemfile:
gem 'yahoo_gemini_client'
And then execute:
$ bundle
Or install it yourself as:
$ gem install yahoo_gemini_client
Currently supports OAuth2 Auth Code Strategy (Explicit Grant Flow) only. For more info see https://developer.yahoo.com/oauth2/guide/flows_authcode/
Your app can start using this gem if you have a refresh token. A refresh token can be manually generated through the console.
client = YahooGeminiClient::Client.new(
consumer_key: "consumer_key",
consumer_secret: "consumer_secret",
)
# open a browser and go to the authorization url given to get the authorization code
authorization_url = client.authorization_url
# you can now generate the refresh token once you have the authorization code
refresh_token = client.get_token("the_authorization_code").refresh_token
# with the refresh token you can now instantiate and use a YahooGeminiClient::Client anytime
client = YahooGeminiClient::Client.new(
consumer_key: "consumer_key",
consumer_secret: "consumer_secret",
refresh_token: refresh_token,
)
response = client.advertisers.find(123)
response.error? # check if response is error
response.advertiser # returns a YahooGeminiClient::Advertiser
response = client.advertisers.all
response.error? # check if response is error
response.advertisers # returns an array containing YahooGeminiClient::Advertiser
request_body = { "cube": "performance_stats",
"fields": [
{ "field": "Ad ID" },
{ "field": "Day" },
{ "alias": "My dummy column", "value": "" },
{ "field": "Impressions" },
{ "field": "Ad Image URL", "alias": "url" }
],
"filters": [
{ "field": "Advertiser ID", "operator": "=", "value": 12345 },
{ "field": "Campaign ID", "operator": "IN", "values": [10,20,30] },
{ "field": "Day", "operator": "between", "from": "2014-04-01", "to": "2014-04-30" }
]
}
response = client.custom_report.create(request_body)
response.error? # check if response is error
response.job_id # get the report request token of the report creation job request at Yahoo.com
params = {advertiser_id: 12345, job_id: "86ea9ba1c645e7a33bddfc06ee5c799fa40d02ce49632927"}
response = client.custom_report.find(params)
response.error? # check if response is error
response.completed? # check if report creation at Yahoo.com is complete
response.csv_url # get the csv url of the created report
params = {advertiser_id: 12345}
response = client.campaigns.where(params)
response.campaigns # returns Array[YahooGeminiClient::Campaign]
https://gemini.yahoo.com/advertiser/home
After checking out the repo, run bin/setup
to install dependencies. Then, run rake spec
to run the tests. You can also run bin/console
for an interactive prompt that will allow you to experiment.
To 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.
Bug reports and pull requests are welcome on GitHub at https://github.com/g5/yahoo_gemini_client. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the Contributor Covenant code of conduct.
Copyright (c) 2015 G5
MIT License
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
FAQs
Unknown package
We found that yahoo_gemini_client demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 open source maintainers 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.
Research
Security News
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
Security News
Research
Socket researchers have discovered malicious npm packages targeting crypto developers, stealing credentials and wallet data using spyware delivered through typosquats of popular cryptographic libraries.
Security News
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.