How can I list all the posts of my Blog in API client for PHP?
Scairon Garcia <[email protected]> Wed, 20 Jun 2018 03:28:18 -0700 (PDT)
| Newsgroups | gmane.comp.web.blogger.api |
|---|---|
| Message-ID | <[email protected]> |
------=_Part_29288_369740439.1529490498026
Content-Type: multipart/alternative;
boundary="----=_Part_29289_1854359322.1529490498026"
------=_Part_29289_1854359322.1529490498026
Content-Type: text/plain; charset="UTF-8"
I have the following code, but I can only get up to 400 items for each
request and I can not find documentation on how to paginate.
$blogger = new Google_Service_Blogger($client);
$posts = $blogger->posts->listPosts("MY_BLOG_ID",array("maxResults"=>400));
Thanks in advance.
--
You received this message because you are subscribed to the Google Groups "Blogger Developer Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/bloggerdev.
For more options, visit https://groups.google.com/d/optout.
------=_Part_29289_1854359322.1529490498026
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
<div dir=3D"ltr"><span id=3D"result_box" class=3D"" lang=3D"en"><span class=
=3D"">I
have the following code, but I can only get up to 400 items for each=20
request and I can not find documentation on how to paginate.</span><br><br>=
</span><br><pre style=3D"background-color:#ffffff;color:#000000;font-family=
:'Courier New';font-size:9.0pt;"><span style=3D"color:#660000;backg=
round-color:#f7faff;">$blogger </span><span style=3D"background-color:#f7fa=
ff;">=3D </span><span style=3D"color:#000080;background-color:#f7faff;font-=
weight:bold;">new </span><span style=3D"background-color:#f7faff;">Google_S=
ervice_Blogger(</span><span style=3D"color:#660000;background-color:#f7faff=
;">$client</span><span style=3D"background-color:#f7faff;">);<br></span><sp=
an style=3D"color:#660000;background-color:#f7faff;">$posts </span><span st=
yle=3D"background-color:#f7faff;">=3D </span><span style=3D"color:#660000;b=
ackground-color:#f7faff;">$blogger</span><span style=3D"background-color:#f=
7faff;">-></span><span style=3D"color:#660e7a;background-color:#f7faff;f=
ont-weight:bold;">posts</span><span style=3D"background-color:#f7faff;">-&g=
t;listPosts(</span><span style=3D"color:#008000;background-color:#f7faff;fo=
nt-weight:bold;">"MY_BLOG_ID"</span><span style=3D"background-col=
or:#f7faff;">,</span><span style=3D"color:#000080;background-color:#f7faff;=
font-weight:bold;">array</span><span style=3D"background-color:#f7faff;">(<=
/span><span style=3D"color:#008000;background-color:#f7faff;font-weight:bol=
d;">"maxResults"</span><span style=3D"background-color:#f7faff;">=
=3D></span><span style=3D"color:#0000ff;background-color:#f7faff;">400</=
span><span style=3D"background-color:#f7faff;">));</span></pre><span id=3D"=
result_box" class=3D"" lang=3D"en"><br><span class=3D"">Thanks in advance.<=
/span></span></div>
<p></p>
-- <br />
You received this message because you are subscribed to the Google Groups &=
quot;Blogger Developer Group" group.<br />
To unsubscribe from this group and stop receiving emails from it, send an e=
mail to <a href=3D"mailto:[email protected]">bloggerd=
[email protected]</a>.<br />
To post to this group, send email to <a href=3D"mailto:bloggerdev@googlegro=
ups.com">[email protected]</a>.<br />
Visit this group at <a href=3D"https://groups.google.com/group/bloggerdev">=
https://groups.google.com/group/bloggerdev</a>.<br />
For more options, visit <a href=3D"https://groups.google.com/d/optout">http=
s://groups.google.com/d/optout</a>.<br />
------=_Part_29289_1854359322.1529490498026--
------=_Part_29288_369740439.1529490498026--