<!DOCTYPE html>
<html lang="en">
  <head>
    <title>ChainableQuery Protocol Reference</title>
    <link rel="stylesheet" type="text/css" href="../css/jazzy.css" />
    <link rel="stylesheet" type="text/css" href="../css/highlight.css" />
    <meta charset='utf-8'>
    <script src="../js/jquery.min.js" defer></script>
    <script src="../js/jazzy.js" defer></script>
    
  </head>
  <body>
    <a name="//apple_ref/swift/Protocol/ChainableQuery" class="dashAnchor"></a>
    <a title="ChainableQuery Protocol Reference"></a>
    <header>
      <div class="content-wrapper">
        <p><a href="../index.html">Contentful Docs</a> (72% documented)</p>
        <p class="header-right"><a href="https://github.com/contentful/contentful.swift"><img src="../img/gh.png"/>View on GitHub</a></p>
      </div>
    </header>
    <div class="content-wrapper">
      <p id="breadcrumbs">
        <a href="../index.html">Contentful Reference</a>
        <img id="carat" src="../img/carat.png" />
        ChainableQuery Protocol Reference
      </p>
    </div>
    <div class="content-wrapper">
      <nav class="sidebar">
        <ul class="nav-groups">
          <li class="nav-group-name">
            <a href="../Classes.html">Classes</a>
            <ul class="nav-group-tasks">
              <li class="nav-group-task">
                <a href="../Classes/Asset.html">Asset</a>
              </li>
              <li class="nav-group-task">
                <a href="../Classes/Asset/FileMetadata.html">– FileMetadata</a>
              </li>
              <li class="nav-group-task">
                <a href="../Classes/AssetQuery.html">AssetQuery</a>
              </li>
              <li class="nav-group-task">
                <a href="../Classes/Client.html">Client</a>
              </li>
              <li class="nav-group-task">
                <a href="../Classes.html#/s:C10Contentful12ContentModel">ContentModel</a>
              </li>
              <li class="nav-group-task">
                <a href="../Classes/ContentType.html">ContentType</a>
              </li>
              <li class="nav-group-task">
                <a href="../Classes/ContentfulError.html">ContentfulError</a>
              </li>
              <li class="nav-group-task">
                <a href="../Classes.html#/s:C10Contentful5Entry">Entry</a>
              </li>
              <li class="nav-group-task">
                <a href="../Classes/FilterQuery.html">FilterQuery</a>
              </li>
              <li class="nav-group-task">
                <a href="../Classes/Locale.html">Locale</a>
              </li>
              <li class="nav-group-task">
                <a href="../Classes/LocalizableResource.html">LocalizableResource</a>
              </li>
              <li class="nav-group-task">
                <a href="../Classes.html#/s:C10Contentful19LocalizationContext">LocalizationContext</a>
              </li>
              <li class="nav-group-task">
                <a href="../Classes/Query.html">Query</a>
              </li>
              <li class="nav-group-task">
                <a href="../Classes/QueryOn.html">QueryOn</a>
              </li>
              <li class="nav-group-task">
                <a href="../Classes/RateLimitError.html">RateLimitError</a>
              </li>
              <li class="nav-group-task">
                <a href="../Classes/Resource.html">Resource</a>
              </li>
              <li class="nav-group-task">
                <a href="../Classes/Space.html">Space</a>
              </li>
              <li class="nav-group-task">
                <a href="../Classes/SyncSpace.html">SyncSpace</a>
              </li>
              <li class="nav-group-task">
                <a href="../Classes/SysISO8601DateTransform.html">SysISO8601DateTransform</a>
              </li>
            </ul>
          </li>
          <li class="nav-group-name">
            <a href="../Enums.html">Enums</a>
            <ul class="nav-group-tasks">
              <li class="nav-group-task">
                <a href="../Enums/Bounds.html">Bounds</a>
              </li>
              <li class="nav-group-task">
                <a href="../Enums/FieldType.html">FieldType</a>
              </li>
              <li class="nav-group-task">
                <a href="../Enums/Fit.html">Fit</a>
              </li>
              <li class="nav-group-task">
                <a href="../Enums/Focus.html">Focus</a>
              </li>
              <li class="nav-group-task">
                <a href="../Enums/Format.html">Format</a>
              </li>
              <li class="nav-group-task">
                <a href="../Enums/ImageOption.html">ImageOption</a>
              </li>
              <li class="nav-group-task">
                <a href="../Enums/JPGQuality.html">JPGQuality</a>
              </li>
              <li class="nav-group-task">
                <a href="../Enums/Link.html">Link</a>
              </li>
              <li class="nav-group-task">
                <a href="../Enums/MimetypeGroup.html">MimetypeGroup</a>
              </li>
              <li class="nav-group-task">
                <a href="../Enums/QueryError.html">QueryError</a>
              </li>
              <li class="nav-group-task">
                <a href="../Enums/QueryOperation.html">QueryOperation</a>
              </li>
              <li class="nav-group-task">
                <a href="../Enums/SDKError.html">SDKError</a>
              </li>
            </ul>
          </li>
          <li class="nav-group-name">
            <a href="../Extensions.html">Extensions</a>
            <ul class="nav-group-tasks">
              <li class="nav-group-task">
                <a href="../Extensions/Date.html">Date</a>
              </li>
              <li class="nav-group-task">
                <a href="../Extensions/Date/Formatter.html">– Formatter</a>
              </li>
              <li class="nav-group-task">
                <a href="../Extensions/Dictionary.html">Dictionary</a>
              </li>
              <li class="nav-group-task">
                <a href="../Extensions/Int.html">Int</a>
              </li>
              <li class="nav-group-task">
                <a href="../Extensions/String.html">String</a>
              </li>
            </ul>
          </li>
          <li class="nav-group-name">
            <a href="../Functions.html">Functions</a>
            <ul class="nav-group-tasks">
              <li class="nav-group-task">
                <a href="../Functions.html#/s:F10Contentfuloi2eeFTCS_8ResourceS0__Sb">==(_:_:)</a>
              </li>
              <li class="nav-group-task">
                <a href="../Functions.html#/s:F10Contentfuloi2eeFTOS_11ImageOptionS0__Sb">==(_:_:)</a>
              </li>
            </ul>
          </li>
          <li class="nav-group-name">
            <a href="../Protocols.html">Protocols</a>
            <ul class="nav-group-tasks">
              <li class="nav-group-task">
                <a href="../Protocols/AbstractQuery.html">AbstractQuery</a>
              </li>
              <li class="nav-group-task">
                <a href="../Protocols/ChainableQuery.html">ChainableQuery</a>
              </li>
              <li class="nav-group-task">
                <a href="../Protocols/ContentModellable.html">ContentModellable</a>
              </li>
              <li class="nav-group-task">
                <a href="../Protocols/EntryModellable.html">EntryModellable</a>
              </li>
              <li class="nav-group-task">
                <a href="../Protocols/Integration.html">Integration</a>
              </li>
              <li class="nav-group-task">
                <a href="../Protocols/PersistenceIntegration.html">PersistenceIntegration</a>
              </li>
              <li class="nav-group-task">
                <a href="../Protocols/QueryableRange.html">QueryableRange</a>
              </li>
              <li class="nav-group-task">
                <a href="../Protocols/SpaceModellable.html">SpaceModellable</a>
              </li>
            </ul>
          </li>
          <li class="nav-group-name">
            <a href="../Structs.html">Structs</a>
            <ul class="nav-group-tasks">
              <li class="nav-group-task">
                <a href="../Structs/ArrayResponse.html">ArrayResponse</a>
              </li>
              <li class="nav-group-task">
                <a href="../Structs/ClientConfiguration.html">ClientConfiguration</a>
              </li>
              <li class="nav-group-task">
                <a href="../Structs/Field.html">Field</a>
              </li>
              <li class="nav-group-task">
                <a href="../Structs/LinkSys.html">LinkSys</a>
              </li>
              <li class="nav-group-task">
                <a href="../Structs/MappedArrayResponse.html">MappedArrayResponse</a>
              </li>
              <li class="nav-group-task">
                <a href="../Structs/MappedContent.html">MappedContent</a>
              </li>
              <li class="nav-group-task">
                <a href="../Structs/OrderParameter.html">OrderParameter</a>
              </li>
              <li class="nav-group-task">
                <a href="../Structs.html#/s:V10Contentful14QueryParameter">QueryParameter</a>
              </li>
              <li class="nav-group-task">
                <a href="../Structs/Sys.html">Sys</a>
              </li>
            </ul>
          </li>
          <li class="nav-group-name">
            <a href="../Typealiases.html">Typealiases</a>
            <ul class="nav-group-tasks">
              <li class="nav-group-task">
                <a href="../Typealiases.html#/s:10Contentful14ResultsHandler">ResultsHandler</a>
              </li>
              <li class="nav-group-task">
                <a href="../Typealiases.html#/s:10Contentful14TaskObservable">TaskObservable</a>
              </li>
            </ul>
          </li>
        </ul>
      </nav>
      <article class="main-content">
        <section>
          <section class="section">
            <h1>ChainableQuery</h1>
              <div class="declaration">
                <div class="language">
                  <pre class="highlight"><code><span class="kd">public</span> <span class="kd">protocol</span> <span class="kt">ChainableQuery</span><span class="p">:</span> <span class="kt"><a href="../Protocols/AbstractQuery.html">AbstractQuery</a></span></code></pre>

                </div>
              </div>
            <p>Protocol which enables concrete query implementations to be &lsquo;chained&rsquo; together so that results
can be filtered by more than one QueryOperation or other query. Protocol extensions give default implementation
so that all concrete types, <code><a href="../Classes/Query.html">Query</a></code>, <code><a href="../Classes/AssetQuery.html">AssetQuery</a></code>, <code><a href="../Classes/FilterQuery.html">FilterQuery</a></code>, and <code><a href="../Classes/QueryOn.html">QueryOn&lt;EntryType&gt;</a></code>, can use the same implementation.</p>

          </section>
          <section class="section task-group-section">
            <div class="task-group">
              <ul>
                <li class="item">
                  <div>
                    <code>
                    <a name="/s:FE10ContentfulPS_14ChainableQuerycFzT20selectingFieldsNamedGSaSS_3forGSqSS__x"></a>
                    <a name="//apple_ref/swift/Method/init(selectingFieldsNamed:for:)" class="dashAnchor"></a>
                    <a class="token" href="#/s:FE10ContentfulPS_14ChainableQuerycFzT20selectingFieldsNamedGSaSS_3forGSqSS__x">init(selectingFieldsNamed:for:)</a>
                    </code>
                      <span class="declaration-note">
                        Extension method
                      </span>
                  </div>
                  <div class="height-container">
                    <div class="pointer-container"></div>
                    <section class="section">
                      <div class="pointer"></div>
                      <div class="abstract">
                        <p>Convenience initializer for a select operation query in which only the fields specified 
in the fieldNames property will be returned in the JSON response.
The <code>&quot;sys&quot;</code> dictionary is always requested by the SDK. 
Note that if you are using the select operator with an instance <code><a href="../Classes/QueryOn.html">QueryOn&lt;EntryType&gt;</a></code>
that you must make properties that you are ommitting in the response (by not including them in your selections array) optional properties.
Example usage:</p>
<pre class="highlight plaintext"><code>let query = try! QueryOn&lt;Cat&gt;(selectingFieldsNamed: ["fields.bestFriend", "fields.color", "fields.name"])
client.fetchMappedEntries(with: query).observable.then { catsResponse in
   let cats = catsResponse.items
   // Do stuff with cats.
}
</code></pre>

<p>See: <a href="https://www.contentful.com/developers/docs/references/content-delivery-api/#/reference/search-parameters/select-operator">https://www.contentful.com/developers/docs/references/content-delivery-api/#/reference/search-parameters/select-operator</a></p>
<div class="aside aside-throws">
    <p class="aside-title">Throws</p>
    Will throw an error if property names are not prefixed with <code>&quot;fields.&quot;</code>, if selections go more than 2 levels deep
      (<q>fields.bestFriend.sys</q> is not valid), or if more than 99 properties are selected.

</div>

                      </div>
                      <div class="declaration">
                        <h4>Declaration</h4>
                        <div class="language">
                          <p class="aside-title">Swift</p>
                          <pre class="highlight"><code><span class="kd">public</span> <span class="nf">init</span><span class="p">(</span><span class="n">selectingFieldsNamed</span> <span class="nv">fieldNames</span><span class="p">:</span> <span class="p">[</span><span class="kt">String</span><span class="p">],</span> <span class="k">for</span> <span class="nv">locale</span><span class="p">:</span> <span class="kt">String</span><span class="p">?</span> <span class="o">=</span> <span class="kc">nil</span><span class="p">)</span> <span class="k">throws</span></code></pre>

                        </div>
                      </div>
                      <div>
                        <h4>Parameters</h4>
                        <table class="graybox">
                          <tbody>
                            <tr>
                              <td>
                                <code>
                                <em>fieldNames</em>
                                </code>
                              </td>
                              <td>
                                <div>
                                  <p>An array of field names to include in the JSON response.</p>
                                </div>
                              </td>
                            </tr>
                            <tr>
                              <td>
                                <code>
                                <em>locale</em>
                                </code>
                              </td>
                              <td>
                                <div>
                                  <p>An optional locale argument to return localized results. If unspecified, the locale originally
set on the <code>Client</code> instance is used.</p>
                                </div>
                              </td>
                            </tr>
                          </tbody>
                        </table>
                      </div>
                      <div class="slightly-smaller">
                        <a href="https://github.com/contentful/contentful.swift/tree//Sources/Query.swift#L275-L278">Show on GitHub</a>
                      </div>
                    </section>
                  </div>
                </li>
                <li class="item">
                  <div>
                    <code>
                    <a name="/s:FE10ContentfulPS_14ChainableQuerycFzt12orderedUsingGSaVS_14OrderParameter__x"></a>
                    <a name="//apple_ref/swift/Method/init(orderedUsing:)" class="dashAnchor"></a>
                    <a class="token" href="#/s:FE10ContentfulPS_14ChainableQuerycFzt12orderedUsingGSaVS_14OrderParameter__x">init(orderedUsing:)</a>
                    </code>
                      <span class="declaration-note">
                        Extension method
                      </span>
                  </div>
                  <div class="height-container">
                    <div class="pointer-container"></div>
                    <section class="section">
                      <div class="pointer"></div>
                      <div class="abstract">
                        <p>Convenience initializer for a ordering responses by the values at the specified field. Field types that can be
specified are Strings, Numbers, or Booleans.</p>

<p>Example usage:</p>
<pre class="highlight plaintext"><code>let query = try! Query(orderedUsing: OrderParameter("sys.createdAt"))

client.fetchEntries(with: query).observable.then { entriesResponse in
   let entries = entriesResponse.items
   // Do stuff with entries.
}
</code></pre>

<p>See: <a href="https://www.contentful.com/developers/docs/references/content-delivery-api/#/reference/search-parameters/order">https://www.contentful.com/developers/docs/references/content-delivery-api/#/reference/search-parameters/order</a>
and: <a href="https://www.contentful.com/developers/docs/references/content-delivery-api/#/reference/search-parameters/order-with-multiple-parameters">https://www.contentful.com/developers/docs/references/content-delivery-api/#/reference/search-parameters/order-with-multiple-parameters</a></p>
<div class="aside aside-throws">
    <p class="aside-title">Throws</p>
    Will throw an error if property names are not prefixed with either <code>&quot;sys.&quot;</code> or <code>&quot;fields.&quot;</code>.

</div>

                      </div>
                      <div class="declaration">
                        <h4>Declaration</h4>
                        <div class="language">
                          <p class="aside-title">Swift</p>
                          <pre class="highlight"><code><span class="kd">public</span> <span class="nf">init</span><span class="p">(</span><span class="n">orderedUsing</span> <span class="nv">orderParameters</span><span class="p">:</span> <span class="kt"><a href="../Structs/OrderParameter.html">OrderParameter</a></span><span class="o">...</span><span class="p">)</span> <span class="k">throws</span></code></pre>

                        </div>
                      </div>
                      <div>
                        <h4>Parameters</h4>
                        <table class="graybox">
                          <tbody>
                            <tr>
                              <td>
                                <code>
                                <em>propertyName</em>
                                </code>
                              </td>
                              <td>
                                <div>
                                  <p>One or more properties on the Resource by which the results will be ordered.</p>
                                </div>
                              </td>
                            </tr>
                            <tr>
                              <td>
                                <code>
                                <em>reverse</em>
                                </code>
                              </td>
                              <td>
                                <div>
                                  <p>An Bool specifying if the returned order should be reversed or not. Defaults to <code>false</code>.</p>
                                </div>
                              </td>
                            </tr>
                          </tbody>
                        </table>
                      </div>
                      <div class="slightly-smaller">
                        <a href="https://github.com/contentful/contentful.swift/tree//Sources/Query.swift#L301-L304">Show on GitHub</a>
                      </div>
                    </section>
                  </div>
                </li>
                <li class="item">
                  <div>
                    <code>
                    <a name="/s:FE10ContentfulPS_14ChainableQuerycFzT17limitingResultsToSu_x"></a>
                    <a name="//apple_ref/swift/Method/init(limitingResultsTo:)" class="dashAnchor"></a>
                    <a class="token" href="#/s:FE10ContentfulPS_14ChainableQuerycFzT17limitingResultsToSu_x">init(limitingResultsTo:)</a>
                    </code>
                      <span class="declaration-note">
                        Extension method
                      </span>
                  </div>
                  <div class="height-container">
                    <div class="pointer-container"></div>
                    <section class="section">
                      <div class="pointer"></div>
                      <div class="abstract">
                        <p>Convenience initializer for a limiting responses to a certain number of values. Use in conjunction with the <code>skip</code> method
to paginate responses.</p>

<p>Example usage:</p>
<pre class="highlight plaintext"><code>let query = try! Query(orderedBy: "sys.createdAt")

client.fetchEntries(with: query).observable.then { entriesResponse in
   let entries = entriesResponse.items
   // Do stuff with entries.
}
</code></pre>

                      </div>
                      <div class="declaration">
                        <h4>Declaration</h4>
                        <div class="language">
                          <p class="aside-title">Swift</p>
                          <pre class="highlight"><code><span class="kd">public</span> <span class="nf">init</span><span class="p">(</span><span class="n">limitingResultsTo</span> <span class="nv">numberOfResults</span><span class="p">:</span> <span class="kt">UInt</span><span class="p">)</span> <span class="k">throws</span></code></pre>

                        </div>
                      </div>
                      <div>
                        <h4>Parameters</h4>
                        <table class="graybox">
                          <tbody>
                            <tr>
                              <td>
                                <code>
                                <em>numberOfResults</em>
                                </code>
                              </td>
                              <td>
                                <div>
                                  <p>The number of results the response will be limited to.</p>
                                </div>
                              </td>
                            </tr>
                          </tbody>
                        </table>
                      </div>
                      <div class="slightly-smaller">
                        <a href="https://github.com/contentful/contentful.swift/tree//Sources/Query.swift#L323-L328">Show on GitHub</a>
                      </div>
                    </section>
                  </div>
                </li>
                <li class="item">
                  <div>
                    <code>
                    <a name="/s:FE10ContentfulPS_14ChainableQuerycFT16skippingTheFirstSu_x"></a>
                    <a name="//apple_ref/swift/Method/init(skippingTheFirst:)" class="dashAnchor"></a>
                    <a class="token" href="#/s:FE10ContentfulPS_14ChainableQuerycFT16skippingTheFirstSu_x">init(skippingTheFirst:)</a>
                    </code>
                      <span class="declaration-note">
                        Extension method
                      </span>
                  </div>
                  <div class="height-container">
                    <div class="pointer-container"></div>
                    <section class="section">
                      <div class="pointer"></div>
                      <div class="abstract">
                        <p>Convenience initializer for a skipping the first <code>n</code> items in a response.
Use in conjunction with the <code>limit</code> method to paginate responses.</p>

<p>Example usage:</p>
<pre class="highlight plaintext"><code>let query = try! Query(skippingTheFirst: 9)

client.fetchEntries(with: query).observable.then { entriesResponse in
   let entries = entriesResponse.items
   // Do stuff with entries.
}
</code></pre>

                      </div>
                      <div class="declaration">
                        <h4>Declaration</h4>
                        <div class="language">
                          <p class="aside-title">Swift</p>
                          <pre class="highlight"><code><span class="kd">public</span> <span class="nf">init</span><span class="p">(</span><span class="n">skippingTheFirst</span> <span class="nv">numberOfResults</span><span class="p">:</span> <span class="kt">UInt</span><span class="p">)</span></code></pre>

                        </div>
                      </div>
                      <div>
                        <h4>Parameters</h4>
                        <table class="graybox">
                          <tbody>
                            <tr>
                              <td>
                                <code>
                                <em>numberOfResults</em>
                                </code>
                              </td>
                              <td>
                                <div>
                                  <p>The number of results that will be skipped in the query.</p>
                                </div>
                              </td>
                            </tr>
                          </tbody>
                        </table>
                      </div>
                      <div class="slightly-smaller">
                        <a href="https://github.com/contentful/contentful.swift/tree//Sources/Query.swift#L347-L350">Show on GitHub</a>
                      </div>
                    </section>
                  </div>
                </li>
                <li class="item">
                  <div>
                    <code>
                    <a name="/s:FE10ContentfulPS_14ChainableQuery6selectFzT11fieldsNamedGSaSS_6localeGSqSS__T_"></a>
                    <a name="//apple_ref/swift/Method/select(fieldsNamed:locale:)" class="dashAnchor"></a>
                    <a class="token" href="#/s:FE10ContentfulPS_14ChainableQuery6selectFzT11fieldsNamedGSaSS_6localeGSqSS__T_">select(fieldsNamed:locale:)</a>
                    </code>
                      <span class="declaration-note">
                        Extension method
                      </span>
                  </div>
                  <div class="height-container">
                    <div class="pointer-container"></div>
                    <section class="section">
                      <div class="pointer"></div>
                      <div class="abstract">
                        <p>Instance method for select operation in which only the fields specified in the fieldNames property will be returned in the JSON response.
The <code>&quot;sys&quot;</code> dictionary is always requested by the SDK.
Note that if you are using the select operator with an instance <code><a href="../Classes/QueryOn.html">QueryOn&lt;EntryType&gt;</a></code>
that you must make properties that you are ommitting in the response (by not including them in your selections array) optional properties.
Example usage:</p>
<pre class="highlight plaintext"><code>let query = try! QueryOn&lt;Cat&gt;()
query.select(fieldsNamed: ["fields.bestFriend", "fields.color", "fields.name"])
client.fetchEntries(with: query).observable.then { catsResponse in
   let cats = catsResponse.items
   // Do stuff with cats.
}
</code></pre>

<p>See: <a href="https://www.contentful.com/developers/docs/references/content-delivery-api/#/reference/search-parameters/select-operator">https://www.contentful.com/developers/docs/references/content-delivery-api/#/reference/search-parameters/select-operator</a></p>
<div class="aside aside-throws">
    <p class="aside-title">Throws</p>
    Will throw an error if property names are not prefixed with <code>&quot;fields.&quot;</code>, if selections go more than 2 levels deep
      (<q>fields.bestFriend.sys</q> is not valid), or if more than 99 properties are selected.

</div>

                      </div>
                      <div class="declaration">
                        <h4>Declaration</h4>
                        <div class="language">
                          <p class="aside-title">Swift</p>
                          <pre class="highlight"><code><span class="kd">func</span> <span class="nf">select</span><span class="p">(</span><span class="n">fieldsNamed</span> <span class="nv">fieldNames</span><span class="p">:</span> <span class="p">[</span><span class="kt">String</span><span class="p">],</span> <span class="nv">locale</span><span class="p">:</span> <span class="kt">String</span><span class="p">?</span> <span class="o">=</span> <span class="kc">nil</span><span class="p">)</span> <span class="k">throws</span></code></pre>

                        </div>
                      </div>
                      <div>
                        <h4>Parameters</h4>
                        <table class="graybox">
                          <tbody>
                            <tr>
                              <td>
                                <code>
                                <em>fieldNames</em>
                                </code>
                              </td>
                              <td>
                                <div>
                                  <p>An array of field names to include in the JSON response.</p>
                                </div>
                              </td>
                            </tr>
                            <tr>
                              <td>
                                <code>
                                <em>locale</em>
                                </code>
                              </td>
                              <td>
                                <div>
                                  <p>An optional locale argument to return localized results. If unspecified, the locale originally
set on the <code>Client</code> instance is used.</p>
                                </div>
                              </td>
                            </tr>
                          </tbody>
                        </table>
                      </div>
                      <div class="slightly-smaller">
                        <a href="https://github.com/contentful/contentful.swift/tree//Sources/Query.swift#L375-L385">Show on GitHub</a>
                      </div>
                    </section>
                  </div>
                </li>
                <li class="item">
                  <div>
                    <code>
                    <a name="/s:FE10ContentfulPS_14ChainableQuery5orderFzt5usingGSaVS_14OrderParameter__T_"></a>
                    <a name="//apple_ref/swift/Method/order(using:)" class="dashAnchor"></a>
                    <a class="token" href="#/s:FE10ContentfulPS_14ChainableQuery5orderFzt5usingGSaVS_14OrderParameter__T_">order(using:)</a>
                    </code>
                      <span class="declaration-note">
                        Extension method
                      </span>
                  </div>
                  <div class="height-container">
                    <div class="pointer-container"></div>
                    <section class="section">
                      <div class="pointer"></div>
                      <div class="abstract">
                        <p>Instance method for ordering responses by the values at the specified field. Field types that can be
specified are Strings, Numbers, or Booleans.</p>

<p>Example usage:</p>
<pre class="highlight plaintext"><code>let query = try! Query(orderedUsing: OrderParameter("sys.createdAt"))

client.fetchEntries(with: query).observable.then { entriesResponse in
   let entries = entriesResponse.items
   // Do stuff with entries.
}
</code></pre>

<p>See: <a href="https://www.contentful.com/developers/docs/references/content-delivery-api/#/reference/search-parameters/order">https://www.contentful.com/developers/docs/references/content-delivery-api/#/reference/search-parameters/order</a>
and: <a href="https://www.contentful.com/developers/docs/references/content-delivery-api/#/reference/search-parameters/order-with-multiple-parameters">https://www.contentful.com/developers/docs/references/content-delivery-api/#/reference/search-parameters/order-with-multiple-parameters</a></p>
<div class="aside aside-throws">
    <p class="aside-title">Throws</p>
    Will throw an error if property names are not prefixed with either <code>&quot;sys.&quot;</code> or <code>&quot;fields.&quot;</code>.

</div>

                      </div>
                      <div class="declaration">
                        <h4>Declaration</h4>
                        <div class="language">
                          <p class="aside-title">Swift</p>
                          <pre class="highlight"><code><span class="kd">public</span> <span class="kd">func</span> <span class="nf">order</span><span class="p">(</span><span class="n">using</span> <span class="nv">orderParameters</span><span class="p">:</span> <span class="kt"><a href="../Structs/OrderParameter.html">OrderParameter</a></span><span class="o">...</span><span class="p">)</span> <span class="k">throws</span></code></pre>

                        </div>
                      </div>
                      <div>
                        <h4>Parameters</h4>
                        <table class="graybox">
                          <tbody>
                            <tr>
                              <td>
                                <code>
                                <em>propertyName</em>
                                </code>
                              </td>
                              <td>
                                <div>
                                  <p>One or more properties on the Resource by which the results will be ordered.</p>
                                </div>
                              </td>
                            </tr>
                            <tr>
                              <td>
                                <code>
                                <em>reverse</em>
                                </code>
                              </td>
                              <td>
                                <div>
                                  <p>An Bool specifying if the returned order should be reversed or not. Defaults to <code>false</code>.</p>
                                </div>
                              </td>
                            </tr>
                          </tbody>
                        </table>
                      </div>
                      <div class="slightly-smaller">
                        <a href="https://github.com/contentful/contentful.swift/tree//Sources/Query.swift#L408-L410">Show on GitHub</a>
                      </div>
                    </section>
                  </div>
                </li>
                <li class="item">
                  <div>
                    <code>
                    <a name="/s:FE10ContentfulPS_14ChainableQuery5limitFzT2toSu_T_"></a>
                    <a name="//apple_ref/swift/Method/limit(to:)" class="dashAnchor"></a>
                    <a class="token" href="#/s:FE10ContentfulPS_14ChainableQuery5limitFzT2toSu_T_">limit(to:)</a>
                    </code>
                      <span class="declaration-note">
                        Extension method
                      </span>
                  </div>
                  <div class="height-container">
                    <div class="pointer-container"></div>
                    <section class="section">
                      <div class="pointer"></div>
                      <div class="abstract">
                        <p>Instance method for further mutating a query to limit responses to a certain number of values. Use in conjunction with the <code>skip</code> method
to paginate responses.</p>

<p>Example usage:</p>
<pre class="highlight plaintext"><code>let query = try! Query(orderedBy: "sys.createdAt")

client.fetchEntries(with: query).observable.then { entriesResponse in
   let entries = entriesResponse.items
   // Do stuff with entries.
}
</code></pre>

                      </div>
                      <div class="declaration">
                        <h4>Declaration</h4>
                        <div class="language">
                          <p class="aside-title">Swift</p>
                          <pre class="highlight"><code><span class="kd">public</span> <span class="kd">func</span> <span class="nf">limit</span><span class="p">(</span><span class="n">to</span> <span class="nv">numberOfResults</span><span class="p">:</span> <span class="kt">UInt</span><span class="p">)</span> <span class="k">throws</span></code></pre>

                        </div>
                      </div>
                      <div>
                        <h4>Parameters</h4>
                        <table class="graybox">
                          <tbody>
                            <tr>
                              <td>
                                <code>
                                <em>numberOfResults</em>
                                </code>
                              </td>
                              <td>
                                <div>
                                  <p>The number of results the response will be limited to.</p>
                                </div>
                              </td>
                            </tr>
                          </tbody>
                        </table>
                      </div>
                      <div class="slightly-smaller">
                        <a href="https://github.com/contentful/contentful.swift/tree//Sources/Query.swift#L429-L433">Show on GitHub</a>
                      </div>
                    </section>
                  </div>
                </li>
                <li class="item">
                  <div>
                    <code>
                    <a name="/s:FE10ContentfulPS_14ChainableQuery4skipFT8theFirstSu_T_"></a>
                    <a name="//apple_ref/swift/Method/skip(theFirst:)" class="dashAnchor"></a>
                    <a class="token" href="#/s:FE10ContentfulPS_14ChainableQuery4skipFT8theFirstSu_T_">skip(theFirst:)</a>
                    </code>
                      <span class="declaration-note">
                        Extension method
                      </span>
                  </div>
                  <div class="height-container">
                    <div class="pointer-container"></div>
                    <section class="section">
                      <div class="pointer"></div>
                      <div class="abstract">
                        <p>Intance method for further mutating a query to skip the first <code>n</code> items in a response.
Use in conjunction with the <code>limit</code> method to paginate responses.</p>

<p>Example usage:</p>
<pre class="highlight plaintext"><code>let query = try! Query(skippingTheFirst: 9)

client.fetchEntries(with: query).observable.then { entriesResponse in
   let entries = entriesResponse.items
   // Do stuff with entries.
}
</code></pre>

                      </div>
                      <div class="declaration">
                        <h4>Declaration</h4>
                        <div class="language">
                          <p class="aside-title">Swift</p>
                          <pre class="highlight"><code><span class="kd">public</span> <span class="kd">func</span> <span class="nf">skip</span><span class="p">(</span><span class="n">theFirst</span> <span class="nv">numberOfResults</span><span class="p">:</span> <span class="kt">UInt</span><span class="p">)</span></code></pre>

                        </div>
                      </div>
                      <div>
                        <h4>Parameters</h4>
                        <table class="graybox">
                          <tbody>
                            <tr>
                              <td>
                                <code>
                                <em>numberOfResults</em>
                                </code>
                              </td>
                              <td>
                                <div>
                                  <p>The number of results that will be skipped in the query.</p>
                                </div>
                              </td>
                            </tr>
                          </tbody>
                        </table>
                      </div>
                      <div class="slightly-smaller">
                        <a href="https://github.com/contentful/contentful.swift/tree//Sources/Query.swift#L452-L454">Show on GitHub</a>
                      </div>
                    </section>
                  </div>
                </li>
              </ul>
            </div>
            <div class="task-group">
              <div class="task-name-container">
                <a name="/Full-text%20search"></a>
                <a name="//apple_ref/swift/Section/Full-text search" class="dashAnchor"></a>
                <a href="#/Full-text%20search">
                  <h3 class="section-name">Full-text search</h3>
                </a>
              </div>
              <ul>
                <li class="item">
                  <div>
                    <code>
                    <a name="/s:FE10ContentfulPS_14ChainableQuerycFzT12searchingForSS3forGSqSS__x"></a>
                    <a name="//apple_ref/swift/Method/init(searchingFor:for:)" class="dashAnchor"></a>
                    <a class="token" href="#/s:FE10ContentfulPS_14ChainableQuerycFzT12searchingForSS3forGSqSS__x">init(searchingFor:for:)</a>
                    </code>
                      <span class="declaration-note">
                        Extension method
                      </span>
                  </div>
                  <div class="height-container">
                    <div class="pointer-container"></div>
                    <section class="section">
                      <div class="pointer"></div>
                      <div class="abstract">
                        <p>Convenience initializer for querying entries or assets in which all text and symbol fields contain
the specified, case-insensitive text parameter.</p>

<p>See: <a href="https://www.contentful.com/developers/docs/references/content-delivery-api/#/reference/search-parameters/full-text-search">https://www.contentful.com/developers/docs/references/content-delivery-api/#/reference/search-parameters/full-text-search</a></p>

                      </div>
                      <div class="declaration">
                        <h4>Declaration</h4>
                        <div class="language">
                          <p class="aside-title">Swift</p>
                          <pre class="highlight"><code><span class="kd">public</span> <span class="nf">init</span><span class="p">(</span><span class="n">searchingFor</span> <span class="nv">text</span><span class="p">:</span> <span class="kt">String</span><span class="p">,</span> <span class="k">for</span> <span class="nv">locale</span><span class="p">:</span> <span class="kt">String</span><span class="p">?</span> <span class="o">=</span> <span class="kc">nil</span><span class="p">)</span> <span class="k">throws</span></code></pre>

                        </div>
                      </div>
                      <div>
                        <h4>Parameters</h4>
                        <table class="graybox">
                          <tbody>
                            <tr>
                              <td>
                                <code>
                                <em>text</em>
                                </code>
                              </td>
                              <td>
                                <div>
                                  <p>The text string to match against.</p>
                                </div>
                              </td>
                            </tr>
                            <tr>
                              <td>
                                <code>
                                <em>locale</em>
                                </code>
                              </td>
                              <td>
                                <div>
                                  <p>An optional locale argument to return localized results. If unspecified, the locale originally
                set on the <code>Client</code> instance is used.</p>
                                </div>
                              </td>
                            </tr>
                          </tbody>
                        </table>
                      </div>
                      <div class="slightly-smaller">
                        <a href="https://github.com/contentful/contentful.swift/tree//Sources/Query.swift#L468-L472">Show on GitHub</a>
                      </div>
                    </section>
                  </div>
                </li>
                <li class="item">
                  <div>
                    <code>
                    <a name="/s:FE10ContentfulPS_14ChainableQuery6searchFT3forSS_T_"></a>
                    <a name="//apple_ref/swift/Method/search(for:)" class="dashAnchor"></a>
                    <a class="token" href="#/s:FE10ContentfulPS_14ChainableQuery6searchFT3forSS_T_">search(for:)</a>
                    </code>
                      <span class="declaration-note">
                        Extension method
                      </span>
                  </div>
                  <div class="height-container">
                    <div class="pointer-container"></div>
                    <section class="section">
                      <div class="pointer"></div>
                      <div class="abstract">
                        <p>Instance method for appending a full-text search query to an existing query. Returned results will contain
either entries or assets in which all text and symbol fields contain the specified, case-insensitive text parameter.</p>

<p>See: <a href="https://www.contentful.com/developers/docs/references/content-delivery-api/#/reference/search-parameters/full-text-search">https://www.contentful.com/developers/docs/references/content-delivery-api/#/reference/search-parameters/full-text-search</a></p>

                      </div>
                      <div class="declaration">
                        <h4>Declaration</h4>
                        <div class="language">
                          <p class="aside-title">Swift</p>
                          <pre class="highlight"><code><span class="kd">public</span> <span class="kd">func</span> <span class="nf">search</span><span class="p">(</span><span class="k">for</span> <span class="nv">text</span><span class="p">:</span> <span class="kt">String</span><span class="p">)</span></code></pre>

                        </div>
                      </div>
                      <div>
                        <h4>Parameters</h4>
                        <table class="graybox">
                          <tbody>
                            <tr>
                              <td>
                                <code>
                                <em>text</em>
                                </code>
                              </td>
                              <td>
                                <div>
                                  <p>The text string to match against.</p>
                                </div>
                              </td>
                            </tr>
                            <tr>
                              <td>
                                <code>
                                <em>locale</em>
                                </code>
                              </td>
                              <td>
                                <div>
                                  <p>An optional locale argument to return localized results. If unspecified, the locale originally
set on the <code>Client</code> instance is used.</p>
                                </div>
                              </td>
                            </tr>
                          </tbody>
                        </table>
                      </div>
                      <div class="slightly-smaller">
                        <a href="https://github.com/contentful/contentful.swift/tree//Sources/Query.swift#L483-L485">Show on GitHub</a>
                      </div>
                    </section>
                  </div>
                </li>
              </ul>
            </div>
          </section>
        </section>
        <section id="footer">
          <p>&copy; 2017 <a class="link" href="https://www.contentful.com" target="_blank" rel="external">Contentful</a>. All rights reserved. (Last updated: 2017-07-31)</p>
          <p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.8.3</a>, a <a class="link" href="http://realm.io" target="_blank" rel="external">Realm</a> project.</p>
        </section>
      </article>
    </div>
  </body>
</div>
</html>
