Outils pour utilisateurs

Outils du site


fr:code:data:web

Différences

Ci-dessous, les différences entre deux révisions de la page.

Lien vers cette vue comparative

Prochaine révision
Révision précédente
fr:code:data:web [2012/03/23 10:45] – créée wismerhealfr:code:data:web [2021/02/13 11:23] (Version actuelle) – modification externe 127.0.0.1
Ligne 1: Ligne 1:
 ====== Web [En cours de Traduction Wismerheal][WSL] ====== ====== Web [En cours de Traduction Wismerheal][WSL] ======
-This object allows you to download data.+Cet objet vous permet de télécharger des données.
  
-===== Functions =====+===== Fonctions =====
  
 ==== Web ==== ==== Web ====
-Constructor function.+Fonction de construction.
  
-=== Syntax ===+=== Syntaxe ===
 <code javascript> <code javascript>
 var myObject = new Web(eventsAndOptions); var myObject = new Web(eventsAndOptions);
Ligne 13: Ligne 13:
  
 === Arguments === === Arguments ===
-  - eventsAndOptions - (object) the events that can be called +  - eventsAndOptions - (object) l'évènement qui peut être appelé 
-    * onFinished - ([[#onFinished|onFinished]]) called when the data has been downloaded +    * onFinished - ([[#onFinished|onFinished]]) cappelé quand les données sont téléchargées 
-    * onDownloadProgress - ([[#onDownloadProgress|onDownloadProgress]]) called when the download progresses +    * onDownloadProgress - ([[#onDownloadProgress|onDownloadProgress]]) appelé quand le téléchargement en cours progresse 
-    * onError - ([[#onError|onError]]) called when an error has occured +    * onError - ([[#onError|onError]]) appelé quand une erreur survient 
-    * file - ([[en:code:data:file|File]] or string) the file or filename to use as a destination for the downloaded dataif this is not set the data will be stored into RAM+    * file - ([[en:code:data:file|File]] or string) le fichier ou nom de fichier à utiliser comme destination pour le téléchargement de donnéessi ce n'est pas définit les données seront stockées dans la RAM
  
 === Example === === Example ===
Ligne 33: Ligne 33:
 </code> </code>
  
-===== Methods =====+===== Méthodes =====
  
 ==== download ==== ==== download ====
-Start downloading.+Débute le téléchargement.
  
-=== Syntax ===+=== Syntaxe ===
 <code javascript> <code javascript>
 myObject.download(url, options); myObject.download(url, options);
Ligne 47: Ligne 47:
  
 === Arguments === === Arguments ===
-  - url - (string) the url of the resource to download+  - url - (string) l'url de la ressources à télécharger
   - options - (object) options   - options - (object) options
-    * rawHeaders - (object) raw headers to set +    * rawHeaders - (object) suite d'entête à définir 
-    * method - (Method) the method to use (get or post) +    * method - (Method) la méthode à utiliser ("get" ou "post"
-    * postData - (object) post data to send +    * postData - (object) "post" les données à envoyées 
-    * query - (object) query items +    * query - (object) acquisition d'élément 
-    * user - (string) the username to use if asked +    * user - (string) le nom d'utilisateur à utilisé si demandé 
-    * password - (string) the password to use if asked+    * password - (string) le mot de passe à utilisé si demandé
  
-=== Returns === +=== Renvoie === 
-  * (Web) this Web+  * (Web) ce Web
  
 === Exceptions === === Exceptions ===
-  * (OpenFileError) unable to open the destination file+  * (OpenFileError) impossible d'ouvrir le fichier de destination
  
 === Notes === === Notes ===
-This method is asynchronousthis means that it will return before the data is downloaded+Cette méthode est asynchronecela signifie que le renvoi s'effectue avant que les données ne soient téléchargées
-To known when this is done use the [[#onFinished|onFinished]] event or the [[#isDownloading|isDownloading]] method.+Pour savoir quand le téléchargement est terminé, utilisez l'évènement [[#onFinished|onFinished]] ou la méthode [[#isDownloading|isDownloading]] .
  
 ==== isDownloading ==== ==== isDownloading ====
-Returns true if the data is still being downloaded.+Renvoie vrai si les données sont toujours en cours de téléchargement.
  
-=== Syntax ===+=== Syntaxe ===
 <code javascript> <code javascript>
 myObject.isDownloading(); myObject.isDownloading();
 </code> </code>
  
-=== Returns === +=== Renvoie === 
-  * (boolean) true if the data is still being downloaded+  * (boolean) vrai si les données sont toujours en cours de téléchargement
  
 ==== toImage ==== ==== toImage ====
-Returns the downloaded data as an [[en:code:core:image|Image]].+Renvoie les données téléchargée comme un [[en:code:core:image|Image]] .
  
-=== Syntax ===+=== Syntaxe ===
 <code javascript> <code javascript>
 myObject.toImage(); myObject.toImage();
 </code> </code>
  
-=== Returns === +=== REnvoie === 
-  * ([[en:code:core:image|Image]]) the image+  * ([[en:code:core:image|Image]]) l'image
  
 === Notes === === Notes ===
-You cannot use this method if you specified a destination file as no data is kept in memory.+Vous ne pouvez pas utiliser cette méthode si le chemin de destination du fichier ne dispose pas de données car aucune donnée ne sera conservée en mémoire.
  
 ==== toText ==== ==== toText ====
-Returns the downloaded data as text.+Renvoie les données téléchargée comme un texte.
  
-=== Syntax ===+=== Syntaxe ===
 <code javascript> <code javascript>
 myObject.toText(encoding); myObject.toText(encoding);
Ligne 103: Ligne 103:
  
 === Arguments === === Arguments ===
-  - encoding - ([[en:code:core:global#encoding|Encoding]]) the encoding to use+  - encoding - ([[en:code:core:global#encoding|Encoding]]) l'encodage à utiliser
  
-=== Returns === +=== Renvoie === 
-  * (string) the text+  * (string) le texte
  
 === Notes === === Notes ===
-You cannot use this method if you specified a destination file as no data is kept in memory.+Vous ne pouvez pas utiliser cette méthode si le chemin de destination du fichier ne dispose pas de données car aucune donnée ne sera conservée en mémoire.
  
 ==== toRawData ==== ==== toRawData ====
-Returns the downloaded data as [[en:code:core:rawdata|RawData]].+Renvoie les données téléchargées comme une [[en:code:core:rawdata|RawData]] .
  
-=== Syntax ===+=== Syntaxe ===
 <code javascript> <code javascript>
 myObject.toRawData(); myObject.toRawData();
 </code> </code>
  
-=== Returns === +=== Renvoie === 
-  * ([[en:code:core:rawdata|RawData]]) the raw data+  * ([[en:code:core:rawdata|RawData]]) la série de données
  
 === Notes === === Notes ===
-You cannot use this method if you specified a destination file as no data is kept in memory.+Vous ne pouvez pas utiliser cette méthode si le chemin de destination du fichier ne dispose pas de données car aucune donnée ne sera conservée en mémoire.
  
 ==== cancel ==== ==== cancel ====
-Cancel the download.+Annule le téléchargement.
  
-=== Syntax ===+=== Syntaxe ===
 <code javascript> <code javascript>
 myObject.cancel(); myObject.cancel();
 </code> </code>
  
-=== Returns === +=== Renvoie === 
-  * (Web) this Web+  * (Web) ce Web
  
-===== Events =====+===== Évènements =====
  
 ==== onFinished ==== ==== onFinished ====
-Called when the data has been downloaded.+Appelé quahd les données sont téléchargées.
  
-=== Syntax ===+=== Syntaxe ===
 <code javascript> <code javascript>
 myObject.onFinished = function() {}; myObject.onFinished = function() {};
Ligne 155: Ligne 155:
  
 ==== onDownloadProgress ==== ==== onDownloadProgress ====
-Called when the download progression has changed.+Appelé quand la progression du téléchargement a changé.
  
-=== Syntax ===+=== Syntaxe ===
 <code javascript> <code javascript>
 myObject.onDownloadProgress = function(bytesReceived, bytesTotal) {}; myObject.onDownloadProgress = function(bytesReceived, bytesTotal) {};
Ligne 163: Ligne 163:
  
 === Arguments === === Arguments ===
-  - bytesReceived - (integer) received byte count +  - bytesReceived - (integer) reçoit le compte de byte 
-  - bytesTotal - (integer) total byte count+  - bytesTotal - (integer) compte total de byte
  
 === Example === === Example ===
Ligne 175: Ligne 175:
  
 ==== onError ==== ==== onError ====
-Called when an error occurs.+Appelé quand une erreur survient.
  
-=== Syntax ===+=== Syntaxe ===
 <code javascript> <code javascript>
 myObject.onError = function(errorText) {}; myObject.onError = function(errorText) {};
Ligne 183: Ligne 183:
  
 === Arguments === === Arguments ===
-  - errorText - (string) a text describing the error+  - errorText - (string) un texte décrivant l'erreur
  
 === Example === === Example ===
Ligne 195: Ligne 195:
 ===== Enumerations ===== ===== Enumerations =====
  
-==== Method ==== +==== Méthode==== 
-The download method.+La méthode de téléchargement.
  
-=== Values === +=== Valeurs === 
-  - Get: use "get" method (default+  - Get: utilisez la méthode "get" (défaut
-  - Post: use "post" method+  - Post: utilisez la méthode "post"
fr/code/data/web.1332499534.txt.gz · Dernière modification : 2021/02/13 11:23 (modification externe)