struct Gemini::Blob

Overview

Raw media bytes. Text should not be sent as raw bytes, use the Text type.

API Reference

Included Modules

Defined in:

gemini/types.cr

Constructors

Instance Method Summary

Constructor Detail

def self.new(mime_type : String, data : String) #

def self.new(pull : JSON::PullParser) #

Instance Method Detail

def data : String #

Raw bytes for media formats. A base64-encoded string.


def inspect(io : IO) #
Description copied from struct Struct

Appends this struct's name and instance variables names and values to the given IO.

struct Point
  def initialize(@x : Int32, @y : Int32)
  end
end

p1 = Point.new 1, 2
p1.to_s    # "Point(@x=1, @y=2)"
p1.inspect # "Point(@x=1, @y=2)"

def mime_type : String #

The IANA standard MIME type of the source data. Examples: "image/png" If an unsupported MIME type is provided, an error will be returned. For a complete list of supported types, see Supported file formats.


def to_json_object_key #