Socket
Book a DemoInstallSign in
Socket

shiro

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

shiro

0.1.2
bundlerRubygems
Version published
Maintainers
1
Created
Source

Shiro Ruby Library

This is the official Shiro API Ruby library gem maintained by OpenShiro. The Shiro Ruby library provides convenient access to the Stripe API from applications written in the Ruby language.

Documentation

See the API docs and also this post on Getting Started with the Shiro API.

Installation

To install the gem:

gem install shiro

Include it in your Rails gemfile with:

bundle add shiro

or directly in the gemfile:

gem "shiro", "~> 0.1.1"

Usage

The library needs to be configured with your account's api key which is available in your Shiro account under API Keys.

require "shiro"

Shiro.configure do |config|
  config[:api_key] = "your_api_key..."
end

Deployment Actions

List deployments

deployments = Shiro::Deployment.list

Retrieve a single deployment

deployment = Shiro::Deployment.retrieve("dpmt_lWokJnPAwQCeV2ZWovjG7BNr")

Update a deployment

updated_deployment = Shiro::Deployment.update("dpmt_lWokJnPAwQCeV2ZWovjG7BNr", { name: "New Deployment Name" })

Generating Completions

Generate a completion for a deployment

content = Shiro::GenerateCompletion.create("dpmt_lWokJnPAwQCeV2ZWovjG7BNr",
  environment: "PRODUCTION",
  prompt_id: "prmt_WnAlbE5lEMtxAG2Qly6jo2dV", # optional
  input_variables: { "key": "value" }
)

User Account Actions

Retrieve current user's details

current_user = Shiro::Me.retrieve

Delete current user's account

response = Shiro::Me.destroy

Prompt Actions

List prompts

prompts = Shiro::Prompt.list

Retrieve a single prompt

prompt = Shiro::Prompt.retrieve("prmt_WnAlbE5lEMtxAG2Qly6jo2dV")

Support

New features and bug fixes are released on the latest major version of the Shiro Python library. If you are on an older major version, we recommend that you upgrade to the latest in order to use the new features and bug fixes including those for security vulnerabilities. Older major versions of the package will continue to be available for use, but will not be receiving any updates.

Development

Run the tests:

rake test

FAQs

Package last updated on 24 Mar 2024

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

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.