<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -14,7 +14,7 @@ This gem handles some of the complexity in dealing with the netflix api (and OAu
 
 ## License
 
-Copyright (c) 2008 &lt;copyright holders&gt;
+Copyright (c) 2008 Rob Ares
 
 Permission is hereby granted, free of charge, to any person
 obtaining a copy of this software and associated documentation</diff>
      <filename>README.markdown</filename>
    </modified>
    <modified>
      <diff>@@ -13,15 +13,18 @@ module Netflix
     
   # Client class responsible for setting up api calls.
   class Client
-    attr_accessor :consumer_key, :consumer_secret, :application_name
+    attr_accessor :consumer_key, :consumer_secret, :application_name, :api_version
     
     def initialize(consumer_key, consumer_secret, application_name)
       raise ArgumentError if consumer_key.nil? or consumer_secret.nil? or application_name.nil?
       @consumer_key = consumer_key
       @consumer_secret = consumer_secret
       @application_name = application_name
-    end
-    
+      @api_version = &quot;1.0&quot;
+      
+      @access_token = nil
+      @access_token_secret = nil
+    end    
     
     # client.generate_request_token(&quot;http://cnn.com/&quot;) do |t, s, auth_url|
     #   # save to db here.
@@ -29,7 +32,7 @@ module Netflix
     # end
     def generate_request_token(callback_url, &amp;blk)
       raise ArgumentError.new(&quot;a block is required as the last arguement&quot;) unless block_given?
-      # asser that we can do this here...
+      # assert that we can do this here...
       
       # populate oauth token
       # return token, secret
@@ -67,7 +70,9 @@ module Netflix
       yield
     end
     
-    def go(method, path, arguments)
+    def go(method, path, expansions = [], arguments = {})
+      raise NetflixClientError.new(&quot;An access token is required to make api calls&quot;) if @access_token.nil? or @access_token_secret.nil?
+      
       # fail if no access creds.
       # populate access token with instance vars.
       # delegate to the client class</diff>
      <filename>lib/netflix/client.rb</filename>
    </modified>
    <modified>
      <diff>@@ -1,3 +1,56 @@
-$:.unshift(File.dirname(__FILE__) + &quot;/spec_helper&quot;)
-
+require File.dirname(__FILE__) + &quot;/spec_helper&quot;
+require &quot;client&quot;
 
+describe Netflix::Client, &quot;When initially created&quot; do
+  
+  before do               
+    
+  end
+  
+  before(:each) do
+  end
+  
+  it &quot;should define netflix OAuth endpoints&quot; do
+    Netflix::OAUTH_ENDPOINTS.class.should == Hash 
+    Netflix::OAUTH_ENDPOINTS.size.should == 3    
+  end
+  
+  it &quot;should be createable&quot; do
+    lambda {Netflix::Client.new(&quot;&quot;, &quot;&quot;, &quot;&quot;)}  .should_not == nil
+  end
+  
+  it &quot;should throw an ArgumentError if nil initializer args are passed&quot; do
+    lambda {Netflix::Client.new(nil, nil, nil)}.should raise_error(ArgumentError)
+  end
+  
+  it &quot;should respond to various accessors&quot; do
+    client = Netflix::Client.new(&quot;&quot;, &quot;&quot;, &quot;&quot;)
+    client.should respond_to(:consumer_key)
+    client.should respond_to(:consumer_secret) 
+    client.should respond_to(:application_name)
+    client.should respond_to(:api_version)           
+  end
+  
+  it &quot;should default the api version&quot; do
+    client = Netflix::Client.new(&quot;&quot;, &quot;&quot;, &quot;&quot;)
+    client.api_version.should == &quot;1.0&quot;  
+  end
+  
+  it &quot;should respond to a #generate_request_token instance method and yield 3 variables&quot; do
+    client = Netflix::Client.new(&quot;&quot;, &quot;&quot;, &quot;&quot;)
+    client.should respond_to(:generate_request_token)
+  end
+  it &quot;should respond to a #generate_access_token instance method and yield 3 variables&quot; do
+    client = Netflix::Client.new(&quot;&quot;, &quot;&quot;, &quot;&quot;)
+    client.should respond_to(:generate_access_token)  
+  end
+  
+  it &quot;should respond to a #from_access_token and yield nothing&quot; do
+    client = Netflix::Client.new(&quot;&quot;, &quot;&quot;, &quot;&quot;)
+    client.should respond_to(:from_access_token)
+  end
+  
+  it &quot;should raise NetflixClientError if no access token info is available when calling #go&quot; do
+    lambda {Netflix::Client.new(&quot;&quot;, &quot;&quot;, &quot;&quot;).go(:get, &quot;&quot;, [], {})}.should raise_error(Netflix::NetflixClientError)
+  end
+end</diff>
      <filename>spec/netflix_spec.rb</filename>
    </modified>
    <modified>
      <diff>@@ -1,2 +1,3 @@
+$:.unshift(File.dirname(__FILE__) + &quot;/../lib&quot;)
 $:.unshift(File.dirname(__FILE__) + &quot;/../lib/netflix&quot;)
-require &quot;spec&quot;
+require &quot;spec&quot;
\ No newline at end of file</diff>
      <filename>spec/spec_helper.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>b31a224fdea417b4ed1731e03b19d7cb74160f2b</id>
    </parent>
  </parents>
  <author>
    <name>Rob Ares</name>
    <email>rob.ares@gmail.com</email>
  </author>
  <url>http://github.com/rares/netflix/commit/1778f792fca2dc4d618d4b5bf58e4f6c4784e546</url>
  <id>1778f792fca2dc4d618d4b5bf58e4f6c4784e546</id>
  <committed-date>2008-11-13T22:14:32-08:00</committed-date>
  <authored-date>2008-11-13T22:14:32-08:00</authored-date>
  <message>initial specing</message>
  <tree>cf29a324fd4791da639101dcdf2c8219213fb518</tree>
  <committer>
    <name>Rob Ares</name>
    <email>rob.ares@gmail.com</email>
  </committer>
</commit>
