New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

bigstock-client

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

bigstock-client

  • 0.0.2
  • Rubygems
  • Socket score

Version published
Maintainers
1
Created
Source

bigstock-client-ruby

A Ruby client for Bigstock's API

Installation

Bigstock-Client-Ruby is available as a RubyGem:

$ gem install bigstock-client

Usage

Create an instance of the Bigstock API Client by passing in your API ID and API Secret as parameters. The client will then handle any authentication when required.

require 'bigstock/client'
client = Bigstock::Client::Client.new('API_ID', 'API_SECRET')

Then use the client to contact the Bigstock-API

response = client.search('dog')
if response['message'] == 'success'
  pages = response['data']['pages']
  images = response['data']['images']
end

Additional options might be passed to the search. For a list of options see Bigstock's API documentatation

For example, to get only the first five images for 'dog' but with all image details:

response = client.search('dog', response_detail: 'all', limit: 5)

Image Detail

The image ID returned in a search response can be used to query for more information about a specific image.

response = client.image('IMAGE_ID')
if response['message'] == 'success'
  image = response['data']['image']
end

Purchase

Once you have funded your API account you will be able to download full resolution un-watermarked images.

response = client.purchase('IMAGE_ID', 'SIZE_CODE')
if response['message'] == 'success'
  download_url = client.get_download_url(response['data']['download_id'])
end

Lightboxes & Saved Images

To get the list of private lightbox content saved under your account:

response = client.lightboxes
if response['message'] == 'success'
  total_items = response['data']['total_items']
  lightboxes = response['data']['lightboxes']
end

To get the content of a lightbox

response = client.lightbox('LIGHTBOX_ID')
if response['message'] == 'success'
  pages = response['data']['pages']
  lightbox = response['data']['lightbox']
  images = response['data']['images']
end

FAQs

Package last updated on 12 Dec 2014

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc