Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

safer_bus_api

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

safer_bus_api

  • 1.0.3
  • Rubygems
  • Socket score

Version published
Maintainers
1
Created
Source

Gem Version

Overview

The Department of Transportation maintains the SaferBusAPI to provide safety information pertaining to transporation companies. Information related to this API and instructions for access the API can be found here: https://mobile.fmcsa.dot.gov/developer/apidescription.page?cid=561

Installation

Add this line to your application's Gemfile:

gem 'safer_bus_api'

Then run:

bundle install

Configuration

Set your api_token obtained from registering at https://mobile.fmcsa.dot.gov/developer/UserAccountCreate.page

Note: Once registered you will be emailed a registration token which you can then use to complete your registration and obtain an api token for your application

SaferBusApi.configure do |config|
  config.api_token = 'your-token-here'
end

Example Usage

Query by DOT number:

  request = SaferBusApi::Request.new(dot_number: '44110')
  response = request.perform
  response.data # Returns a formatted hash
  response.raw_data # Returns the raw response from 

Query by Company Name:

  request = SaferBusApi::Request.new(company_name: 'greyhound') # Note: company name should have no spaces and be all lower case.
  response = request.perform
  response.data # Returns a formatted hash

Query by MC Number:

  request = SaferBusApi::Request.new(mc_number: '1515') # Note: company name should have no spaces and be all lower case.
  response = request.perform
  response.data # Returns a formatted hash

Author

Nathan Bertram

Contributing

  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Ensure tests are passing with rspec
  4. Commit your changes (git commit -am 'Added some feature')
  5. Push to the branch (git push origin my-new-feature)
  6. Create new Pull Request
  7. You da man!

FAQs

Package last updated on 20 Jan 2014

Did you know?

Socket

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc