parent
f0a5aa64b4
commit
a8869d0dd3
|
@ -24,13 +24,7 @@ Pensez à installer les dependences :)
|
||||||
L'intégralité des fonctionnalités de l'API Freebox (v3) sont implémentées :
|
L'intégralité des fonctionnalités de l'API Freebox (v3) sont implémentées :
|
||||||
|
|
||||||
- [AirMedia](docs/AirMedia)
|
- [AirMedia](docs/AirMedia)
|
||||||
- Call
|
- [Call](docs/Call)
|
||||||
- CallEntry
|
|
||||||
- ContactEntry
|
|
||||||
- ContactAddress
|
|
||||||
- ContactEmail
|
|
||||||
- ContactNumber
|
|
||||||
- ContactUrl
|
|
||||||
- FileSystem
|
- FileSystem
|
||||||
- FileSystem (Core)
|
- FileSystem (Core)
|
||||||
- FsTask
|
- FsTask
|
||||||
|
|
|
@ -1,19 +1,18 @@
|
||||||
|
|
||||||
# AirMedia
|
# AirMedia
|
||||||
|
|
||||||
## Services
|
## AirMedia
|
||||||
|
|
||||||
### AirMedia
|
|---|
|
||||||
|
| Namespace |`alphayax\freebox\api\v3\services\AirMedia\` |
|
||||||
|
| Classe | `AirMedia`|
|
||||||
|
|
||||||
Namespace `alphayax\freebox\api\v3\services\AirMedia\`
|
### Configuration
|
||||||
Classe `AirMedia`
|
|
||||||
|
|
||||||
#### Configuration
|
|
||||||
|
|
||||||
- getConfiguration : Récupère la configuration courrante
|
- getConfiguration : Récupère la configuration courrante
|
||||||
- setConfiguration : Définit la configuration
|
- setConfiguration : Définit la configuration
|
||||||
|
|
||||||
#### AirMedia Receivers
|
### AirMedia Receivers
|
||||||
|
|
||||||
- getAirMediaReceivers : Retourne la liste des AirMedia Receivers connectés a la freebox
|
- getAirMediaReceivers : Retourne la liste des AirMedia Receivers connectés a la freebox
|
||||||
- sendRequestToAirMediaReceiver : Envoie une Requete a un AirMedia Receiver donné
|
- sendRequestToAirMediaReceiver : Envoie une Requete a un AirMedia Receiver donné
|
|
@ -0,0 +1,86 @@
|
||||||
|
|
||||||
|
# Call
|
||||||
|
|
||||||
|
- CallEntry
|
||||||
|
- ContactEntry
|
||||||
|
- ContactEmail
|
||||||
|
- ContactAddress
|
||||||
|
- ContactNumber
|
||||||
|
- ContactUrl
|
||||||
|
|
||||||
|
## CallEntry
|
||||||
|
|
||||||
|
|---|
|
||||||
|
| Namespace |`alphayax\freebox\api\v3\services\Call` |
|
||||||
|
| Classe | `CallEntry`|
|
||||||
|
|
||||||
|
- getAll : Retourne tous les appels
|
||||||
|
- getFromId : Retourne un appel donné
|
||||||
|
- delete : Supprime un appel de la liste des appels
|
||||||
|
- deleteFromId : Supprime un appel de la liste des appels
|
||||||
|
- update : Met à jour les informations d'un appel
|
||||||
|
|
||||||
|
## ContactEntry
|
||||||
|
|
||||||
|
|---|
|
||||||
|
| Namespace |`alphayax\freebox\api\v3\services\Call` |
|
||||||
|
| Classe | `ContactEntry`|
|
||||||
|
|
||||||
|
- getAll : Retourne la liste de tous les contacts
|
||||||
|
- getFromId : Retourne un contact donné
|
||||||
|
- create : Ajoute une nouveau contact
|
||||||
|
- delete : Supprime un contact
|
||||||
|
- deleteFromId : Supprime un contact
|
||||||
|
- update : Met à jour les informations d'un contact
|
||||||
|
- getContactNumbersFromContactId : Retourne les numéros associés a un contact
|
||||||
|
- getContactAddressesFromContactId : Retourne les adresses associés a un contact
|
||||||
|
- getContactEmailsFromContactId : Retourne les emails associés a un contact
|
||||||
|
- getContactUrlsFromContactId : Retourne les URLs associés a un contact
|
||||||
|
|
||||||
|
### Contact Email
|
||||||
|
|
||||||
|
|---|
|
||||||
|
| Namespace |`alphayax\freebox\api\v3\services\Call` |
|
||||||
|
| Classe | `ContactEmail`|
|
||||||
|
|
||||||
|
- getFromId
|
||||||
|
- create
|
||||||
|
- delete
|
||||||
|
- deleteFromId
|
||||||
|
- update
|
||||||
|
|
||||||
|
### Contact Address
|
||||||
|
|
||||||
|
|---|
|
||||||
|
| Namespace |`alphayax\freebox\api\v3\services\Call` |
|
||||||
|
| Classe | `ContactAddress`|
|
||||||
|
|
||||||
|
- getFromId
|
||||||
|
- create
|
||||||
|
- delete
|
||||||
|
- deleteFromId
|
||||||
|
- update
|
||||||
|
|
||||||
|
### Contact Number
|
||||||
|
|
||||||
|
|---|
|
||||||
|
| Namespace |`alphayax\freebox\api\v3\services\Call` |
|
||||||
|
| Classe | `ContactNumber`|
|
||||||
|
|
||||||
|
- getFromId
|
||||||
|
- create
|
||||||
|
- delete
|
||||||
|
- deleteFromId
|
||||||
|
- update
|
||||||
|
|
||||||
|
### Contact URL
|
||||||
|
|
||||||
|
|---|
|
||||||
|
| Namespace |`alphayax\freebox\api\v3\services\Call` |
|
||||||
|
| Classe | `ContactUrl`|
|
||||||
|
|
||||||
|
- getFromId
|
||||||
|
- create
|
||||||
|
- delete
|
||||||
|
- deleteFromId
|
||||||
|
- update
|
|
@ -12,7 +12,7 @@ $CallService = new \alphayax\freebox\api\v3\services\Call\CallEntry( $App);
|
||||||
|
|
||||||
/// Get last 100 call entries
|
/// Get last 100 call entries
|
||||||
$CallEntries = $CallService->getAll();
|
$CallEntries = $CallService->getAll();
|
||||||
//print_r( $CallEntries);
|
print_r( $CallEntries);
|
||||||
|
|
||||||
/// Get a specific call entry
|
/// Get a specific call entry
|
||||||
$CallEntry = $CallService->getFromId( $CallEntries[0]->getId());
|
$CallEntry = $CallService->getFromId( $CallEntries[0]->getId());
|
||||||
|
|
|
@ -10,7 +10,7 @@ use alphayax\freebox\api\v3\models;
|
||||||
*/
|
*/
|
||||||
class CallEntry extends Service {
|
class CallEntry extends Service {
|
||||||
|
|
||||||
const API_CALL_LOG = '/api/v3/call/log/';
|
const API_CALL_LOG = '/api/v3/call/log/';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* List every calls
|
* List every calls
|
||||||
|
@ -21,12 +21,7 @@ class CallEntry extends Service {
|
||||||
$rest = $this->getAuthService( self::API_CALL_LOG);
|
$rest = $this->getAuthService( self::API_CALL_LOG);
|
||||||
$rest->GET();
|
$rest->GET();
|
||||||
|
|
||||||
$CallEntry_xs = $rest->getCurlResponse()['result'];
|
return $rest->getResultAsArray( models\Call\CallEntry::class);
|
||||||
$CallEntries = [];
|
|
||||||
foreach( $CallEntry_xs as $CallEntry_x) {
|
|
||||||
$CallEntries[] = new models\Call\CallEntry( $CallEntry_x);
|
|
||||||
}
|
|
||||||
return $CallEntries;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -38,7 +33,7 @@ class CallEntry extends Service {
|
||||||
$rest = $this->getAuthService( self::API_CALL_LOG . $CallId);
|
$rest = $this->getAuthService( self::API_CALL_LOG . $CallId);
|
||||||
$rest->GET();
|
$rest->GET();
|
||||||
|
|
||||||
return new models\Call\CallEntry( $rest->getCurlResponse()['result']);
|
return $rest->getResult( models\Call\CallEntry::class);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -59,7 +54,7 @@ class CallEntry extends Service {
|
||||||
$rest = $this->getAuthService( self::API_CALL_LOG . $CallId);
|
$rest = $this->getAuthService( self::API_CALL_LOG . $CallId);
|
||||||
$rest->DELETE();
|
$rest->DELETE();
|
||||||
|
|
||||||
return (bool) $rest->getCurlResponse()['success'];
|
return $rest->getSuccess();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -69,9 +64,9 @@ class CallEntry extends Service {
|
||||||
*/
|
*/
|
||||||
public function update( models\Call\CallEntry $CallEntry){
|
public function update( models\Call\CallEntry $CallEntry){
|
||||||
$rest = $this->getAuthService( self::API_CALL_LOG . $CallEntry->getId());
|
$rest = $this->getAuthService( self::API_CALL_LOG . $CallEntry->getId());
|
||||||
$rest->PUT( $CallEntry->toArray());
|
$rest->PUT( $CallEntry);
|
||||||
|
|
||||||
return new models\Call\CallEntry( $rest->getCurlResponse()['result']);
|
return $rest->getResult( models\Call\CallEntry::class);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -20,7 +20,7 @@ class ContactAddress extends Service {
|
||||||
$rest = $this->getAuthService( self::API_ADDRESS . $contactAddressId);
|
$rest = $this->getAuthService( self::API_ADDRESS . $contactAddressId);
|
||||||
$rest->GET();
|
$rest->GET();
|
||||||
|
|
||||||
return new models\Call\ContactAddress ( $rest->getCurlResponse()['result']);
|
return $rest->getResult( models\Call\ContactAddress::class);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -29,9 +29,9 @@ class ContactAddress extends Service {
|
||||||
*/
|
*/
|
||||||
public function create( models\Call\ContactAddress $contactAddress){
|
public function create( models\Call\ContactAddress $contactAddress){
|
||||||
$rest = $this->getAuthService( self::API_ADDRESS);
|
$rest = $this->getAuthService( self::API_ADDRESS);
|
||||||
$rest->POST( $contactAddress->toArray());
|
$rest->POST( $contactAddress);
|
||||||
|
|
||||||
return new models\Call\ContactAddress ( $rest->getCurlResponse()['result']);
|
return $rest->getResult( models\Call\ContactAddress::class);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -50,7 +50,7 @@ class ContactAddress extends Service {
|
||||||
$rest = $this->getAuthService( self::API_ADDRESS . $contactAddressId);
|
$rest = $this->getAuthService( self::API_ADDRESS . $contactAddressId);
|
||||||
$rest->DELETE();
|
$rest->DELETE();
|
||||||
|
|
||||||
return (bool) $rest->getCurlResponse()['success'];
|
return $rest->getSuccess();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -59,9 +59,9 @@ class ContactAddress extends Service {
|
||||||
*/
|
*/
|
||||||
public function update( models\Call\ContactAddress $contactAddress){
|
public function update( models\Call\ContactAddress $contactAddress){
|
||||||
$rest = $this->getAuthService( self::API_ADDRESS . $contactAddress->getId());
|
$rest = $this->getAuthService( self::API_ADDRESS . $contactAddress->getId());
|
||||||
$rest->PUT( $contactAddress->toArray());
|
$rest->PUT( $contactAddress);
|
||||||
|
|
||||||
return new models\Call\ContactAddress( $rest->getCurlResponse()['result']);
|
return $rest->getResult( models\Call\ContactAddress::class);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -20,7 +20,7 @@ class ContactEmail extends Service {
|
||||||
$rest = $this->getAuthService( self::API_EMAIL . $ContactEmailId);
|
$rest = $this->getAuthService( self::API_EMAIL . $ContactEmailId);
|
||||||
$rest->GET();
|
$rest->GET();
|
||||||
|
|
||||||
return new models\Call\ContactEmail( $rest->getCurlResponse()['result']);
|
return $rest->getResult( models\Call\ContactEmail::class);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -29,9 +29,9 @@ class ContactEmail extends Service {
|
||||||
*/
|
*/
|
||||||
public function create( models\Call\ContactEmail $ContactEmail){
|
public function create( models\Call\ContactEmail $ContactEmail){
|
||||||
$rest = $this->getAuthService( self::API_EMAIL);
|
$rest = $this->getAuthService( self::API_EMAIL);
|
||||||
$rest->POST( $ContactEmail->toArray());
|
$rest->POST( $ContactEmail);
|
||||||
|
|
||||||
return new models\Call\ContactEmail( $rest->getCurlResponse()['result']);
|
return $rest->getResult( models\Call\ContactEmail::class);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -50,7 +50,7 @@ class ContactEmail extends Service {
|
||||||
$rest = $this->getAuthService( self::API_EMAIL . $ContactEmailId);
|
$rest = $this->getAuthService( self::API_EMAIL . $ContactEmailId);
|
||||||
$rest->DELETE();
|
$rest->DELETE();
|
||||||
|
|
||||||
return (bool) $rest->getCurlResponse()['success'];
|
return $rest->getSuccess();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -59,9 +59,9 @@ class ContactEmail extends Service {
|
||||||
*/
|
*/
|
||||||
public function update( models\Call\ContactEmail $ContactEmail){
|
public function update( models\Call\ContactEmail $ContactEmail){
|
||||||
$rest = $this->getAuthService( self::API_EMAIL . $ContactEmail->getId());
|
$rest = $this->getAuthService( self::API_EMAIL . $ContactEmail->getId());
|
||||||
$rest->PUT( $ContactEmail->toArray());
|
$rest->PUT( $ContactEmail);
|
||||||
|
|
||||||
return new models\Call\ContactEmail( $rest->getCurlResponse()['result']);
|
return $rest->getResult( models\Call\ContactEmail::class);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -24,12 +24,7 @@ class ContactEntry extends Service {
|
||||||
$rest = $this->getAuthService( self::API_CONTACT);
|
$rest = $this->getAuthService( self::API_CONTACT);
|
||||||
$rest->GET();
|
$rest->GET();
|
||||||
|
|
||||||
$ContactEntry_xs = $rest->getCurlResponse()['result'];
|
return $rest->getResultAsArray( models\Call\ContactEntry::class);
|
||||||
$ContactEntries = [];
|
|
||||||
foreach( $ContactEntry_xs as $ContactEntry_x) {
|
|
||||||
$ContactEntries[] = new models\Call\ContactEntry( $ContactEntry_x);
|
|
||||||
}
|
|
||||||
return $ContactEntries;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -40,7 +35,7 @@ class ContactEntry extends Service {
|
||||||
$rest = $this->getAuthService( self::API_CONTACT . $ContactEntryId);
|
$rest = $this->getAuthService( self::API_CONTACT . $ContactEntryId);
|
||||||
$rest->GET();
|
$rest->GET();
|
||||||
|
|
||||||
return new models\Call\ContactEntry( $rest->getCurlResponse()['result']);
|
return $rest->getResult( models\Call\ContactEntry::class);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -49,9 +44,9 @@ class ContactEntry extends Service {
|
||||||
*/
|
*/
|
||||||
public function create( models\Call\ContactEntry $ContactEntry){
|
public function create( models\Call\ContactEntry $ContactEntry){
|
||||||
$rest = $this->getAuthService( self::API_CONTACT);
|
$rest = $this->getAuthService( self::API_CONTACT);
|
||||||
$rest->POST( $ContactEntry->toArray());
|
$rest->POST( $ContactEntry);
|
||||||
|
|
||||||
return new models\Call\ContactEntry( $rest->getCurlResponse()['result']);
|
return $rest->getResult( models\Call\ContactEntry::class);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -60,9 +55,9 @@ class ContactEntry extends Service {
|
||||||
*/
|
*/
|
||||||
public function update( models\Call\ContactEntry $ContactEntry){
|
public function update( models\Call\ContactEntry $ContactEntry){
|
||||||
$rest = $this->getAuthService( self::API_CONTACT . $ContactEntry->getId());
|
$rest = $this->getAuthService( self::API_CONTACT . $ContactEntry->getId());
|
||||||
$rest->PUT( $ContactEntry->toArray());
|
$rest->PUT( $ContactEntry);
|
||||||
|
|
||||||
return new models\Call\ContactEntry( $rest->getCurlResponse()['result']);
|
return $rest->getResult( models\Call\ContactEntry::class);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -81,7 +76,7 @@ class ContactEntry extends Service {
|
||||||
$rest = $this->getAuthService( self::API_CONTACT);
|
$rest = $this->getAuthService( self::API_CONTACT);
|
||||||
$rest->DELETE( $ContactEntryId);
|
$rest->DELETE( $ContactEntryId);
|
||||||
|
|
||||||
return $rest->getCurlResponse()['success'];
|
return $rest->getSuccess();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -93,12 +88,7 @@ class ContactEntry extends Service {
|
||||||
$rest = $this->getAuthService( $service);
|
$rest = $this->getAuthService( $service);
|
||||||
$rest->GET();
|
$rest->GET();
|
||||||
|
|
||||||
$ContactNumber_xs = @$rest->getCurlResponse()['result'] ?: [];
|
return $rest->getResultAsArray( models\Call\ContactNumber::class);
|
||||||
$ContactNumbers = [];
|
|
||||||
foreach( $ContactNumber_xs as $ContactNumber_x) {
|
|
||||||
$ContactNumbers[] = new models\Call\ContactNumber( $ContactNumber_x);
|
|
||||||
}
|
|
||||||
return $ContactNumbers;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -110,12 +100,7 @@ class ContactEntry extends Service {
|
||||||
$rest = $this->getAuthService( $service);
|
$rest = $this->getAuthService( $service);
|
||||||
$rest->GET();
|
$rest->GET();
|
||||||
|
|
||||||
$ContactAddress_xs = @$rest->getCurlResponse()['result'] ?: [];
|
return $rest->getResultAsArray( models\Call\ContactAddress::class);
|
||||||
$ContactAddresses = [];
|
|
||||||
foreach( $ContactAddress_xs as $ContactAddress_x) {
|
|
||||||
$ContactAddresses[] = new models\Call\ContactAddress( $ContactAddress_x);
|
|
||||||
}
|
|
||||||
return $ContactAddresses;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -127,12 +112,7 @@ class ContactEntry extends Service {
|
||||||
$rest = $this->getAuthService( $service);
|
$rest = $this->getAuthService( $service);
|
||||||
$rest->GET();
|
$rest->GET();
|
||||||
|
|
||||||
$ContactEmail_xs = @$rest->getCurlResponse()['result'] ?: [];
|
return $rest->getResultAsArray( models\Call\ContactEmail::class);
|
||||||
$ContactEmails = [];
|
|
||||||
foreach( $ContactEmail_xs as $ContactEmail_x) {
|
|
||||||
$ContactEmails[] = new models\Call\ContactEmail( $ContactEmail_x);
|
|
||||||
}
|
|
||||||
return $ContactEmails;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -144,12 +124,7 @@ class ContactEntry extends Service {
|
||||||
$rest = $this->getAuthService( $service);
|
$rest = $this->getAuthService( $service);
|
||||||
$rest->GET();
|
$rest->GET();
|
||||||
|
|
||||||
$ContactUrl_xs = @$rest->getCurlResponse()['result'] ?: [];
|
return $rest->getResultAsArray( models\Call\ContactUrl::class);
|
||||||
$ContactUrls = [];
|
|
||||||
foreach( $ContactUrl_xs as $ContactUrl_x) {
|
|
||||||
$ContactUrls[] = new models\Call\ContactUrl( $ContactUrl_x);
|
|
||||||
}
|
|
||||||
return $ContactUrls;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -20,7 +20,7 @@ class ContactNumber extends Service {
|
||||||
$rest = $this->getAuthService( self::API_NUMBER . $ContactNumberId);
|
$rest = $this->getAuthService( self::API_NUMBER . $ContactNumberId);
|
||||||
$rest->GET();
|
$rest->GET();
|
||||||
|
|
||||||
return new models\Call\ContactNumber( $rest->getCurlResponse()['result']);
|
return $rest->getResult( models\Call\ContactNumber::class);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -29,9 +29,9 @@ class ContactNumber extends Service {
|
||||||
*/
|
*/
|
||||||
public function create( models\Call\ContactNumber $ContactNumber){
|
public function create( models\Call\ContactNumber $ContactNumber){
|
||||||
$rest = $this->getAuthService( self::API_NUMBER);
|
$rest = $this->getAuthService( self::API_NUMBER);
|
||||||
$rest->POST( $ContactNumber->toArray());
|
$rest->POST( $ContactNumber);
|
||||||
|
|
||||||
return new models\Call\ContactNumber( $rest->getCurlResponse()['result']);
|
return $rest->getResult( models\Call\ContactNumber::class);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -50,7 +50,7 @@ class ContactNumber extends Service {
|
||||||
$rest = $this->getAuthService( self::API_NUMBER . $ContactNumberId);
|
$rest = $this->getAuthService( self::API_NUMBER . $ContactNumberId);
|
||||||
$rest->DELETE();
|
$rest->DELETE();
|
||||||
|
|
||||||
return (bool) $rest->getCurlResponse()['success'];
|
return $rest->getSuccess();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -59,9 +59,9 @@ class ContactNumber extends Service {
|
||||||
*/
|
*/
|
||||||
public function update( models\Call\ContactNumber $ContactNumber){
|
public function update( models\Call\ContactNumber $ContactNumber){
|
||||||
$rest = $this->getAuthService( self::API_NUMBER . $ContactNumber->getId());
|
$rest = $this->getAuthService( self::API_NUMBER . $ContactNumber->getId());
|
||||||
$rest->PUT( $ContactNumber->toArray());
|
$rest->PUT( $ContactNumber);
|
||||||
|
|
||||||
return new models\Call\ContactNumber( $rest->getCurlResponse()['result']);
|
return $rest->getResult( models\Call\ContactNumber::class);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -20,7 +20,7 @@ class ContactUrl extends Service {
|
||||||
$rest = $this->getAuthService( self::API_URL . $ContactUrlId);
|
$rest = $this->getAuthService( self::API_URL . $ContactUrlId);
|
||||||
$rest->GET();
|
$rest->GET();
|
||||||
|
|
||||||
return new models\Call\ContactUrl( $rest->getCurlResponse()['result']);
|
return $rest->getResult( models\Call\ContactUrl::class);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -29,9 +29,9 @@ class ContactUrl extends Service {
|
||||||
*/
|
*/
|
||||||
public function create( models\Call\ContactUrl $ContactUrl){
|
public function create( models\Call\ContactUrl $ContactUrl){
|
||||||
$rest = $this->getAuthService( self::API_URL);
|
$rest = $this->getAuthService( self::API_URL);
|
||||||
$rest->POST( $ContactUrl->toArray());
|
$rest->POST( $ContactUrl);
|
||||||
|
|
||||||
return new models\Call\ContactUrl( $rest->getCurlResponse()['result']);
|
return $rest->getResult( models\Call\ContactUrl::class);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -50,7 +50,7 @@ class ContactUrl extends Service {
|
||||||
$rest = $this->getAuthService( self::API_URL . $ContactUrlId);
|
$rest = $this->getAuthService( self::API_URL . $ContactUrlId);
|
||||||
$rest->DELETE();
|
$rest->DELETE();
|
||||||
|
|
||||||
return (bool) $rest->getCurlResponse()['success'];
|
return $rest->getSuccess();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -59,9 +59,9 @@ class ContactUrl extends Service {
|
||||||
*/
|
*/
|
||||||
public function update( models\Call\ContactUrl $ContactUrl){
|
public function update( models\Call\ContactUrl $ContactUrl){
|
||||||
$rest = $this->getAuthService( self::API_URL . $ContactUrl->getId());
|
$rest = $this->getAuthService( self::API_URL . $ContactUrl->getId());
|
||||||
$rest->PUT( $ContactUrl->toArray());
|
$rest->PUT( $ContactUrl);
|
||||||
|
|
||||||
return new models\Call\ContactUrl( $rest->getCurlResponse()['result']);
|
return $rest->getResult( models\Call\ContactUrl::class);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue