class Reposync::GetSyncReposService < Reposync::ClientService
  attr_accessor :page, :limit, :create_sort

  def initialize(page=1, limit=10, create_sort=false)
    @page = page 
    @limit = limit 
    @create_sort = create_sort
  end

  def call 
    result = get(url, request_params)
    response = render_response(result)
  end

  private 
  def request_params 
    {
      page: page,
      limit: limit,
      create_sort: create_sort
    }.stringify_keys
  end

  def url 
    "/cerobot/sync/repo".freeze
  end

end