Security News
38% of CISOs Fear They’re Not Moving Fast Enough on AI
CISOs are racing to adopt AI for cybersecurity, but hurdles in budgets and governance may leave some falling behind in the fight against cyber threats.
A Ruby library for accessing the eventful.com API. It supports their new OAuth authentication method.
gem install eventful_api
## Configuration and usage
The Eventful API requires authentication via OAuth 1.0 to access resources on behalf of Eventful users. You can register your application at http://api.eventful.com/keys. Once registered, you'll need to generate your OAuth consumer and secret.
Configure EventfulApi
with your application key, OAuth consumer key and your
OAuth consumer secret:
EventfulApi.configure do |config|
config.application_key = YOUR_APPLICATION_KEY
config.consumer_key = YOUR_CONSUMER_KEY
config.consumer_secret = YOUR_CONSUMER_SECRET
end
You can make requests on behalf of a user once you have acquired their OAuth
access token/secret pair by instantiating an EventfulApi::Client
:
client = EventfulApi::Client.new(:oauth_token => 'token', :oauth_token_secret => 'token secret')
responsh_hash = client.post('/events/new', event_param_hash)
response_hash = client.get('/events/get', {:id => 'E0-001-053639493-9'})
EventfulApi makes requests to Eventful's JSON interface, returning the Hash equivalent of the JSON responses.
You are free to acquire OAuth authorization from your users using your own process. However, EventfulApi does provide a convenient facade for generating both request tokens and access tokens.
request_token = EventfulApi.get_request_token(:oauth_callback => 'http://example.com/callback')
# store the request token and secret for later use and redirect the user
session[:request_token] = request_token.token
session[:request_secret] = request_token.secret
redirect_to token.redirect_url
# Reconstruct the request token using the token and secret saved in the session
request_token = OAuth::RequstToken.new(EventfulApi.oauth_consumer, session[:request_token], session[:request_secret])
# Get an access token from Eventful using the oauth_verifier param
access_token = request_token.get_access_token(:oauth_verifier => params[:oauth_verifier])
# You now have a verified token and secret ready to create a client
client = EventfulApi::Client.new(:oauth_token => access_token.token, :oauth_secret => access_token.secret)
Released under the MIT License. See the LICENSE file for further details.
FAQs
Unknown package
We found that eventful_api 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
CISOs are racing to adopt AI for cybersecurity, but hurdles in budgets and governance may leave some falling behind in the fight against cyber threats.
Research
Security News
Socket researchers uncovered a backdoored typosquat of BoltDB in the Go ecosystem, exploiting Go Module Proxy caching to persist undetected for years.
Security News
Company News
Socket is joining TC54 to help develop standards for software supply chain security, contributing to the evolution of SBOMs, CycloneDX, and Package URL specifications.