{"id":99,"date":"2008-03-14T17:21:45","date_gmt":"2008-03-15T01:21:45","guid":{"rendered":"http:\/\/simplepie.org\/blog\/2008\/03\/14\/how-can-simplepies-api-improve\/"},"modified":"2013-05-15T03:14:57","modified_gmt":"2013-05-15T11:14:57","slug":"how-can-simplepies-api-improve","status":"publish","type":"post","link":"https:\/\/simplepie.org\/blog\/2008\/03\/14\/how-can-simplepies-api-improve\/","title":{"rendered":"How can SimplePie&#8217;s API improve?"},"content":{"rendered":"<div class=\"blogimage\"><img decoding=\"async\" src=\"\/images\/128\/xcode.png\" alt=\"[Development]\" \/><\/div>\n<p>SimplePie is a tool that I use nearly every single day, in nearly every single project I work on. I use it partially because I work on it, and partially because I really believe that it&#8217;s the best tool for the job (when that job is RSS\/Atom parsing). At the same time I know that there are things that I do that are very different from what other people are doing with SimplePie, such as processing thousands of feeds at a time, building web-based aggregators, building start pages (a la PopURLs, Original Signal, and others), and doing all sorts of other things that I may or may not even know about.<\/p>\n<p>I know that Geoffrey has talked a bit about SimplePie 2.0&#8217;s planned modularity (keeping the fetching, parsing, caching, and API components separate but being able to load them when necessary, or even be able to swap in your own components), and we&#8217;d like to see SimplePie 2.0 be better commented and slimmer code-wise, opting to move some of the more superfluous functionality into helpers and other outside classes.<\/p>\n<p>So my big question is: what can we do to make your job easier as it pertains to SimplePie? I know that there are some cool things that we&#8217;ve talked about for SimplePie 2.0, but there also things coming in SimplePie 1.2 that are cool. I&#8217;ve been thinking about the kinds of things that would make things easier for me and how we could bundle them as on-demand &#8220;helpers&#8221; instead of necessarily building them into the core (like how our Internationalized Domain Name support is separate).<\/p>\n<p>The first (very simple) thing that comes to mind is a function that that shortens text (e.g. titles and descriptions). This is something that has been asked for hundreds of times and we&#8217;ve got some sample code in the wiki for it, but what if we could bundle helpers like this in an on-the-side fashion? What kinds of things would you like to see? What kinds of tasks do you find yourself doing over and over that the community might be able to benefit from?<\/p>\n<p>Perhaps people parsing thousands of feeds might like to have (or contribute) their parsing scripts and\/or cron jobs? Perhaps people building feed aggregators would like to see improved HTTP status code messages to know whether they should update a feed URL in a database? Perhaps it&#8217;d be nice to have some software-specific helpers for Drupal or CodeIgniter?<\/p>\n<p>Fire away! \ud83d\ude42<\/p>\n","protected":false},"excerpt":{"rendered":"<p>SimplePie is a tool that I use nearly every single day, in nearly every single project I work on. I use it partially because I work on it, and partially because I really believe that it&#8217;s the best tool for the job (when that job is RSS\/Atom parsing). At the same time I know that [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-99","post","type-post","status-publish","format-standard","hentry","category-simplepie"],"_links":{"self":[{"href":"https:\/\/simplepie.org\/blog\/wp-json\/wp\/v2\/posts\/99","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/simplepie.org\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/simplepie.org\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/simplepie.org\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/simplepie.org\/blog\/wp-json\/wp\/v2\/comments?post=99"}],"version-history":[{"count":1,"href":"https:\/\/simplepie.org\/blog\/wp-json\/wp\/v2\/posts\/99\/revisions"}],"predecessor-version":[{"id":203,"href":"https:\/\/simplepie.org\/blog\/wp-json\/wp\/v2\/posts\/99\/revisions\/203"}],"wp:attachment":[{"href":"https:\/\/simplepie.org\/blog\/wp-json\/wp\/v2\/media?parent=99"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/simplepie.org\/blog\/wp-json\/wp\/v2\/categories?post=99"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/simplepie.org\/blog\/wp-json\/wp\/v2\/tags?post=99"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}