🚀 DAY 2 OF LAUNCH WEEK: Announcing Socket Certified Patches: One-Click Fixes for Vulnerable Dependencies.Learn more →
Socket
Book a DemoInstallSign in
Socket

shyftplan

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

shyftplan

bundlerRubygems
Version
0.1.1
Version published
Maintainers
1
Created
Source

shyftplan-ruby

Ruby gem for Shyftplan's REST API https://github.com/shyftplan/api-documentation

Try the gem on repl.it https://replit.com/@nisanth074/tryshyftplanruby#main.rb

Installation

Add the gem to your Rails app's Gemfile

gem "shyftplan", git: "https://github.com/nisanth074/shyftplan-ruby", branch: "main"

and bundle install

bundle install

Usage

Initialize the Shyftplan client

shyftplan = Shyftplan.new("john@acme.com", "dummy_api_token")

Retrieve evaluations

response = shyftplan.get("/evaluations")
evaluations = response["items"]

Retrieve evaluations across all pages

evaluations = shyftplan.each_page("/evaluations")

Doing the above may take a while. If you'd like to perform any action after each page retrieval, provide a block

shyftplan.each_page("/evaluations") do |page|
  puts "Page retrieved..."

  evaluations = page["items"]
  EvaluationsCSVExport.add(evaluations)
end

Todos

  • Publish gem to https://rubygems.org

FAQs

Package last updated on 21 Aug 2023

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