Standard Apex Response Methods

The Apex response classes include standard response methods for Slack's Web API methods. These response methods are indicated on the Apex response classes that support them.

getError() 

Gets the error on the response. See the corresponding Slack method's list of errors, for example, calls.add method’s list of errors.

Signature

public String getError()

Return Value

Type: String

getHttpResponseHeaders() 

Signature

public Map<String,List<String>> getHttpResponseHeaders()

Return Value

Type: Map<String,List>

getNeeded() 

Signature

public String getNeeded()

Return Value

Type: String

getProvided() 

Signature

public String getProvided()

Return Value

Type: String

getWarning() 

Gets the warning on the response. See the corresponding Slack method's list of errors, for example, calls.add method’s list of warnings.

Signature

public String getWarning()

Return Value

Type: String

isOk() 

Specifies whether the API call is successful.

Signature

public Boolean isOk()

Return Value

Type: Boolean

isSnoozeIsIndefinite() 

Signature

public Boolean isSnoozeIsIndefinite()

Return Value

Type: Boolean

setError(error) 

Sets the error message in the response.

Signature

public void setError(String error)

Parameters

error

Type: String

Return Value

Type: void

setHttpResponseHeaders(httpResponseHeaders) 

Signature

public void setHttpResponseHeaders(Map<String,List<String>> httpResponseHeaders)

Parameters

error

Type: Map<String,List>

Return Value

Type: void

setNeeded(needed) 

Signature

public void setNeeded(String needed)

Parameters

needed

Type: String

Return Value

Type: void

setOk(ok) 

Specifies whether the API call is successful.

Signature

public void setOk(Boolean ok)

Parameters

ok

Type: Boolean

Return Value

Type: void

setProvided(provided) 

Signature

public void setProvided(String provided)

Parameters

provided

Type: String

Return Value

Type: void

setSnoozeIsIndefinite(snoozeIsIndefinite) 

Signature

public void setSnoozeIsIndefinite(Boolean snoozeIsIndefinite)

Parameters

snoozeIsIndefinite

Type: Boolean

Return Value

Type: void

setWarning(warning) 

Sets the warning message in the response.

Signature

public void setWarning(String warning)

Parameters

warning

Type: String

Return Value

Type: void

Beta Feature

This feature is not generally available. It is not part of your purchased Services. This feature is subject to change, may be discontinued with no notice at any time in SFDC’s sole discretion, and SFDC may never make this feature generally available. Make your purchase decisions only on the basis of generally available products and features. This feature is made available on an AS IS basis and use of this feature is at your sole risk.