Module: Octopart
- Defined in:
- lib/octopart/client.rb,
lib/octopart-ruby.rb,
lib/octopart/exceptions.rb
Overview
A simple ruby wrapper for the Octopart.com API All methods are module methods and should be called on the Octopart module.
Defined Under Namespace
Classes: APIKeyNotSetError, APIResponseError, Client
Class Method Summary collapse
-
.api_key ⇒ Object
api_key - The API key to use.
-
.api_key=(api_key) ⇒ Object
api_key - The API key to use.
Class Method Details
.api_key ⇒ Object
api_key - The API key to use
6 7 8 9 |
# File 'lib/octopart-ruby.rb', line 6 def self.api_key raise APIKeyNotSetError if @api_key.nil? @api_key end |
.api_key=(api_key) ⇒ Object
api_key - The API key to use
12 13 14 |
# File 'lib/octopart-ruby.rb', line 12 def self.api_key=(api_key) @api_key = api_key end |