bob-ross-client

1.0.2 • Public • Published

Bob Ross Client

A javascript client for Bob Ross image servers. Generates URLs and image source sets for retrieving images.

Installation

$ yarn add bob-ross-client

Implementation

import BobRossClient from 'bob-ross-client'
import hmacs from './hmacs.json'

const client = new BobRossClient({
  serverUrl: process.env.BOB_ROSS_SERVER_URL,
  hmacs
})

Usage

The Bob Ross client has two methods: client.getUrl and client.getSrcset. Both methods take the image hash and options as parameters. For more information on which keys the options object takes refer to the Bob Ross documentation.

const imageUrl = client.getUrl('abc123', {
  resize: '300x225*',
  ...
})

const imageSrcset = client.getSrcset('abc123', {
  resize: '300x225*',
  ...
})

Resources

Credits

All credits go to Jon and James Bracy.

License

MIT

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 1.0.2
    0
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 1.0.2
    0
  • 1.0.1
    0
  • 1.0.0
    0

Package Sidebar

Install

npm i bob-ross-client

Weekly Downloads

0

Version

1.0.2

License

MIT

Unpacked Size

194 kB

Total Files

5

Last publish

Collaborators

  • wlaeri