OVH Community, votre nouvel espace communautaire.

SOAPI - overquotaInfo et overquotaInfoStruct


BastienFan
03/02/2010, 00h21
Merci beaucoup, je vais testé cette solution

Anthony C
01/02/2010, 16h00
Voila la bonne syntaxe à utiliser: quota[0]->month; ?>

quota est un tableau d'objet, donc tu dois lui retourner deux paramètres.
Ce que tu peux faire, c'est mettre en place une boucle for qui va lister
les différents lignes du tableau quota.

Anthony C wrote:
> Autant pour moi, je pensais qu'il s'agissait d'un tableau d'objet donc
> ca aurait cette syntaxe, la c'est pas ca. Je vérifie et reviens vers toi.
>
> Anthony C wrote:
>> Pour afficher ce genre d'information, tu dois utiliser la syntaxe
>> suivante:
>> echo $result[0] -> month;
>>
>> BastienFan wrote:
>>> Bonjour,
>>>
>>> J'utilise la méthode suivante de SOAPI :
>>>
>>> overquotaInfo
>>>
>>> domain : du domaine
>>> overquotaInfoStruct[] quota : the quota informations list
>>> capacities : capacities in bytes
>>> order : traffic ordered in bytes
>>>
>>> Pour récupérer les valeurs directes comme 'domain' ou 'capacities" ça
>>> marche avec le code suivant :
>>>
>>> //overquotaInfo
>>> $result = $soap->overquotaInfo($session, "DOMAINE");
>>> echo $result->{'domain'}; echo $result->{'capacities'};
>>> Seulement je voudrais aussi récupérer les valeurs contenues dans le
>>> "overquotaInfoStruct[] quota " comme 'month' et 'traffic' mais je n'y
>>> arrive pas.
>>>
>>> struct overquotaInfoStruct : Un overquota
>>> stringmonth : the month date like YYYY-MM
>>> inttraffic : the traffic in bytes
>>> inthits : the number of hits
>>>
>>> Quelle serait la syntaxe à respecter pour y parvenir ?
>>>
>>> Merci.
>>>
>>>


Anthony C
01/02/2010, 15h50
Autant pour moi, je pensais qu'il s'agissait d'un tableau d'objet donc
ca aurait cette syntaxe, la c'est pas ca. Je vérifie et reviens vers toi.

Anthony C wrote:
> Pour afficher ce genre d'information, tu dois utiliser la syntaxe suivante:
> echo $result[0] -> month;
>
> BastienFan wrote:
>> Bonjour,
>>
>> J'utilise la méthode suivante de SOAPI :
>>
>> overquotaInfo
>>
>> domain : du domaine
>> overquotaInfoStruct[] quota : the quota informations list
>> capacities : capacities in bytes
>> order : traffic ordered in bytes
>>
>> Pour récupérer les valeurs directes comme 'domain' ou 'capacities" ça
>> marche avec le code suivant :
>>
>> //overquotaInfo
>> $result = $soap->overquotaInfo($session, "DOMAINE");
>> echo $result->{'domain'}; echo $result->{'capacities'};
>> Seulement je voudrais aussi récupérer les valeurs contenues dans le
>> "overquotaInfoStruct[] quota " comme 'month' et 'traffic' mais je n'y
>> arrive pas.
>>
>> struct overquotaInfoStruct : Un overquota
>> stringmonth : the month date like YYYY-MM
>> inttraffic : the traffic in bytes
>> inthits : the number of hits
>>
>> Quelle serait la syntaxe à respecter pour y parvenir ?
>>
>> Merci.
>>
>>


Anthony C
01/02/2010, 15h36
Pour afficher ce genre d'information, tu dois utiliser la syntaxe suivante:
echo $result[0] -> month;

BastienFan wrote:
> Bonjour,
>
> J'utilise la méthode suivante de SOAPI :
>
> overquotaInfo
>
> domain : du domaine
> overquotaInfoStruct[] quota : the quota informations list
> capacities : capacities in bytes
> order : traffic ordered in bytes
>
> Pour récupérer les valeurs directes comme 'domain' ou 'capacities" ça
> marche avec le code suivant :
>
> //overquotaInfo
> $result = $soap->overquotaInfo($session, "DOMAINE");
> echo $result->{'domain'};
> echo $result->{'capacities'};
>
> Seulement je voudrais aussi récupérer les valeurs contenues dans le
> "overquotaInfoStruct[] quota " comme 'month' et 'traffic' mais je n'y
> arrive pas.
>
> struct overquotaInfoStruct : Un overquota
> stringmonth : the month date like YYYY-MM
> inttraffic : the traffic in bytes
> inthits : the number of hits
>
> Quelle serait la syntaxe à respecter pour y parvenir ?
>
> Merci.
>
>


lythom
01/02/2010, 12h17
UP !

Je cherche aussi à savoir la syntaxe exact pour récupérer les résultats dans les structures notament pour "struct telephonyCallStruct".

Merci de nous aider !

BastienFan
19/01/2010, 09h49
Bonjour,

J'utilise la méthode suivante de SOAPI :

overquotaInfo

http://www.ovh.com/soapi/fr/?method=overquotaInfo

domain : du domaine
overquotaInfoStruct[] quota : the quota informations list
capacities : capacities in bytes
order : traffic ordered in bytes

Pour récupérer les valeurs directes comme 'domain' ou 'capacities" ça marche avec le code suivant :

//overquotaInfo
$result = $soap->overquotaInfo($session, "DOMAINE");
echo $result->{'domain'};
echo $result->{'capacities'};

Seulement je voudrais aussi récupérer les valeurs contenues dans le "overquotaInfoStruct[] quota " comme 'month' et 'traffic' mais je n'y arrive pas.

struct overquotaInfoStruct : Un overquota
stringmonth : the month date like YYYY-MM
inttraffic : the traffic in bytes
inthits : the number of hits

Quelle serait la syntaxe à respecter pour y parvenir ?

Merci.