Module: Octopart

Defined in:
lib/octopart/client.rb,
lib/octopart-ruby.rb

Overview

A simple ruby wrapper for the Octopart.com API All methods are module methods and should be called on the Octopart module.

Examples:

Octopart::Client.new('apikey')

Defined Under Namespace

Classes: Client

Class Method Summary collapse

Class Method Details

.api_keyObject

api_key - The API key to use

Raises:



12
13
14
15
# File 'lib/octopart-ruby.rb', line 12

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



18
19
20
# File 'lib/octopart-ruby.rb', line 18

def self.api_key=(api_key)
  @api_key = api_key
end