{"id":18320220,"url":"https://github.com/gedex/wp-simperium","last_synced_at":"2025-04-09T14:23:59.846Z","repository":{"id":16927589,"uuid":"19689122","full_name":"gedex/wp-simperium","owner":"gedex","description":"This plugin contains easy-to-use API that uses WP HTTP API to send data to Simperium","archived":false,"fork":false,"pushed_at":"2014-05-18T04:48:05.000Z","size":176,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-15T08:24:32.762Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"http://wordpress.org/plugins/simperium/","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/gedex.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-05-12T07:08:11.000Z","updated_at":"2017-08-31T14:06:11.000Z","dependencies_parsed_at":"2022-09-24T02:42:50.148Z","dependency_job_id":null,"html_url":"https://github.com/gedex/wp-simperium","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gedex%2Fwp-simperium","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gedex%2Fwp-simperium/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gedex%2Fwp-simperium/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gedex%2Fwp-simperium/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/gedex","download_url":"https://codeload.github.com/gedex/wp-simperium/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248054356,"owners_count":21039984,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-05T18:15:34.911Z","updated_at":"2025-04-09T14:23:59.800Z","avatar_url":"https://github.com/gedex.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003c!-- DO NOT EDIT THIS FILE; it is auto-generated from readme.txt --\u003e\n# Simperium\n\nThis plugin contains easy-to-use API that uses WP HTTP API to send data to Simperium.\n\n**Contributors:** [akeda](http://profiles.wordpress.org/akeda)  \n**Tags:** [Simperium](http://wordpress.org/plugins/tags/Simperium), [log](http://wordpress.org/plugins/tags/log), [logger](http://wordpress.org/plugins/tags/logger), [post-processing](http://wordpress.org/plugins/tags/post-processing), [event](http://wordpress.org/plugins/tags/event), [data](http://wordpress.org/plugins/tags/data)  \n**Requires at least:** 3.6  \n**Tested up to:** 3.9  \n**Stable tag:** trunk (master)  \n**License:** [GPLv2 or later](http://www.gnu.org/licenses/gpl-2.0.html)  \n\n## Description ##\n\nThis plugin is intended for developer to send data to Simperium. Followings are use cases in which this plugin might come in handy:\n\n1. 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.\n1. 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).\n\n**How to use it**\n\nOnce this plugin is installed and activated, you can send data to Simperium in following ways:\n\n1. Via action hook: `do_action( 'simperium_send_data', $bucket, $data )` or `do_action( 'simperium_send_buffered_data', $bucket, $data )`.\n   The first hook, will send the `$data` immediately, while the later will send the data to buffer and will send all\n   buffered data to Simperium at once after calling `do_action( 'simperium_flush_buffer', $bucket )`. If `$bucket` arg is provided, it only flushes buffered data that's targetted to `$bucket`.\n2. Via helper method: `WP_Simperium::send_data( $bucket, $data )` or `WP_Simperium::send_buffered_data( $bucket, $data )`.\n   To flush buffer, you call `WP_Simperium::flush_buffer( $bucket )`. Again, `$bucket` arg is optional.\n\nThe value of `$data` MUST BE in key-value array structure as nested structure is not supported by Simperium.\n\nBefore using the action hooks or helper methods, you need to supply Simperium app credentials via `simperium_config` filter, for example:\n\n```\nadd_filter( 'simperium_config', function() {\n\treturn array(\n\t\t'app_id'  =\u003e 'YOUR_APP_ID',\n\t\t'api_key' =\u003e 'YOUR_API_KEY',\n\t)\n} );\n```\n\nIn addition to `app_id` and `api_key` you can pass `username` and/or `access_token` to the array config. If `access_token` is omitted, the plugin will request `access_token` from Simperium with provided `username` (if exists) or `get_bloginfo( 'admin_email' )` and store the info in option. Subsequent calls will read `access_token` information from option, but can be bypassed by providing `access_token` in array config. It's preferred to supply your own `access_token` or `username` that hasn't\nregistered yet. Please keep in mind that token has 30 days life span. If you're using `access_token` that's automatically retrieved by the plugin, you don't need to worry as scheduled event will refresh the token per 29 days.\n\n**Sender Examples**\n\nI've created [sender examples plugin](https://github.com/gedex/wp-simperium-sender-examples) that you can use as a starting point, though it will run without any customization. Currently it has following features:\n\n* Send post data once post status is transitioned to public.\n* Send new comment.\n* More will come later..\n\n**Consumer Examples**\n\nI'm working to provide listener apps, written in PHP (stay tuned!), for now you can check [Simperium examples](https://simperium.com/samples/) and their awesome libraries.\n\n**Contributing**\n\n* Development of this plugin is done on [GitHub](https://github.com/gedex/wp-simperium). Pull requests are always welcome.\n* For **Sender** apps feedback, please check its [GitHub repo](https://github.com/gedex/wp-simperium-sender-examples).\n* For **Consumer** apps feedback, please stay tuned!\n\n## Installation ##\n\n1. Upload **Simperium** plugin to your blog's `wp-content/plugins/` directory and activate.\n1. Hook into `simperium_config` filter either as drop-in plugin or in your theme's `functions.php`\n\n## FAQ ##\n\n### Does the plugin provides API to retrieve entity from Simperium ###\nNo. 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 [client libraries](URL) that expose get/update/delete data, you better use that.\n\n\n## Changelog ##\n\n### 0.1.0 ###\nInitial release\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgedex%2Fwp-simperium","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgedex%2Fwp-simperium","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgedex%2Fwp-simperium/lists"}