hdelima/rdstation-api

Simple RD Station wrapper

dev-main 2023-07-21 20:15 UTC

This package is auto-updated.

Last update: 2024-05-21 22:15:40 UTC


README

Required:

  • curl_init
  • curl_setopt

How to use:

use Hdelima\RDStation\RDStation;

# set .env RDSTATION_PUBLIC_KEY=token_here
$rdStation = new RDStation(env('RDSTATION_PUBLIC_KEY'));

# $rdStation->{verb}(url, $args = [], $timeout = 10);
# verbs: post, get, put, patch, delete

# return array
$rdStation->post('conversions', [
   'event_type' => 'CONVERSION', 	// optional default CONVERSION 
   'event_family' => 'CDP', 		// optional default CDP 
   'payload' => [
      'conversion_identifier' => 'CONVERSÃO TESTE', 	// required default CONVERSION
      'email' => 'email@domain.com', 	 	 	// required
      // oother fields...
   ]
]);

Running Test:

$ phpunit tests