1.0.2 • Published 5 years ago

bob-ross-client v1.0.2

Weekly downloads
3
License
MIT
Repository
github
Last release
5 years ago

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

1.0.2

5 years ago

1.0.1

5 years ago

1.0.0

5 years ago