<p>That function was added in Feb 2016, <a href="https://github.com/olivierbon/Placid/issues/21" rel="nofollow noreferrer">see the Github issue page</a>.
This is the code:</p>

<pre><code>{% set events = craft.placid.request('EventsFeed').limit(5) %}

{% for event in events.data %}
  {{ event.title }}
{% endfor %}
</code></pre>

<p>Note the use of the .data part, this was added in the 1.7.112 version.
<a href="https://github.com/olivierbon/Placid/wiki/Dealing-with-responses" rel="nofollow noreferrer">More details here</a></p>

CC BY-SA 3.0
2017-08-17T20:16:11.910Z
2017-08-17T20:21:18.143Z
2017-08-17T20:21:18.143Z
Paul Frost
<p>Not a true answer, but a work around:</p>

<pre><code>{% for tweet in timeline.data %}
    {% if loop.index &lt;= 5 %}
        ...
    {% endif %}
{% endfor %}
</code></pre>

CC BY-SA 3.0
2017-08-15T18:10:50.390Z
Matt, I used an alternative method before reading this. So thanks for your efforts.
Mark
CC BY-SA 3.0
2017-08-15T12:42:11.183Z
2017-08-15T12:42:11.183Z
Matt Wilcox
<p>I managed to solve this using the slice filter. Short hand shown below. </p>

<p>Thanks for your input Matt Wilcox. </p>

<pre><code>{% for tweet in timeline.data[0:5] %}

    ...

{% endfor %}
</code></pre>

CC BY-SA 3.0
2017-08-15T18:10:09.063Z
2017-08-15T18:10:09.063Z
Mark
<p>I'm trying to limit the results to 5, but its returning all of the results instead. I am using the below code:</p>

<pre><code>{% set options = {
  cache : false,
  query : {
    limit : 5
  }
} %}

{% set timeline = craft.placid.request('projectsLatestTrending', options ) %}

&lt;ol&gt;
{% for tweet in timeline.data %}
  &lt;li&gt;{{ tweet.name }}&lt;/li&gt;
{% endfor %}
&lt;/ol&gt;
</code></pre>

<p>Thanks in advance for any help.</p>

CC BY-SA 3.0
2017-08-15T14:31:50.847Z
This would have to be accomplished through the API your accessing.  Placid creates the gateway to the API.  The API would need to limit the results returned.
a-am
<json>
Placid plugin - limit returned results
# Placid plugin - limit returned results

(Asked by: username_0 on 2017-08-15)

I'm trying to limit the results to 5, but its returning all of the results instead. I am using the below code:
{% set options = {
  cache : false,
  query : {
    limit : 5
  }
} %}

{% set timeline = craft.placid.request('projectsLatestTrending', options ) %}


{% for tweet in timeline.data %}
  {{ tweet.name }}
{% endfor %}


Thanks in advance for any help.

**Tags:** json

> **Comments:**
> **username_1**: This would have to be accomplished through the API your accessing.  Placid creates the gateway to the API.  The API would need to limit the results returned.  

---

## 3 answers

### Answer by username_2 on 2017-08-17. Score: 1 | Accepted answer

That function was added in Feb 2016, see the Github issue page.
This is the code:
{% set events = craft.placid.request('EventsFeed').limit(5) %}

{% for event in events.data %}
  {{ event.title }}
{% endfor %}

Note the use of the .data part, this was added in the 1.7.112 version.
More details here


---

### Answer by username_3 on 2017-08-15. Score: 1

Not a true answer, but a work around:
{% for tweet in timeline.data %}
    {% if loop.index <= 5 %}
        ...
    {% endif %}
{% endfor %}

> **Comments:**
> **username_0**: Matt, I used an alternative method before reading this. So thanks for your efforts.  

---

### Answer by username_0 on 2017-08-15. Score: 1

I managed to solve this using the slice filter. Short hand shown below. 
Thanks for your input username_3. 
{% for tweet in timeline.data[0:5] %}

    ...

{% endfor %}


---

