category
5 Methoden verfügbar
Keine Methoden gefunden für ""
getSubCategories
Rückgabewert
| Feld | Typ |
|---|---|
| item | EvalancheCategoryInformation |
PHP Implementierung anzeigen
<?php
/**
* getSubCategories
* Service: category
* @return ArrayOfEvalancheCategoryInformation
* Felder:
* - item (EvalancheCategoryInformation)
*/
$wsdlUrl = 'https://scnem.com/soap.php/wsdl/category';
$username = 'DEIN_USERNAME';
$password = 'DEIN_PASSWORD';
$options = [
'login' => $username,
'password' => $password,
'trace' => true,
'exceptions' => true,
];
try {
$client = new SoapClient($wsdlUrl, $options);
// Parameter
$params = [
'category_id' => 0, // int
];
$result = $client->getSubCategories($params);
// Rückgabewert: ArrayOfEvalancheCategoryInformation
// $result->item (EvalancheCategoryInformation)
print_r($result);
} catch (SoapFault $e) {
echo 'SOAP Fehler: ' . $e->getMessage();
}
XML SOAP Request anzeigen
<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
<SOAP-ENV:Body>
<tns:getSubCategories xmlns:tns="https://scnem.com/soap.php/wsdl/category">
<category_id>0</category_id> <!-- int, optional -->
</tns:getSubCategories>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
HTTP Header:
Content-Type: text/xml; charset=utf-8
SOAPAction: "https://scnem.com/soap.php/wsdl/category#getSubCategories"
Authorization: Basic {base64(username:password)}
Creates a category with the given name
Rückgabewert
| Feld | Typ |
|---|---|
| id | int |
| name | string |
| parent_id | int |
PHP Implementierung anzeigen
<?php
/**
* Creates a category with the given name
* Service: category
* @return EvalancheCategoryInformation
* Felder:
* - id (int)
* - name (string)
* - parent_id (int)
*/
$wsdlUrl = 'https://scnem.com/soap.php/wsdl/category';
$username = 'DEIN_USERNAME';
$password = 'DEIN_PASSWORD';
$options = [
'login' => $username,
'password' => $password,
'trace' => true,
'exceptions' => true,
];
try {
$client = new SoapClient($wsdlUrl, $options);
// Parameter
$params = [
'name' => '', // string (required)
'parent_category_id' => 0, // int
];
$result = $client->create($params);
// Rückgabewert: EvalancheCategoryInformation
// $result->id (int)
// $result->name (string)
// $result->parent_id (int)
print_r($result);
} catch (SoapFault $e) {
echo 'SOAP Fehler: ' . $e->getMessage();
}
XML SOAP Request anzeigen
<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
<SOAP-ENV:Body>
<tns:create xmlns:tns="https://scnem.com/soap.php/wsdl/category">
<name></name> <!-- string, required -->
<parent_category_id>0</parent_category_id> <!-- int, optional -->
</tns:create>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
HTTP Header:
Content-Type: text/xml; charset=utf-8
SOAPAction: "https://scnem.com/soap.php/wsdl/category#create"
Authorization: Basic {base64(username:password)}
Deletes a category with the given id
Rückgabewert
PHP Implementierung anzeigen
<?php
/**
* Deletes a category with the given id
* Service: category
* @return boolean
*/
$wsdlUrl = 'https://scnem.com/soap.php/wsdl/category';
$username = 'DEIN_USERNAME';
$password = 'DEIN_PASSWORD';
$options = [
'login' => $username,
'password' => $password,
'trace' => true,
'exceptions' => true,
];
try {
$client = new SoapClient($wsdlUrl, $options);
// Parameter
$params = [
'category_id' => 0, // int (required)
];
$result = $client->delete($params);
print_r($result);
} catch (SoapFault $e) {
echo 'SOAP Fehler: ' . $e->getMessage();
}
XML SOAP Request anzeigen
<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
<SOAP-ENV:Body>
<tns:delete xmlns:tns="https://scnem.com/soap.php/wsdl/category">
<category_id>0</category_id> <!-- int, required -->
</tns:delete>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
HTTP Header:
Content-Type: text/xml; charset=utf-8
SOAPAction: "https://scnem.com/soap.php/wsdl/category#delete"
Authorization: Basic {base64(username:password)}
Retrieve the details of the category with the given id
Rückgabewert
| Feld | Typ |
|---|---|
| id | int |
| name | string |
| parent_id | int |
PHP Implementierung anzeigen
<?php
/**
* Retrieve the details of the category with the given id
* Service: category
* @return EvalancheCategoryInformation
* Felder:
* - id (int)
* - name (string)
* - parent_id (int)
*/
$wsdlUrl = 'https://scnem.com/soap.php/wsdl/category';
$username = 'DEIN_USERNAME';
$password = 'DEIN_PASSWORD';
$options = [
'login' => $username,
'password' => $password,
'trace' => true,
'exceptions' => true,
];
try {
$client = new SoapClient($wsdlUrl, $options);
// Parameter
$params = [
'category_id' => 0, // int (required)
];
$result = $client->getDetails($params);
// Rückgabewert: EvalancheCategoryInformation
// $result->id (int)
// $result->name (string)
// $result->parent_id (int)
print_r($result);
} catch (SoapFault $e) {
echo 'SOAP Fehler: ' . $e->getMessage();
}
XML SOAP Request anzeigen
<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
<SOAP-ENV:Body>
<tns:getDetails xmlns:tns="https://scnem.com/soap.php/wsdl/category">
<category_id>0</category_id> <!-- int, required -->
</tns:getDetails>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
HTTP Header:
Content-Type: text/xml; charset=utf-8
SOAPAction: "https://scnem.com/soap.php/wsdl/category#getDetails"
Authorization: Basic {base64(username:password)}
Test if the API is available and used credentials are valid. The result's property `random_message` has absolutely *no* relevance as the values are randomly taken from http://whatthecommit.com
Rückgabewert
| Feld | Typ |
|---|---|
| status | string |
| random_message | string |
PHP Implementierung anzeigen
<?php
/**
* Test if the API is available and used credentials are valid. The result's property `random_message` has absolutely *no* relevance as the values are randomly taken from http://whatthecommit.com
* Service: category
* @return IsAliveResult
* Felder:
* - status (string)
* - random_message (string)
*/
$wsdlUrl = 'https://scnem.com/soap.php/wsdl/category';
$username = 'DEIN_USERNAME';
$password = 'DEIN_PASSWORD';
$options = [
'login' => $username,
'password' => $password,
'trace' => true,
'exceptions' => true,
];
try {
$client = new SoapClient($wsdlUrl, $options);
// Parameter
$params = [
'isAliveResult' => '', // tns:IsAliveResult (required)
];
$result = $client->isAlive($params);
// Rückgabewert: IsAliveResult
// $result->status (string)
// $result->random_message (string)
print_r($result);
} catch (SoapFault $e) {
echo 'SOAP Fehler: ' . $e->getMessage();
}
XML SOAP Request anzeigen
<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
<SOAP-ENV:Body>
<tns:isAlive xmlns:tns="https://scnem.com/soap.php/wsdl/category">
<isAliveResult></isAliveResult> <!-- tns:IsAliveResult, required -->
</tns:isAlive>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
HTTP Header:
Content-Type: text/xml; charset=utf-8
SOAPAction: "https://scnem.com/soap.php/wsdl/category#isAlive"
Authorization: Basic {base64(username:password)}