Sha256: 6affdad5eac8beadfee4ae6182626bd10af14bb9a3e130b40c587ab1c71d9ee1

Contents?: true

Size: 415 Bytes

Versions: 16

Compression:

Stored size: 415 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

16 entries across 16 versions & 1 rubygems

Version Path
you_got_listed-0.7.2 lib/you_got_listed/agent.rb
you_got_listed-0.7.1 lib/you_got_listed/agent.rb
you_got_listed-0.7.0 lib/you_got_listed/agent.rb
you_got_listed-0.6.6 lib/you_got_listed/agent.rb
you_got_listed-0.6.5 lib/you_got_listed/agent.rb
you_got_listed-0.6.4 lib/you_got_listed/agent.rb
you_got_listed-0.6.3 lib/you_got_listed/agent.rb
you_got_listed-0.6.2 lib/you_got_listed/agent.rb
you_got_listed-0.6.1 lib/you_got_listed/agent.rb
you_got_listed-0.6.0 lib/you_got_listed/agent.rb
you_got_listed-0.5.1 lib/you_got_listed/agent.rb
you_got_listed-0.5.0 lib/you_got_listed/agent.rb
you_got_listed-0.4.0 lib/you_got_listed/agent.rb
you_got_listed-0.3.6 lib/you_got_listed/agent.rb
you_got_listed-0.3.5 lib/you_got_listed/agent.rb
you_got_listed-0.3.4 lib/you_got_listed/agent.rb