Module: Octopart

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

Overview

Public: 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:



9
10
11
12
# File 'lib/octopart-ruby.rb', line 9

def self.api_key
  raise APIKeyNotSet if @api_key.nil?
  @api_key
end

.api_key=(api_key) ⇒ Object

api_key - The API key to use



15
16
17
# File 'lib/octopart-ruby.rb', line 15

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