{"id":29451,"date":"2014-05-16T19:52:23","date_gmt":"2014-05-16T19:52:23","guid":{"rendered":"https:\/\/wordpress.org\/plugins-wp\/simperium\/"},"modified":"2014-05-18T04:48:30","modified_gmt":"2014-05-18T04:48:30","slug":"simperium","status":"closed","type":"plugin","link":"https:\/\/wordpress.org\/plugins\/simperium\/","author":11822877,"comment_status":"closed","ping_status":"closed","template":"","meta":{"version":"0.1.0","stable_tag":"trunk","tested":"3.9.40","requires":"3.6","requires_php":"","requires_plugins":"","header_name":"Simperium","header_author":"Akeda Bagus","header_description":"","assets_banners_color":"","last_updated":"2014-05-18 04:48:30","external_support_url":"","external_repository_url":"","donate_link":"","header_plugin_uri":"https:\/\/github.com\/gedex\/wp-simperium","header_author_uri":"http:\/\/gedex.web.id","rating":0,"author_block_rating":0,"active_installs":0,"downloads":974,"num_ratings":0,"support_threads":0,"support_threads_resolved":0,"author_block_count":0,"sections":["description","installation","faq","changelog"],"tags":[],"upgrade_notice":[],"ratings":{"1":0,"2":0,"3":0,"4":0,"5":0},"assets_icons":[],"assets_banners":[],"assets_blueprints":{},"all_blocks":[],"tagged_versions":[],"block_files":[],"assets_screenshots":[],"screenshots":[],"jetpack_post_was_ever_published":false},"plugin_section":[],"plugin_tags":[3524,2431,908,8537,56392,56391],"plugin_category":[40],"plugin_contributors":[],"plugin_business_model":[],"class_list":["post-29451","plugin","type-plugin","status-closed","hentry","plugin_tags-data","plugin_tags-event","plugin_tags-log","plugin_tags-logger","plugin_tags-post-processing","plugin_tags-simperium","plugin_category-calendar-and-events","plugin_committers-akeda"],"banners":[],"icons":{"svg":false,"icon":"https:\/\/s.w.org\/plugins\/geopattern-icon\/simperium.svg","icon_2x":false,"generated":true},"screenshots":[],"raw_content":"<!--section=description-->\n<p>This plugin is intended for developer to send data to Simperium. Followings are use cases in which this plugin might come in handy:<\/p>\n <ol>\n<li>You need post-processing (for instance pinging dozen web services after a post is published) without blocking request. In this case you call provided actions or helper methods, then you spawn long-live process (either from the same server or different server) that listens to changes from your Simperium bucket for post-processing.<\/li>\n<li>You need to log events that happen during request lifecycle under restricted circumstances (for instance it won't possible to access log files on the server).<\/li>\n<\/ol>\n <p><strong>How to use it<\/strong><\/p>\n <p>Once this plugin is installed and activated, you can send data to Simperium in following ways:<\/p>\n <ol>\n<li>Via action hook: <code>do_action( 'simperium_send_data', $bucket, $data )<\/code> or <code>do_action( 'simperium_send_buffered_data', $bucket, $data )<\/code>. The first hook, will send the <code>$data<\/code> immediately, while the later will send the data to buffer and will send all buffered data to Simperium at once after calling <code>do_action( 'simperium_flush_buffer', $bucket )<\/code>. If <code>$bucket<\/code> arg is provided, it only flushes buffered data that's targetted to <code>$bucket<\/code>.<\/li>\n<li>Via helper method: <code>WP_Simperium::send_data( $bucket, $data )<\/code> or <code>WP_Simperium::send_buffered_data( $bucket, $data )<\/code>. To flush buffer, you call <code>WP_Simperium::flush_buffer( $bucket )<\/code>. Again, <code>$bucket<\/code> arg is optional.<\/li>\n<\/ol>\n <p>The value of <code>$data<\/code> MUST BE in key-value array structure as nested structure is not supported by Simperium.<\/p>\n <p>Before using the action hooks or helper methods, you need to supply Simperium app credentials via <code>simperium_config<\/code> filter, for example:<\/p>\n <pre><code>add_filter( 'simperium_config', function() {     return array(         'app_id'  =&gt; 'YOUR_APP_ID',         'api_key' =&gt; 'YOUR_API_KEY',     ) } ); <\/code><\/pre>\n <p>In addition to <code>app_id<\/code> and <code>api_key<\/code> you can pass <code>username<\/code> and\/or <code>access_token<\/code> to the array config. If <code>access_token<\/code> is omitted, the plugin will request <code>access_token<\/code> from Simperium with provided <code>username<\/code> (if exists) or <code>get_bloginfo( 'admin_email' )<\/code> and store the info in option. Subsequent calls will read <code>access_token<\/code> information from option, but can be bypassed by providing <code>access_token<\/code> in array config. It's preferred to supply your own <code>access_token<\/code> or <code>username<\/code> that hasn't registered yet. Please keep in mind that token has 30 days life span. If you're using <code>access_token<\/code> that's automatically retrieved by the plugin, you don't need to worry as scheduled event will refresh the token per 29 days.<\/p>\n <p><strong>Sender Examples<\/strong><\/p>\n <p>I've created <a href=\"https:\/\/github.com\/gedex\/wp-simperium-sender-examples\">sender examples plugin<\/a> that you can use as a starting point, though it will run without any customization. Currently it has following features:<\/p>\n <ul>\n<li>Send post data once post status is transitioned to public.<\/li>\n<li>Send new comment.<\/li>\n<li>More will come later..<\/li>\n<\/ul>\n <p><strong>Consumer Examples<\/strong><\/p>\n <p>I'm working to provide listener apps, written in PHP (stay tuned!), for now you can check <a href=\"https:\/\/simperium.com\/samples\/\">Simperium examples<\/a> and their awesome libraries.<\/p>\n <p><strong>Contributing<\/strong><\/p>\n <ul>\n<li>Development of this plugin is done on <a href=\"https:\/\/github.com\/gedex\/wp-simperium\">GitHub<\/a>. Pull requests are always welcome.<\/li>\n<li>For <strong>Sender<\/strong> apps feedback, please check its <a href=\"https:\/\/github.com\/gedex\/wp-simperium-sender-examples\">GitHub repo<\/a>.<\/li>\n<li>For <strong>Consumer<\/strong> apps feedback, please stay tuned!<\/li>\n<\/ul>\n\n<!--section=installation-->\n<ol>\n<li>Upload <strong>Simperium<\/strong> plugin to your blog's <code>wp-content\/plugins\/<\/code> directory and activate.<\/li>\n<li>Hook into <code>simperium_config<\/code> filter either as drop-in plugin or in your theme's <code>functions.php<\/code><\/li>\n<\/ol>\n\n<!--section=faq-->\n<h4>Does the plugin provides API to retrieve entity from Simperium<\/h4>\n <p>No. The main purpose of this plugin is to send data (from WordPress) only, the decision of this plugin is to not to expose API to get\/update\/delete data. Simperium has <a href=\"URL\">client libraries<\/a> that expose get\/update\/delete data, you better use that.<\/p>\n\n<!--section=changelog-->\n<h4>0.1.0<\/h4>\n <p>Initial release<\/p>","raw_excerpt":"This plugin contains easy-to-use API that uses WP HTTP API to send data to Simperium.","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin\/29451","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin"}],"about":[{"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/types\/plugin"}],"replies":[{"embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/comments?post=29451"}],"author":[{"embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wporg\/v1\/users\/akeda"}],"wp:attachment":[{"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/media?parent=29451"}],"wp:term":[{"taxonomy":"plugin_section","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_section?post=29451"},{"taxonomy":"plugin_tags","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_tags?post=29451"},{"taxonomy":"plugin_category","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_category?post=29451"},{"taxonomy":"plugin_contributors","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_contributors?post=29451"},{"taxonomy":"plugin_business_model","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_business_model?post=29451"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}