Loading...
 
Skip to main content

History: Webservice Registration

Source of version: 8 (current)

Copy to clipboard
            !Webservice Registration
{DIV(float=right,width="200px")}^::Related Topics::
*((PluginWebservice|Webservice Plugin)) 
*((dev:Administration|Bugs and Wishes))^{DIV}
;__Overview__: With this feature you can pull data from any JSON or SOAP enabled service, for example from Yahoo:
;__To access__: Click the __Webservice Registration__ icon {icon name="admin_webservices" rotate="270" size="2" title="Image may vary depending on the icon set in use."} on the ((Admin Panels|Admin Panel)) %%% or %%% Access __http://example.org/tiki-admin.php?page=webservices__ 
;__Note__: ''This feature is mainly useful for the ((PluginWebservice|Webservice Plugin))''
~tc~ Preference documentation generated from https://sourceforge.net/p/tikiwiki/code/HEAD/tree/trunk/lib/prefs/ ~/tc~
~tc~ To update documentation see https://dev.tiki.org/How-to-get-commit-access ~/tc~
{PREFDOC(tab="webservices" img="6:499")/}

!!Example
Webservice returning JSON.
#In the "url" field enter:
+{CODE()}http://luciash.eu/paypal_balance_conversion_in_json.php?amount_in=%amount_in%&currency_in=%currency_in%&currency_out=%currency_out%{CODE}
#In the "Type" dropdown leave "REST" selected.
#In the "Parameters" textarea fill in the parameters as:
+{CODE()}%amount_in%
%currency_in%
%currency_out%
{CODE}
#Click "Lookup" button.
Now you can test the parameters.
You should see 3 new fields appear where you can enter the values to test.
Enter:
#amount_in: 2
#currency_in: EUR
#currency_out: USD
The returned data under the "Response Information" will be something like this:
{CODE()}Array
(
    [amount_out_formatted] => 2.49 
    [from_currency_code] => USD
    [exchange_rate_formatted] => 1.24567
)
{CODE}
When tested you can save the Webservice under a name, e.g. paypalexchangerate (cannot contain anything else than letters) by clicking the "Register" button. Now you have registered Webservice called "paypalexchangerate" which you can use in ((PluginWebservice)).