XML-RPC API
Connecting
Authentication
Σφάλματα
Μέθοδοι
API Endpoint: https://secure.gravatar.com/xmlrpc?user=[email_hash]
It is mandatory that you connect to secure.gravatar.com, and that you do so over HTTPS. This is for the safety of our mutual users. The email_hash GET parameter is the md5 hash of the users email address after it has been lowercased, and trimmed.
All parameters for all methods should be passed as a single item, within an associative array.
It is mandatory that you connect to secure.gravatar.com, and that you do so over HTTPS. This is for the safety of our mutual users. The email_hash GET parameter is the md5 hash of the users email address after it has been lowercased, and trimmed.
All parameters for all methods should be passed as a single item, within an associative array.
Authentication
User authentication happens at the api method level. You will pass to the method call a password parameter. The data for these parameters will be passed in plain text. The password param is always stripped from the arguments before the methods begin their processing. For this reason you should expect not to see it returned from the grav.test method.
Σφάλματα
Errors usually come with a number and human readable text. Generally the text should be followed whenever possible, but a brief description of the numeric error codes are as follows:
-7 Χρησιμοποιῆστε τὸ secure.gravatar.com -8 Ἐσωτερικὸ σφάλμα -9 Authentication error -10 Method parameter missing -11 Method parameter incorrect -100 Misc error (see text)
Μέθοδοι
grav.exists - check whether a hash has a gravatar @param (array)$args['hashes'] an array of hashes to check @param (string)$args['password'] for authentication @return array ( hash => (bool)exists, ) grav.addresses - ἀποκτῆστε κατάλογο διευθύνσεων γι' αὐτὸν τὸν λογαριασμό @param (string)$args['password'] for authentication @return array ( address => array ( rating => (int)rating, userimage => (int)userimage, userimage_url => (int)userimage_url ) ) grav.userimages - return an array of userimages for this account @param (string)$args['password'] for authentication @return array ( userimage => array( (int)rating, // 0:g, 1:pg, 2:r, 3:x (string)url, ) ) grav.saveData - Ἀποθηκεῦστε τὴν δυαδικὴ ἀναπαράσταση τῆς εἰκόνας ὡς εἰκόνα χρήστη γι' αὐτὸν τὸν λογαριασμό @param (string)$args['data'] a base64_encode()d image @param (int)$args['rating'] 0:g, 1:pg, 2:r, 3:x @param (string)$args['password'] for authentication @return (bool)false σὲ περίπτωση ἀποτυχίας, (string)userimage σὲ περίπτωση ἐπιτυχίας grav.saveUrl - Διαβάστε μιὰν εἰκόνα μέσῳ τῆς URL της καὶ ἀποθηκεῦστε τὴν ὡς εἰκόνα χρήστη γι' αὐτὸν τὸν λογαριασμό @param (string)$args['url'] πλήρης url πρὸς εἰκόνα @param (int)$args['rating'] 0:g, 1:pg, 2:r, 3:x @param (string)$args['password'] for authentication @return (bool)false σὲ περίπτωση ἀποτυχίας, (string)userimage σὲ περίπτωση ἐπιτυχίας grav.useUserimage - use a userimage as a gravatar for one of more addresses on this account @param (string)$args['userimage'] Ἡ εἰκόνα χρήστη ποὺ θέλετε νὰ χρησιμοποιήσετε @param (array)$args['addresses'] A list of the email addresses you wish to use this userimage for @param (string)$args['password'] for authentication @return array( address => (bool)status ) grav.removeImage - remove the userimage associated with one or more email addresses @param (array)$args['addresses'] A list of the email addresses you wish to use this userimage for @param (string)$args['password'] for authentication @return array( address => (bool)status ) grav.deleteUserimage - remove a userimage from the account and any email addresses with which it is associated @param (string)$args['userimage'] Ἡ εἰκόνα χρήστη ποὺ θέλετε νὰ ἀφαιρέσετε ἀπὸ τὸν λογαριασμό @param (string)$args['password'] for authentication @return (bool)status grav.test - a test function @param (string)$args['password'] for authentication @return (mixed)$args