Sha256: 8c7383e220c5c37326431f61773352b91e005f9744e639191472dd9dfed5bd89

Contents?: true

Size: 709 Bytes

Versions: 2

Compression:

Stored size: 709 Bytes

Contents

# frozen_string_literal: true

module Roko
  module Source
    module Confluence
      # access Confluence events
      #
      # @!attribute [Faraday::Connection] client
      class Events
        # @param client [Faraday::Connection]
        def initialize(client)
          @client = client
        end

        def fetch
          response = @client.get(
            ENV['CONFLUENCE_URL'] + '/rest/api/content/search', {
              expand: 'container,metadata.currentuser.lastmodified',
              cql: 'type in (page,blogpost) and id in recentlyModifiedPagesAndBlogPostsByUser(currentUser(), 0, 20)'
            }
          )
          response.body.results
        end
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
roko-0.2.1 lib/roko/source/confluence/events.rb
roko-0.2.0 lib/roko/source/confluence/events.rb