lib/taleo/client.rb in taleo-0.1.1 vs lib/taleo/client.rb in taleo-0.2.0

- old
+ new

@@ -7,11 +7,11 @@ require 'taleo/employee' module Taleo # Base object for executing queries and wrapping HTTP requests. class Client - attr_reader :org_code, :username, :password, :service_url + attr_reader :org_code, :username, :password, :service_url, :auth_token def initialize(org_code, username, password, service_url) @org_code = org_code @username = username @password = password @@ -32,12 +32,12 @@ def activity(id) Activity.new(show('activity', id), self) end - def employees - cursor('employee', Employee) + def employees(start = 1, limit = 10) + cursor('employee', Employee, start, limit) end def cursor(resource, klass, start = 1, limit = 10) res = connection.get do |req| req.url "object/#{resource}/search" @@ -117,14 +117,8 @@ end res = conn.get data = JSON.parse(res.body) @api_url = data.dig('response', 'URL') @api_url - end - - private - - def auth_token - @auth_token end end end