Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

kgrift

Package Overview
Dependencies
Maintainers
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

kgrift

  • 1.3.108
  • Rubygems
  • Socket score

Version published
Maintainers
2
Created
Source

Knewton API Client (Grifter/ruby based)

Intro

Expressively interact with any Knewton HTTP+JSON API(s) using:

  • command line calls
  • scripts of abritrary complexity
  • quantum magic

Helps manages the complexity of:

  • specifying which environment you are interacting with (QA, Superman, UAT, etc)
  • authentication / controlling who you are while making api calls
  • access to reference data like graph IDs
  • self actualization

Our official API documentation (http://dev.knewton.com/reference/) is a nice reference to have open when learning this tool.

Setup

Examples

Authenticate as a 'knerd' (super user)

This command returns an Authorization token for a 'knerd' user. This token can be used in REST client browser plugins for manually calling the API. To do this, just set the output to the Authorization header in the REST client plugin.

$ grift -q -n -e Superman knerd_token

Run a grift script that gets a recommendation for a brand new student and goal

Checked in is an example script showing all the steps needed to get a recommendation.

$ grift -v -n -e QA -f examples/get_a_recommendation.rb

Get a recommendation for a known registration and goal id

The above script created a brand new test registraiton and test goal. If you already have a registration and goal, perhaps given by a partner, you can see the current recommendation for it by calling get_recommendation grift straight off the command line.

An easy way to demo this is to run the above example, and get the registration and goal id from the log that is produced.

$ grift -e QA get_recommendation <reg id> <goal id>

See all the available grift methods

This will list all the methods that define the DSL for interacting with the API.

$ grift --list

More reading

To understand how grifter works, check out it's github: https://github.com/Knewton/grifter

FAQs

Package last updated on 21 Jan 2016

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