File tree 2 files changed +18
-0
lines changed
2 files changed +18
-0
lines changed Original file line number Diff line number Diff line change @@ -148,6 +148,19 @@ public User getCurrentUser()
148
148
return user . Data ;
149
149
}
150
150
151
+ public User GetUser ( string userName )
152
+ {
153
+ if ( string . IsNullOrEmpty ( userName ) )
154
+ {
155
+ throw new ArgumentException ( "Empty username" , nameof ( userName ) ) ;
156
+ }
157
+
158
+ var request = new RestRequest ( $ "/users/{ userName } ") ;
159
+
160
+ var user = client . Get < User > ( request ) ;
161
+ return user . Data ;
162
+ }
163
+
151
164
/// <summary>
152
165
/// Searches through all of Github's repositories, similar to the search on the website itself.
153
166
/// </summary>
Original file line number Diff line number Diff line change @@ -7,6 +7,11 @@ public class User
7
7
/// </summary>
8
8
public string Login { get ; internal set ; }
9
9
10
+ /// <summary>
11
+ /// The avatar URL
12
+ /// </summary>
13
+ public string AvatarUrl { get ; set ; }
14
+
10
15
public User ( )
11
16
{
12
17
}
You can’t perform that action at this time.
0 commit comments