@@ -28,9 +28,6 @@ class Http {
2828 * @return {* } The response data on success.
2929 */
3030 async get ( endpoint , sort = new SortOptions ( ) ) {
31- if ( typeof endpoint !== "string" ) throw APIError . internal ( "The 'endpoint' parameter was not a string." ) ;
32- if ( ! ( sort instanceof SortOptions ) ) throw APIError . internal ( "The 'sort' parameter was not of type SortOptions." ) ;
33-
3431 if ( sort . isSet ( ) ) endpoint += sort . toQueryString ( ) ;
3532 await this . #throttler. stallIfRequired ( false ) ;
3633
@@ -52,8 +49,6 @@ class Http {
5249 * @return {number } The response data on success (ie. a content identifier).
5350 */
5451 async post ( endpoint , body ) {
55- if ( typeof endpoint !== "string" ) throw APIError . internal ( "The 'endpoint' parameter was not a string." ) ;
56-
5752 await this . #throttler. stallIfRequired ( true ) ;
5853
5954 try {
@@ -72,8 +67,6 @@ class Http {
7267 * @param {object } body The request body options.
7368 */
7469 async patch ( endpoint , body ) {
75- if ( typeof endpoint !== "string" ) throw APIError . internal ( "The 'endpoint' parameter was not a string." ) ;
76-
7770 await this . #throttler. stallIfRequired ( true ) ;
7871
7972 try {
@@ -91,8 +84,6 @@ class Http {
9184 * @param {string } endpoint The path of the endpoint (incl. any path parameters).
9285 */
9386 async delete ( endpoint ) {
94- if ( typeof endpoint !== "string" ) throw APIError . internal ( "The 'endpoint' parameter was not a string." ) ;
95-
9687 await this . #throttler. stallIfRequired ( true ) ;
9788
9889 try {
@@ -126,9 +117,6 @@ class Http {
126117 * @return {Array<object> } An array of raw objects.
127118 */
128119 async listUntil ( endpoint , shouldContinue , sort = new SortOptions ( ) ) {
129- if ( typeof endpoint !== "string" ) throw APIError . internal ( "The 'endpoint' parameter was not a string." ) ;
130- if ( ! ( sort instanceof SortOptions ) ) throw APIError . internal ( "The 'sort' parameter was not of type SortOptions." ) ;
131-
132120 sort . page = 1 ;
133121
134122 let allData = [ ] ;
0 commit comments