soundcloud.ts
Advanced tools
Comparing version 0.6.1 to 0.6.2
@@ -62,3 +62,3 @@ import type {Dispatcher} from "undici" | ||
if (r.statusCode.toString().startsWith("2")) { | ||
if (r.headers["content-type"] === "application/json") return r.body.json() | ||
if (r.headers["content-type"].includes("application/json")) return r.body.json() | ||
return r.body.text() | ||
@@ -65,0 +65,0 @@ } |
@@ -87,3 +87,3 @@ "use strict"; | ||
if (r.statusCode.toString().startsWith("2")) { | ||
if (r.headers["content-type"] === "application/json") | ||
if (r.headers["content-type"].includes("application/json")) | ||
return r.body.json(); | ||
@@ -90,0 +90,0 @@ return r.body.text(); |
@@ -46,6 +46,6 @@ "use strict"; | ||
switch (_a.label) { | ||
case 0: return [4 /*yield*/, soundcloud.users.likes("https://soundcloud.com/soundcloud")]; | ||
case 0: return [4 /*yield*/, soundcloud.users.tracks("gingaloid")]; | ||
case 1: | ||
result = _a.sent(); | ||
console.log(result.map(function (t) { return t.permalink_url; })); | ||
console.log(result); | ||
return [2 /*return*/]; | ||
@@ -52,0 +52,0 @@ } |
{ | ||
"name": "soundcloud.ts", | ||
"version": "0.6.1", | ||
"version": "0.6.2", | ||
"description": "Soundcloud API v2 wrapper with typings.", | ||
@@ -5,0 +5,0 @@ "main": "dist/soundcloud.js", |
@@ -6,4 +6,4 @@ import SoundCloud from "./soundcloud" | ||
(async () => { | ||
const result = await soundcloud.users.likes("https://soundcloud.com/soundcloud") | ||
console.log(result.map((t) => t.permalink_url)) | ||
const result = await soundcloud.users.tracks("gingaloid") | ||
console.log(result) | ||
})() |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
171926