Linux 软件免费装

Wordpress TextIt SDK

开发者 amber.au@gmail.com
更新时间 2014年12月24日 10:27
PHP版本: 3.1 及以上
WordPress版本: 4.1
版权: GPLv2 or later
版权网址: 版权信息

标签

sdk textit

下载

详情介绍:

How it works
  1. Create your TextIt account
  2. Go to your TextIt account page and enter {your wordpress url}/textit-webhook-receiver as your WebHook URL
  3. Paste the generated API token in the Wordpress TextIt SDK settings page and save changes
  4. Go to Settings > Permalinks and save to refresh the Wordpress rewrite rules
  5. Now you can use the textit_webhook_event hook in your custom plugin or theme to respond to TextIt webhook events, and WordpressTextItSDK::textItDo() to call the TextIt REST API
TextIt API Full documentation is available: https://textit.in/api/v1 Quick method reference: textItDo() To call the TextIt API, use WordpressTextItSDK::textItDo($method, $args, $http) $method - string - One of the TextIt API methods listed above $args - array - 2 dimensional array containing argument names and values. Details of accepted arguments in the TextIt documentation $http - string - Either GET or POST, depending on whether you want to list or add / modify data The return value will be either an array with a TextIt API response or an exception E.g. WordpressTextItSDK::textItDo( 'contacts', array(), 'GET' ) would return a list of contacts from your TextIt account textit_webhook_event To respond to TextIt webhook events (e.g. Incoming Messages, Outgoing Messages, Incoming Calls, Outgoing Calls, Relayer Alarms) use add_action( 'textit_webhook_event', 'my_custom_function', 2, 1 ) Your custom function should accept a single argument - $event - an array containing the data TextIt posted via the webhook

安装:

  1. Upload wp-textit-sdk to the /wp-content/plugins/ directory
  2. Activate the plugin through the 'Plugins' menu in WordPress