Sha256: ee78c62b3c6abe4c5820f07a49050fd045fe3c8e3736019176dd32834112021c

Contents?: true

Size: 1.19 KB

Versions: 2

Compression:

Stored size: 1.19 KB

Contents

# frozen_string_literal: true

module EveOnline
  module ESI
    module Models
      class EventDetails < Base
        def as_json
          {
            date: date,
            duration: duration,
            event_id: event_id,
            importance: importance,
            owner_id: owner_id,
            owner_name: owner_name,
            owner_type: owner_type,
            event_response: event_response,
            text: text,
            title: title,
          }
        end

        def date
          date = options["date"]

          parse_datetime_with_timezone(date) if date
        end

        def duration
          options["duration"]
        end

        def event_id
          options["event_id"]
        end

        def importance
          options["importance"]
        end

        def owner_id
          options["owner_id"]
        end

        def owner_name
          options["owner_name"]
        end

        def owner_type
          options["owner_type"]
        end

        def event_response
          options["response"]
        end

        def text
          options["text"]
        end

        def title
          options["title"]
        end
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
eve_online-0.31.0 lib/eve_online/esi/models/event_details.rb
eve_online-0.30.0 lib/eve_online/esi/models/event_details.rb