Bluetooth Company Lookup API - Ruby Gem
Bluetooth Company Lookup allows you to identify Bluetooth device manufacturers by their Bluetooth SIG assigned company identifier. This helps identify the manufacturer of Bluetooth devices, beacons, and accessories.
Installation
Add this line to your application's Gemfile:
gem 'apiverve_bluetoothlookup'
And then execute:
$ bundle install
Or install it yourself as:
$ gem install apiverve_bluetoothlookup
Getting Started
Get your API key at APIVerve
Basic Usage
require 'apiverve_bluetoothlookup'
# Initialize the client
client = APIVerve::Bluetoothlookup::Client.new(api_key: "YOUR_API_KEY")
# Make a request
response = client.execute({ companyid: "76" })
# Print the response
puts response
Error Handling
begin
response = client.execute({ companyid: "76" })
puts response["data"]
rescue APIVerve::Bluetoothlookup::ValidationError => e
puts "Validation error: #{e.errors.join(', ')}"
rescue APIVerve::Bluetoothlookup::APIError => e
puts "API error: #{e.}"
puts "Status code: #{e.status_code}"
end
Debug Mode
# Enable debug logging
client = APIVerve::Bluetoothlookup::Client.new(
api_key: "YOUR_API_KEY",
debug: true
)
Example Response
{
"status": "ok",
"error": null,
"data": {
"companyId": 76,
"companyIdHex": "0x004C",
"found": true,
"company": "Apple, Inc."
}
}
Documentation
For more information, visit the API Documentation.
Support
- Website: https://apiverve.com/marketplace/bluetoothlookup?utm_source=ruby&utm_medium=readme
- Email: hello@apiverve.com
License
This gem is available under the MIT License.