Class: ExpoNotifier::Request::SendPushNotifications

Inherits:
Base
  • Object
show all
Defined in:
lib/expo_notifier/request/send_push_notifications.rb

Constant Summary collapse

RequestBody =
type_member(:out) { { fixed: Mapper::PushMessages } }
ResponseBody =
type_member(:out) { { fixed: Mapper::PushTickets } }

Constants inherited from Base

Base::BASE_HEADERS, Base::BASE_URL, Base::GZIP_MIN_SIZE, Base::Generic, Base::OPEN_TIMEOUT, Base::READ_TIMEOUT, Base::WRITE_TIMEOUT

Instance Attribute Summary

Attributes inherited from Base

#body, #response, #url

Instance Method Summary collapse

Methods inherited from Base

#body_to_send, #compress_body?, #execute, #headers, #initialize, #name

Constructor Details

This class inherits a constructor from ExpoNotifier::Request::Base

Instance Method Details

#raw_bodyObject

String in the JSON format We override the raw body to send an array as a main object. : -> String



20
21
22
# File 'lib/expo_notifier/request/send_push_notifications.rb', line 20

def raw_body
  @raw_body ||= ExpoNotifier::Mapper::PushMessage.to_json(body.push_message) #: String?
end