Sha256: 37ab324e40548132fbea3bd5305cfe91cd269932ade6c28bcf3c726a4e4c2aa4

Contents?: true

Size: 439 Bytes

Versions: 10

Compression:

Stored size: 439 Bytes

Contents

module YouGotListed
  class Agent < Resource
    
    def find_all
      process_get("/agents/search.php")
    end
    
    def find_by_id(agent_id)
      get_agent(agent_id)
    end
    
    def find(agent_id)
      get_agent(agent_id, true)
    end
    
    private
    
    def get_agent(agent_id, raise_error = false)
      params = {:id => agent_id}
      process_get("/agents/search.php", params, raise_error)
    end
    
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
you_got_listed-0.3.3 lib/you_got_listed/agent.rb
you_got_listed-0.3.2 lib/you_got_listed/agent.rb
you_got_listed-0.3.1 lib/you_got_listed/agent.rb
you_got_listed-0.3.0 lib/you_got_listed/agent.rb
you_got_listed-0.2.5 lib/you_got_listed/agent.rb
you_got_listed-0.2.4 lib/you_got_listed/agent.rb
you_got_listed-0.2.3 lib/you_got_listed/agent.rb
you_got_listed-0.2.2 lib/you_got_listed/agent.rb
you_got_listed-0.2.1 lib/you_got_listed/agent.rb
you_got_listed-0.2.0 lib/you_got_listed/agent.rb