@@ -307,6 +307,54 @@ class _User(models.GitHubCore):
307307
308308 class_name = "_User"
309309
310+ def __init__ (self , json , session ):
311+ if json is None :
312+ # from https://api.github.com/users/ghost
313+ json = {
314+ "login" : "ghost" ,
315+ "id" : 10137 ,
316+ "node_id" : "MDQ6VXNlcjEwMTM3" ,
317+ "avatar_url" : "https://avatars.githubusercontent.com/u/10137?v"
318+ "=4" ,
319+ "gravatar_id" : "" ,
320+ "url" : "https://api.github.com/users/ghost" ,
321+ "html_url" : "https://github.com/ghost" ,
322+ "followers_url" : "https://api.github.com/users/ghost/followers" ,
323+ "following_url" : "https://api.github.com/users/ghost/following"
324+ "{/other_user}" ,
325+ "gists_url" : "https://api.github.com/users/ghost/gists{/gist_id"
326+ "}" ,
327+ "starred_url" : "https://api.github.com/users/ghost/starred{/own"
328+ "er}{/repo}" ,
329+ "subscriptions_url" : "https://api.github.com/users/ghost/subscr"
330+ "iptions" ,
331+ "organizations_url" : "https://api.github.com/users/ghost/orgs" ,
332+ "repos_url" : "https://api.github.com/users/ghost/repos" ,
333+ "events_url" : "https://api.github.com/users/ghost/events{/priva"
334+ "cy}" ,
335+ "received_events_url" : "https://api.github.com/users/ghost/rece"
336+ "ived_events" ,
337+ "type" : "User" ,
338+ "user_view_type" : "public" ,
339+ "site_admin" : False ,
340+ "name" : "Deleted user" ,
341+ "company" : None ,
342+ "blog" : "" ,
343+ "location" : "Nothing to see here, move along." ,
344+ "email" : None ,
345+ "hireable" : None ,
346+ "bio" : "Hi, I'm @ghost! I take the place of user accounts that "
347+ "have been deleted.\n :ghost:\n " ,
348+ "twitter_username" : None ,
349+ "public_repos" : 0 ,
350+ "public_gists" : 0 ,
351+ "followers" : 11584 ,
352+ "following" : 0 ,
353+ "created_at" : "2008-05-13T06:14:25Z" ,
354+ "updated_at" : "2018-04-10T17:22:33Z" ,
355+ }
356+ super ().__init__ (json , session )
357+
310358 def _update_attributes (self , user ):
311359 self .avatar_url = user ["avatar_url" ]
312360 self .events_urlt = URITemplate (user ["events_url" ])
@@ -869,7 +917,7 @@ class AuthenticatedUser(User):
869917 """Object to represent the currently authenticated user.
870918
871919 This is returned by :meth:`~github3.github.GitHub.me`. It contains the
872- extra informtation that is not returned for other users such as the
920+ extra information that is not returned for other users such as the
873921 currently authenticated user's plan and private email information.
874922
875923 .. versionadded:: 1.0.0
0 commit comments