@@ -36,7 +36,7 @@ def __init__(self, api_key=None, secret=None, rand=1000000):
3636
3737 def generate_url (self , method_name , ** fields ):
3838 """
39- Generates request url for api .
39+ Generates request URL for API .
4040 """
4141 if not self .anonimus :
4242 current_time = time .time ()
@@ -83,7 +83,7 @@ def generate_url(self, method_name, **fields):
8383
8484 def check_return_code (self , response ):
8585 """
86- Checks if returned response is OK.
86+ Checks if a returned response is OK.
8787 If not OK Exception will be raised will additional info.
8888 """
8989 if response ["status" ] != "OK" :
@@ -168,17 +168,19 @@ def contest_standings(
168168 ):
169169 """
170170 Get contest.standings for contest, contest_id required.
171- From is replaced with start, because from is reserved python word.
171+ From is replaced with a start, because from is reserved python word.
172172 Count defines how many submits will be returned.
173173 Handles should be a list of handles to get (max 10000).
174- Room is number of room which is need .
175- Show_unofficial is used for adding or removing non official participants.
174+ Room is the number of the room which is needed .
175+ Show_unofficial is used for adding or removing not official participants.
176176 Returns parsed response from codeforces.com.
177177 """
178178 if not isinstance (handles , list ):
179179 raise TypeError ("Handles should be a list" )
180180 if len (handles ) > 10000 :
181- raise OverflowError ("Max count of handles should be less or equal 10000" )
181+ raise OverflowError (
182+ "Max count of handles should be less or equal to 10000."
183+ )
182184 parameters = {
183185 "contestId" : str (contest_id ),
184186 "showUnofficial" : str (show_unofficial ),
@@ -200,9 +202,9 @@ def contest_standings(
200202 def contest_status (self , contest_id , handle = "" , start = - 1 , count = - 1 ):
201203 """
202204 Get contest.status for contest, contest_id required.
203- From is replaced with start, because from is reserved python word.
205+ From is replaced with a start, because from is reserved python word.
204206 Count defines how many submits will be returned.
205- Handle is used for specifying user.
207+ Handle is used for specifying a user.
206208 Returns parsed response from codeforces.com.
207209 """
208210 if contest_id == None :
@@ -224,7 +226,7 @@ def problemset_problems(self, tags=[""], problemset_name=""):
224226 """
225227 Get problemset.problems.
226228 tags is a list of tags for tasks.
227- problemset_name is a string with additional archive name.
229+ problemset_name is a string with an additional archive name.
228230 For example 'acmsguru'.
229231 Returns parsed response from codeforces.com.
230232 """
@@ -245,7 +247,7 @@ def problemset_recent_status(self, count, problemset_name=""):
245247 """
246248 Get problemset.recentStatus.
247249 count is the number of returned submits, up to 1000.
248- problemset_name is a string with additional archive name.
250+ problemset_name is a string with an additional archive name.
249251 For example 'acmsguru'.
250252 Returns parsed response from codeforces.com.
251253 """
@@ -294,7 +296,7 @@ def user_blog_entries(self, handle):
294296 def user_friends (self , only_online = False ):
295297 """
296298 Get user.friends.
297- Auth is required for this method, so create class instance with api_key and secret.
299+ Auth is required for this method, so create a class instance with api_key and secret.
298300 Only_online should be boolean.
299301 Returns parsed response from codeforces.com.
300302 """
@@ -311,13 +313,13 @@ def user_friends(self, only_online=False):
311313 def user_info (self , handles ):
312314 """
313315 Get user.info.
314- Handles should be a list with users, up to 10000.
316+ Handles should be a list of users, up to 10000.
315317 Returns parsed response from codeforces.com.
316318 """
317319 if not isinstance (handles , list ):
318320 raise TypeError ("Handles should be a list" )
319321 if len (handles ) > 10000 :
320- raise OverflowError ("Max count of handles should be less or equal 10000" )
322+ raise OverflowError ("Max count of handles should be less or equal to 10000" )
321323 request_url = self .generate_url ("user.info" , ** {"handles" : handles })
322324 request = requests .get (request_url )
323325 response = request .json ()
@@ -327,7 +329,7 @@ def user_info(self, handles):
327329 def user_rated_list (self , active_only = False ):
328330 """
329331 Get user.ratedList.
330- Active_only is used to sho only users, which participatied last month.
332+ Active_only is used to show only users, which participated last month.
331333 Returns parsed response from codeforces.com.
332334 """
333335 request_url = self .generate_url (
@@ -354,8 +356,8 @@ def user_status(self, handle, start=-1, count=-1):
354356 """
355357 Get user.status.
356358 Handle is required.
357- From was replaced with start, because from is reserved python word.
358- Count is number of attempts to return.
359+ From was replaced with a start because from is reserved python word.
360+ Count is the number of attempts to return.
359361 Returns parsed response from codeforces.com.
360362 """
361363 parameters = {
0 commit comments