artistan / revive-xmlrpc
package of the library classes to provide XmlRpc routines for accessing revive ad servers
Installs: 15 018
Dependents: 0
Suggesters: 0
Security: 0
Stars: 9
Watchers: 2
Forks: 11
Open Issues: 1
Requires
- illuminate/support: 5.6.*
- phpxmlrpc/phpxmlrpc: 4.3.1
Requires (Dev)
- victorjonsson/markdowndocs: 1.3.*
README
remote procedure calls - RPC - is a basic API that has existed on Revive since it was OpenX Source. This is a basic update to that system and extracted into a package which can be used in virtually any Php Project to access your Revive server or manage multiple Revive servers. The response data is not exactly pretty for Ads Display, but hopefully I can come up with a version 3 that format the data into a more friendly format.
Revive AdServer xml api
extracted into a package and updated to use packages rather than pear
requires
- php-xml
uses
SETUP
composer
"require": { "artistan/revive-xmlrpc": "*" }
Using The API
Version 2 xml
these examples were tested in Laravel 5.6 Commands
configuration
loads definitions in this order each step will override/replace the previous step
- loads /Assets/Config/revive-xmlrpc.php (defaults)
- laravel style configs (if function config exists)
- constructor array settings (first param can be an array)
- constructor individual settings
laravel config/env
php artisan vendor:publish --provider=artistan/revive-xmlrpc
you can edit the config/revive-xmlrpc.php
file add these env variables to or .env files
RVRPC_HOST=ads.me.com RVRPC_BASEPATH=/api/v2/xmlrpc/ RVRPC_USERNAME=admin RVRPC_PASSWORD=~test~ RVRPC_PORT=0 RVRPC_SSL=1 RVRPC_TIMEOUT=15
use Artistan\ReviveXmlRpc\OpenAdsV2ApiXmlRpc; $rpc = new OpenAdsV2ApiXmlRpc(); $list = $rpc->getAgencyList();
custom config initialization
uses ./Assets/Config/revive-xmlrpc.php
for config if you do not provide it to the class.
use Artistan\ReviveXmlRpc\OpenAdsV2ApiXmlRpc; $config = [ 'host'=>'ads.me.com', 'basepath'=>'/www/api/v2/xmlrpc/', 'username'=>'admin', 'password'=>'~test~', 'port'=>0, 'ssl'=>true, 'timeout'=>15 ] $rpc = new OpenAdsV2ApiXmlRpc($config); $list = $rpc->getAgencyList();
full initialization
use Artistan\ReviveXmlRpc\OpenAdsV2ApiXmlRpc; $rpc = new OpenAdsV2ApiXmlRpc('ads.me.com', '/www/api/v2/xmlrpc/', 'admin', '~test~', 0, true, 15); $list = $rpc->getAgencyList();
API Version 1 xml
use Artistan\ReviveXmlRpc\OpenAdsV1ApiXmlRpc; $rpc = new OpenAdsV1ApiXmlRpc('ads.me.com', '/www/api/v1/xmlrpc/', 'admin', '~test~', 0, true, 15); $list = $rpc->getAgencyList();
Ad Display Retrieval xml
$rpc = new OpenAdsDisplayXmlRpc('ads.me.com', '/www/delivery/axmlrpc.php', 443, true, 15); $rpc->setRemoteInfo('remote_addr', 'chuck-dev'); $list = $rpc->view( /* string zone */ 'zone:1', /* int campaignid */ 0, /* string target */ '', /* string source */ '', /* 0|1 withText */ 0, /* array contect */ [], /* strubg charset */ '' ); var_dump(json_decode(json_encode($list),true));
Documentation Updates
PHP-Markdown-Documentation-Generator
./vendor/bin/phpdoc-md generate --ignore=test,examples src > api.md