File tree 1 file changed +46
-0
lines changed
1 file changed +46
-0
lines changed Original file line number Diff line number Diff line change @@ -239,6 +239,52 @@ def get_wanted(
239
239
}
240
240
return self .request_get (path , self .ver_uri , params = params )
241
241
242
+ # PROFILES
243
+
244
+ # GET /profile/{id}
245
+ def get_quality_profile (self , id_ = None ):
246
+ """Gets all quality profiles or specific one with id_
247
+
248
+ Args:
249
+ id_ (int): quality profile id from database
250
+
251
+ Returns:
252
+ JSON: Array
253
+ """
254
+ path = f"profile/{ id_ } " if id_ else "profile"
255
+ return self .request_get (path , self .ver_uri )
256
+
257
+ # PUT /profile/{id}
258
+ def upd_quality_profile (self , id_ , data ):
259
+ """Update the quality profile data.
260
+
261
+ Note:
262
+ To be used in conjunction with get_quality_profile()
263
+
264
+ Args:
265
+ id_ (int): Profile ID to Update
266
+ data (dict): All parameters to update
267
+
268
+ Returns:
269
+ JSON: Array
270
+ """
271
+ path = f"profile/{ id_ } "
272
+ return self .request_put (path , self .ver_uri , data = data )
273
+
274
+ # DELETE /profile
275
+ def del_quality_profile (self , id_ ):
276
+ """Removes a specific quality profile from the blocklist
277
+
278
+ Args:
279
+ id_ (int): quality profile id from database
280
+
281
+ Returns:
282
+ JSON: Array
283
+ """
284
+ params = {"id" : id_ }
285
+ path = "profile"
286
+ return self .request_del (path , self .ver_uri , params = params )
287
+
242
288
## QUEUE
243
289
244
290
# GET /queue
You can’t perform that action at this time.
0 commit comments