ITEMS


METHOD

/api/items/get.php

This method gets article items from Cranked and meta data associated with it.


ENDPOINT

http://cranked_installation_url/api/items/get.php


PARAMETERS GET

PARAMETER DEFAULT REQUIRED NOTES
api_key null Yes API key can be retrieved from /api/auth/login.php
feed_id null No The feed_id of the feed where you want to load articles from
folder_id null No The folder_id of the feed where you want to load articles from. If you pass both feed_id & folder_id into the call, the folder_id will have no effect on the output.
read 0 No Set whether you want to fetch 'read' or 'unread' articles. 1 for read, 0 for unread articles.
saved 0 No Set to 1 if you want to fetch saved items only.
published_since null No Only articles published after this date will be returned if you pass in this parameter in unix timestamp.
search_keyword null No Only articles that match this search keyword will be returned
order DESC No Set whether articles should be returned in 'DESC' or 'ASC' order.
sort_by_trending 1 or 0
(from user settings)
No If set to 1, articles will be sorted by the most liked & shared on Facebook & Twitter. This is equivalent to clicking the 'CRANK UP THE FEEDS' button in Cranked's interface. To 'remember' this setting, call /api/settings/set.php and set 'sort_by_trending' to 1.
limit 10 No Set the number of articles that should be returned.
offset 0 No Set how many articles the returned result should skip

SUCCESS RESPONSE

{
   "count":2,
   "feed_items":[
      {
         "feed_item_id":"9433",
         "feed_id":"42",
         "folder_id":[
            "7",
            "8",
            "3"
         ],
         "item_title":"Tab Closed; Didn\u2019t Read",
         "item_excerpt":"A Tumblr devoted to one of the worst practices on the web today:\n\n\n  If you’re going to insist on obscuring your content with some\nstupid social shit, a promo for your shitty app or a full-page\nnewsletter signup form, then I’m not going t...",
         "item_body":"<p>A Tumblr devoted to one of the worst practices on the web today:<\/p>\n\n<blockquote>\n<p>If you&rsquo;re going to insist on obscuring your content with some\nstupid social shit, a promo for your shitty app or a full-page\nnewsletter signup form, then I&rsquo;m not going to read your content.\nOr click on your ads. Or help you generate revenue in any way.<\/p>\n<\/blockquote>\n\n<p>It&rsquo;s like the second coming of pop-up ads.<\/p>\n\n<p>Also, reminds of <a href=\"https:\/\/twitter.com\/gruber\/statuses\/1306940181\">this old tweet of mine from 2009<\/a>.<\/p>\n\n<div>\n<a title=\"Permanent link to &lsquo;Tab Closed; Didn&rsquo;t Read&rsquo;\" href=\"http:\/\/daringfireball.net\/linked\/2013\/12\/05\/tab-closed-didnt-read\">&nbsp;&#9733;&nbsp;<\/a>\n<\/div>",
         "item_link":"http:\/\/tabcloseddidntread.com\/",
         "item_read":"0",
         "item_saved":"0",
         "item_twitter_shares":"2794",
         "item_facebook_shares":"1956",
         "item_total_shares":4750,
         "use_mobilizer":"0",
         "published_on_date_unix":"1387283645",
         "published_on_date_relative":"21 hrs ago",
         "favicon_id":"54",
         "favicon_image":";base64,AAABAAEAEBAAAAEAGABoAwAAFgAAACgAAAAQAAAAIAAAAA..",
         "feed_title":"Daring Fireball",
         "site_url":"http:\/\/daringfireball.net\/",
         "show_excerpt":"1",
         "show_unread_count":"1",
         "newest_first":"1"
      },
      {
         "feed_item_id":"9347",
         "feed_id":"42",
         "folder_id":[
            "7",
            "8",
            "3"
         ],
         "item_title":"The New Adjustable Glif",
         "item_excerpt":"Clever new adjustable design. Mine just arrived, and it’s very nice. I’ve kept a Glif in my bag and on my desk ever since the first one shipped in 2010.\n\nGoddamn adorable Sandwich video, too.\n\n\n ★ \n...",
         "item_body":"<p>Clever new adjustable design. Mine just arrived, and it&rsquo;s very nice. I&rsquo;ve kept a Glif in my bag and on my desk ever since the first one shipped in 2010.<\/p>\n\n<p>Goddamn adorable Sandwich video, too.<\/p>\n\n<div>\n<a title=\"Permanent link to &lsquo;The New Adjustable Glif&rsquo;\" href=\"http:\/\/daringfireball.net\/linked\/2013\/12\/05\/glif\">&nbsp;&#9733;&nbsp;<\/a>\n<\/div>",
         "item_link":"http:\/\/www.studioneat.com\/products\/glif",
         "item_read":"0",
         "item_saved":"0",
         "item_twitter_shares":"459",
         "item_facebook_shares":"942",
         "item_total_shares":1401,
         "use_mobilizer":"0",
         "published_on_date_unix":"1386267720",
         "published_on_date_relative":"2 weeks ago",
         "favicon_id":"54",
         "favicon_image":";base64,AAAEAAABAAAAGAAAEAEBAACgAAAAQAAAAABoAwAAFgAIAA..",
         "feed_title":"Daring Fireball",
         "site_url":"http:\/\/daringfireball.net\/",
         "show_excerpt":"1",
         "show_unread_count":"1",
         "newest_first":"1"
      }
   ]
}

ERROR RESPONSE

ERROR MESSAGE NOTES
No data passed API was called but no data were passed
API key not passed The required API key was not passed into the call
Invalid API key The API key was passed into the call but is invalid