Sha256: 0b78027645ad6ca07d1b31e76c63487210efddb4f2bea0df937acf0e67dd10fa

Contents?: true

Size: 476 Bytes

Versions: 5

Compression:

Stored size: 476 Bytes

Contents

class FutureWebItem < Ks.strict(:url, :title, :local_identifier)
  def initialize(**kwargs)
    super(local_identifier: SecureRandom.uuid, **kwargs)
  end

  def to_item_request_params
    # Ideally the content identifier should stay the same throughout multiple
    # calls if the file contents doesn't change.
    {
      content_identifier: 'web_content',
      local_identifier: local_identifier,
      url: url,
      meta: {
        title: title
      }
    }
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
wetransfer-0.4.4 lib/we_transfer_client/future_web_item.rb
wetransfer-0.4.3 lib/we_transfer_client/future_web_item.rb
wetransfer-0.4.2 lib/we_transfer_client/future_web_item.rb
wetransfer-0.4.1 lib/we_transfer_client/future_web_item.rb
wetransfer-0.4.0 lib/we_transfer_client/future_web_item.rb