Sha256: 53f17d82ea8227d4be7fe8f206423c6dc2e093a8547387b9e3015acf9b759b3f

Contents?: true

Size: 541 Bytes

Versions: 8

Compression:

Stored size: 541 Bytes

Contents

# frozen_string_literal: true

require "net/http"
require "json"

module DevOrbit
  class Orbit
    def self.call(type:, data:, workspace_id:, api_key:)
      if type == "comments"
        data[:comments].each do |comment|
          DevOrbit::Interactions::Comment.new(
            article_title: data.transform_keys(&:to_sym)[:title],
            comment: comment.transform_keys(&:to_sym),
            url: data[:url],
            workspace_id: workspace_id,
            api_key: api_key
          )
        end
      end
    end
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
dev_orbit-0.0.8 lib/dev_orbit/orbit.rb
dev_orbit-0.0.7 lib/dev_orbit/orbit.rb
dev_orbit-0.0.6 lib/dev_orbit/orbit.rb
dev_orbit-0.0.5 lib/dev_orbit/orbit.rb
dev_orbit-0.0.4 lib/dev_orbit/orbit.rb
dev_orbit-0.0.3 lib/dev_orbit/orbit.rb
dev_orbit-0.0.2 lib/dev_orbit/orbit.rb
dev_orbit-0.0.1 lib/dev_orbit/orbit.rb