Skip to content

list_canvas() currently does not support pagination #27

@andrewbatallones

Description

@andrewbatallones

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions