Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

list_canvas() currently does not support pagination #27

Open
andrewbatallones opened this issue Jun 15, 2023 · 0 comments
Open

list_canvas() currently does not support pagination #27

andrewbatallones opened this issue Jun 15, 2023 · 0 comments

Comments

@andrewbatallones
Copy link

Hey, I have been using this gem and with their docs and I need to be able to get canvas that are n pages deep. I see currently the gem does not support pagination and proposed this code change on https://github.com/jonallured/appboy/blob/master/lib/appboy/rest/list_canvas.rb

module Appboy
  module REST
    class ListCanvas < Base
      attr_reader :app_group_id, :sort_direction, :include_archived, :page

      def initialize(app_group_id, options = {})
        @app_group_id = app_group_id
        @sort_direction = options[:sort_direction]
        @include_archived = options[:include_archived]
        @page = options[:page]
      end

      def perform
        http.get '/canvas/list', {
          app_group_id: app_group_id,
          sort_direction: sort_direction,
          include_archived: include_archived,
          page: page
        }.compact
      end
    end
  end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant