class ApiFeedsController < ApiController

  respond_to :json

  def index
    data = Feed.index(current_user,
                       next_page: params[:next_page],
                       limit: params[:limit],
                       sort: params[:sort],
                       time_range: params[:time_range],
                       type: params[:type],
                       user: params[:user],
                       band: params[:band],
                       hash: true)


    @feeds = data[:query]
    @next = data[:next_page]
    render "api_feeds/index", :layout => nil
  end
end