aboutsummaryrefslogtreecommitdiffstats
path: root/pygithub3/requests/users/user.py
blob: 78ab6cda7c68896e1f7f88b1278b6b597fa62988 (plain) (blame)
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
#!/usr/bin/env python
# -*- encoding: utf-8 -*-

from . import Request, ValidationError
from pygithub3.resources.users import User

__all__ = ('Get', 'Update')


class Get(Request):

    resource = User
    uri = 'users/{user}'

    def clean_uri(self):
        if not self.user:
            return 'user'


class Update(Request):

    resource = User
    uri = 'user'
    body_schema = (
        'name', 'email', 'blog', 'company', 'location','hireable', 'bio')