Skip to content

Latest commit

 

History

History
173 lines (65 loc) · 2.75 KB

LaravelFCM-Response-TopicResponse.md

File metadata and controls

173 lines (65 loc) · 2.75 KB

LaravelFCM\Response\TopicResponse

Class TopicResponse

Constants

LIMIT_RATE_TOPICS_EXCEEDED

const LIMIT_RATE_TOPICS_EXCEEDED = "TopicsMessageRateExceeded"

SUCCESS

const SUCCESS = 'success'

FAILURE

const FAILURE = 'failure'

ERROR

const ERROR = "error"

MESSAGE_ID

const MESSAGE_ID = "message_id"

Methods

__construct

mixed LaravelFCM\Response\BaseResponse::__construct(\GuzzleHttp\Psr7\Response $response)

BaseResponse constructor.

Arguments

  • $response GuzzleHttp\Psr7\Response

parseResponse

mixed LaravelFCM\Response\BaseResponse::parseResponse(array $responseInJson)

parse the response

Arguments

  • $responseInJson array

logResponse

mixed LaravelFCM\Response\BaseResponse::logResponse()

Log the response

isSuccess

boolean LaravelFCM\Response\TopicResponseContract::isSuccess()

true if topic sent with success

error

string LaravelFCM\Response\TopicResponseContract::error()

return error message you should test if it's necessary to resent it

shouldRetry

boolean LaravelFCM\Response\TopicResponseContract::shouldRetry()

return true if it's necessary resent it using exponential backoff

isJsonResponse

mixed LaravelFCM\Response\BaseResponse::isJsonResponse(\GuzzleHttp\Psr7\Response $response)

Check if the response given by fcm is parsable

Arguments

  • $response GuzzleHttp\Psr7\Response