forked from sigmavirus24/github3.py
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathuser.py
More file actions
20 lines (16 loc) · 634 Bytes
/
Copy pathuser.py
File metadata and controls
20 lines (16 loc) · 634 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from github3.models import GitHubCore
from github3.users import User
class UserSearchResult(GitHubCore):
def __init__(self, data, session=None):
super(UserSearchResult, self).__init__(data, session)
result = data.copy()
#: Score of this search result
self.score = result.pop('score')
#: Text matches
self.text_matches = result.pop('text_matches', [])
#: User object matching the search
self.user = User(result, self)
def _repr(self):
return '<UserSearchResult [{0}]>'.format(self.user)