# Class: MessagingQuery

## Constructor

#### new MessagingQuery()

  Describes the query that can be used to search for conversations on server. Used in Messaging.searchConversations method.

## Methods

#### getNumberResultsPerConversation() → {Number}

  Gets the number of message entries per conversation to return.

  ##### Returns:

  { Number }

#### getQuery() → {String}

  Gets expression to be searched. If query is specified, server will perform a search operation.
  If query is omitted, server will perform a getConversations operation.

  ##### Returns:

  { String }

#### getQueryAfter() → {Date}

  Gets the after timestamp - if set, filters messages based on last-modified-date.

  ##### Returns:

  { Date }

  timestamp

#### isSearchBody() → {Boolean}

  Determines whether query is set up to search in message body.

  ##### Returns:

  { Boolean }

#### isSearchParticipants() → {Boolean}

  Determines whether query is set up to search in participant name.

  ##### Returns:

  { Boolean }

#### isSearchSubject() → {Boolean}

  Determines whether query is set up to search in conversation subject.

  ##### Returns:

  { Boolean }

#### searchBody(val) → {void}

  Sets the messaging query to search in messages' bodies.

  ##### Parameters:

  Name | Type | Description
  --- | --- | ---
  `val` | Boolean | True, if search in message body, false otherwise.

  ##### Returns:

  { void }

#### searchParticipants(val) → {void}

  Sets the messaging query to search in participant name.

  ##### Parameters:

  Name | Type | Description
  --- | --- | ---
  `val` | Boolean | True, if search in participants name, false otherwise.

  ##### Returns:

  { void }

#### searchSubject(val) → {void}

  Sets the messaging query to search in conversation subject.

  ##### Parameters:

  Name | Type | Description
  --- | --- | ---
  `val` | Boolean | True, if search in conversation subject, false otherwise.

  ##### Returns:

  { void }

#### setNumberResultsPerConversation(resultsPerConversation)

  Sets the number of message entries per conversation to return.

  ##### Parameters:

  Name | Type | Description
  --- | --- | ---
  `resultsPerConversation` | Number |

#### setQuery(query)

  Sets the expression to be searched.

  ##### Parameters:

  Name | Type | Description
  --- | --- | ---
  `query` | String |

#### setQueryAfter(after)

  Filter messages based on last-modified-date.

  ##### Parameters:

  Name | Type | Description
  --- | --- | ---
  `after` | Date | Only conversations after this date will be considered.