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

derek_hall-sdk

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

derek_hall-sdk

  • 0.3.0
  • Rubygems
  • Socket score

Version published
Maintainers
1
Created
Source

LOTR SDK

Ruby client for the LOTR api located at https://the-one-api.dev/

Installation

gem install derek_hall-SDK

Usage

In your ruby file

gem 'derek_hall-SDK'
require 'lotr/sdk'

client = Lotr::Sdk::Client.new(ENV['KEY'])

# grab a random quote
random_quote = client.quote_list.data.sample
puts "Who said #{random_quote['dialog']}?"

# get the name and race of the character who was quoted
character = client.character(id: random_quote['character']).data.first
puts "Answer: #{character['name']} - #{character['race']}"

# gather all pages of quote data

full_quote_data = []
next_page_number = 1
while next_page_number
  quote_list = client.quote_list(page:next_page_number)
  full_quote_data += quote_list.data
  next_page_number = quote_list.next_page_number
end

puts "Total number of quotes: #{full_quote_data.size}"

Supported commands

  • movie_list
  • movie
  • character_list
  • character
  • book_list
  • book
  • quote_list
  • quote

Local development

git clone https://github.com/dhall/derek_hall-SDK.git
cd derek_hall-SDK
bundle

Run tests

rake test

Build gem

rake build

FAQs

Package last updated on 07 Aug 2022

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