module WCC module Media class Client < ::WCC::API::RestClient class Response < AbstractResponse def skip body.dig('pagination', 'offset') end def count body.dig('pagination', 'total') end def collection_response? body.key?('pagination') end def page_items body['messages'] || body['series'] || body['speakers'] || body['tags'] end def next_page_query { offset: page_items.length + skip, } end end end end end