# bc-search

> search the bandcamp, the one and only

Latest version **1.0.7** (published 2016-02-04) · MIT license · 0 weekly downloads

## Install

```sh
npm install bc-search
pnpm add bc-search
yarn add bc-search
bun add bc-search
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.7 |
| Published | 2016-02-04 |
| First published | 2015-02-26 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 3 |
| Author | Axel Smeets |
| Maintainers | smeets |
| Keywords | search, bandcamp |

## Links

- npm: https://www.npmjs.com/package/bc-search
- Repository: https://github.com/murlocbrand/node-bc-search
- Homepage: https://github.com/murlocbrand/node-bc-search#readme
- Issues: https://github.com/murlocbrand/node-bc-search/issues
- npm.io page: https://npm.io/package/bc-search

## Alternatives

- [jsforce](https://npm.io/package/jsforce.md) — 851.2K weekly downloads
- [react-native-qrcode-svg](https://npm.io/package/react-native-qrcode-svg.md) — 693.5K weekly downloads
- [@salesforce/plugin-data](https://npm.io/package/@salesforce/plugin-data.md) — 394.9K weekly downloads
- [@backstage/plugin-search-common](https://npm.io/package/@backstage/plugin-search-common.md) — 308.5K weekly downloads
- [@chain-registry/types](https://npm.io/package/@chain-registry/types.md) — 38.4K weekly downloads

## Recent versions

- 1.0.7 (latest) — 2016-02-04
- 1.0.6 — 2016-02-04
- 1.0.5 — 2015-02-27
- 1.0.4 — 2015-02-27
- 1.0.2 — 2015-02-26
- 1.0.1 — 2015-02-26
- 1.0.0 — 2015-02-26

## README

bc-search
=========
search bandcamp using nodejs

## install
 - `npm install bc-search`

## note
The interesting bits of this module are the path and user agent.

They were found by using Bandcamp's Android app with a proxied Wi-Fi connection.

## usage
the package returns a function. the returned function returns a https request options object when called. use http/https module to do actual request and callback logging.

see example...
 - `var search = require('bc-search')`
 - `https.request(search("hello i am keywords"), callback).end()`

example
``` js
var http = require('http')
var search = require('bc-search')

function suggest(keywords, callback) {
    http.request(search(keywords), function(res) {
        var data = ''

        res.on('data', function(chunk) {
            data += chunk
        })

        res.on('end', function() {
            callback(JSON.parse(data))
        })
    }).end()
}

suggest('funky music', function(data) {
    // data = { results: [<hit>], time_ms: int }
    console.log(data)
})
```

each `results` hit is of the form:
```js
{
  url: 'https://sincerelyjohn.bandcamp.com/track/funky-music-featuring-mc',
  weight: 0,
  band_id: 3070742134,
  name: 'Funky Music featuring MC',
  img: 'https://f1.bcbits.com/img/a3657732646_3.jpg',
  band_name: 'Sincerely, John',
  part: 't',
  id: 2981519852,
  album_name: 'Human Theory the Album',
  score: -4075,
  type: 't',
  img_id: null,
  art_id: 3657732646,
  album_id: 2271697086,
  bias: 1
}
```

---
_Source: https://npm.io/package/bc-search · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
