Code Monkey home page Code Monkey logo

iheart's People

Contributors

davidpaulhunt avatar maxsatula avatar tootallnate avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

iheart's Issues

Unexpected token import

I feel like I misunderstand how to use this module, but all I know is when requiring it in node.js it doesn't work xD

/node_modules/iheart/index.js:1
(function (exports, require, module, __filename, __dirname) { import { extname } from 'path'
                                                              ^^^^^^

SyntaxError: Unexpected token import
    at createScript (vm.js:80:10)
    at Object.runInThisContext (vm.js:139:10)
    at Module._compile (module.js:576:28)
    at Object.Module._extensions..js (module.js:623:10)
    at Module.load (module.js:531:32)
    at tryModuleLoad (module.js:494:12)
    at Function.Module._load (module.js:486:3)
    at Module.require (module.js:556:17)
    at require (internal/module.js:11:18)
    at eval (eval at execute (/home/firecontroller1847/discord-bots/pandora-v7/src/commands/Owner/eval.js:15:42), <anonymous>:1:16)

Low severity security vulnerability

A recent NPM audit found that one of this package's dependencies is vulnerable to denial of service.
I am currently using the latest version of this package (v 3.1.1)
I'm wondering if there's a fix already available or if one needs to be released.
screenshot

Get radio station description by id

I can offer to create a function getById(_station) which returns a whole JSON of radio station taking numeric station id as an argument. It is almost identical to streamURL(_station), but it stops before streams are extracted and returns body.hits[0] instead.

It can be useful, for example, if one stores station ids in a favourites list, and needs to resolve a station name, its description, logo etc. In this case there will be no need to store entire station JSON object in the favourites. Also, cached station information can be outdated otherwise.

Caveat

Apparently, https://api.iheart.com/api/v1/catalog/searchAll and https://api.iheart.com/api/v2/content/liveStations/ and thus iheart.search(...) and iheart.streamURL(...) respectively return a little bit different JSON objects. For instance, newlogo property exits in one but does not in another. logo property, in its turn, contains {img_url_1} string in the former case, which makes logo URL unusable unless substitution value is found and replaced.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.