<?xml version='1.0' encoding='utf-8' ?>

<rss version='2.0' xmlns:lj='http://www.livejournal.org/rss/lj/1.0/' xmlns:atom10='http://www.w3.org/2005/Atom'>
<channel>
  <title>Dreamwidth Development Training</title>
  <link>https://dw-dev-training.dreamwidth.org/</link>
  <description>Dreamwidth Development Training - Dreamwidth Studios</description>
  <lastBuildDate>Sat, 24 Dec 2016 02:46:59 GMT</lastBuildDate>
  <generator>LiveJournal / Dreamwidth Studios</generator>
  <lj:journal>dw_dev_training</lj:journal>
  <lj:journaltype>community</lj:journaltype>
  <image>
    <url>https://v2.dreamwidth.org/92798/30813</url>
    <title>Dreamwidth Development Training</title>
    <link>https://dw-dev-training.dreamwidth.org/</link>
    <width>100</width>
    <height>100</height>
  </image>

<item>
  <guid isPermaLink='true'>https://dw-dev-training.dreamwidth.org/65408.html</guid>
  <pubDate>Sat, 24 Dec 2016 02:46:59 GMT</pubDate>
  <title>How to get comments through the API?</title>
  <link>https://dw-dev-training.dreamwidth.org/65408.html</link>
  <description>Posted by: &lt;span lj:user=&apos;ari_linn&apos; style=&apos;white-space: nowrap;&apos; class=&apos;ljuser&apos;&gt;&lt;a href=&apos;https://ari-linn.dreamwidth.org/profile&apos;&gt;&lt;img src=&apos;https://www.dreamwidth.org/img/silk/identity/user.png&apos; alt=&apos;[personal profile] &apos; width=&apos;17&apos; height=&apos;17&apos; style=&apos;vertical-align: text-bottom; border: 0; padding-right: 1px;&apos; /&gt;&lt;/a&gt;&lt;a href=&apos;https://ari-linn.dreamwidth.org/&apos;&gt;&lt;b&gt;ari_linn&lt;/b&gt;&lt;/a&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;How do I get post comments through the API? I can get posts with LJ.XMLRPC.getevents, and in the original LJ there&apos;s a method called LJ.XMLRPC.getcomments, but when I tried it on DW API, I got &quot;Client error: Unknown method&quot;. Not nice.&lt;br /&gt;&lt;br /&gt;&lt;img src=&quot;https://www.dreamwidth.org/tools/commentcount?user=dw_dev_training&amp;ditemid=65408&quot; width=&quot;30&quot; height=&quot;12&quot; alt=&quot;comment count unavailable&quot; style=&quot;vertical-align: middle;&quot;/&gt; comments</description>
  <comments>https://dw-dev-training.dreamwidth.org/65408.html</comments>
  <category>comments</category>
  <category>api</category>
  <lj:mood>aggravated</lj:mood>
  <lj:security>public</lj:security>
  <lj:poster>ari_linn</lj:poster>
  <lj:reply-count>1</lj:reply-count>
</item>
<item>
  <guid isPermaLink='true'>https://dw-dev-training.dreamwidth.org/58924.html</guid>
  <pubDate>Tue, 18 Nov 2014 06:02:46 GMT</pubDate>
  <title>HOWTO: Dreamwidth API</title>
  <link>https://dw-dev-training.dreamwidth.org/58924.html</link>
  <description>Posted by: &lt;span lj:user=&apos;vlion&apos; style=&apos;white-space: nowrap;&apos; class=&apos;ljuser&apos;&gt;&lt;a href=&apos;https://vlion.dreamwidth.org/profile&apos;&gt;&lt;img src=&apos;https://www.dreamwidth.org/img/silk/identity/user.png&apos; alt=&apos;[personal profile] &apos; width=&apos;17&apos; height=&apos;17&apos; style=&apos;vertical-align: text-bottom; border: 0; padding-right: 1px;&apos; /&gt;&lt;/a&gt;&lt;a href=&apos;https://vlion.dreamwidth.org/&apos;&gt;&lt;b&gt;vlion&lt;/b&gt;&lt;/a&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;h2&gt;HOWTO Use the Dreamwidth API&lt;/h2&gt;

&lt;p&gt;DW endpoint: &lt;code&gt;&quot;https://www.dreamwidth.org/interface/xmlrpc&quot;&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Invoke  &lt;code&gt;LJ.XMLRPC.getchallenge&lt;/code&gt; on the endpoint, receiving something like...&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;&quot;auth_scheme&quot; :STRING &quot;c0&quot;
&quot;server_time&quot; :INTEGER &amp;lt;epoch time&amp;gt;
&quot;challenge&quot; :STRING &quot;c0:1416283200:2410:60:4QoGWOXV0uB9gBaZ0LB0:5a1901a0feccabcb30fbe6e85878f758&quot;)
&quot;expire_time&quot; :INTEGER &amp;lt;epoch time&amp;gt;))
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Pick &lt;code&gt;challenge&lt;/code&gt; out, &lt;code&gt;md5_hex&lt;/code&gt;[0] the &lt;code&gt;challenge&lt;/code&gt; concatenated with
the &lt;code&gt;md5_hex&lt;/code&gt; of the account password; call the result &lt;code&gt;response&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;
response = md5(concat(challenge, md5(password)))
&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Then, for &lt;code&gt;function&lt;/code&gt; in the API, invoke &lt;code&gt;LJ.RPC.function&lt;/code&gt; using &lt;code&gt;auth_method = challenge&lt;/code&gt; and
&lt;code&gt;auth_response = response&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;Proceed as appropriate for said &lt;code&gt;function&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;[0] .. digest in hexadecimal form. The length of the returned string
will be 32 and it will only contain characters from this set:
&lt;code&gt;&apos;0&apos;..&apos;9&apos;&lt;/code&gt; and &lt;code&gt;&apos;a&apos;..&apos;f&apos;&lt;/code&gt;.&lt;/p&gt;
&lt;br /&gt;&lt;br /&gt;&lt;img src=&quot;https://www.dreamwidth.org/tools/commentcount?user=dw_dev_training&amp;ditemid=58924&quot; width=&quot;30&quot; height=&quot;12&quot; alt=&quot;comment count unavailable&quot; style=&quot;vertical-align: middle;&quot;/&gt; comments</description>
  <comments>https://dw-dev-training.dreamwidth.org/58924.html</comments>
  <category>api</category>
  <lj:security>public</lj:security>
  <lj:poster>vlion</lj:poster>
  <lj:reply-count>4</lj:reply-count>
</item>
</channel>
</rss>
