forked from maxcutler/python-wordpress-xmlrpc
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathusers.py
More file actions
44 lines (32 loc) · 1.1 KB
/
Copy pathusers.py
File metadata and controls
44 lines (32 loc) · 1.1 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
from wordpress_xmlrpc.base import *
from wordpress_xmlrpc.mixins import *
from wordpress_xmlrpc.wordpress import WordPressBlog, WordPressAuthor, WordPressUser
class GetUserInfo(BloggerApiMethodMixin, AuthenticatedMethod):
"""
Retrieve information about the connected user.
Parameters:
None
Returns: instance of `WordPressUser` representing the user whose credentials are being used with the XML-RPC API.
"""
method_name = 'blogger.getUserInfo'
requires_blog = False
results_class = WordPressUser
class GetUsersBlogs(AuthenticatedMethod):
"""
Retrieve list of blogs that this user belongs to.
Parameters:
None
Returns: `list` of `WordPressBlog` instances.
"""
method_name = 'wp.getUsersBlogs'
requires_blog = False
results_class = WordPressBlog
class GetAuthors(AuthenticatedMethod):
"""
Retrieve list of authors in the blog.
Parameters:
None
Returns: `list` of `WordPressAuthor` instances.
"""
method_name = 'wp.getAuthors'
results_class = WordPressAuthor