🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
DemoInstallSign in
Socket

canvas_data_client

Package Overview
Dependencies
Maintainers
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

canvas_data_client

0.0.5
Rubygems
Version published
Maintainers
2
Created
Source

CanvasDataClient

This gem is meant to provide an easy-to-use ruby client wrapping the Canvas Hosted Data API.

It calculates and attaches HMAC signatures for each request, and returns the parsed JSON response.

Usage

The client can be initialized as such:

client = CanvasDataClient::Client.new(api_key, api_secret)

As much as possible, the methods available in the client match those given in the API docs

List of methods:

client.latest_files # GET /api/account/(:accountId|self)/file/latest
client.dumps # GET /api/account/(:accountId|self)/dump
client.dump('b349ad95-4839-48f3-b763-ec555fc2f42f') # GET /api/account/(:accountId|self)/file/byDump/:dumpId
client.tables('course_dim') # GET /api/account/(:accountId|self)/file/byTable/:tableName
client.schemas # GET /api/schema
client.latest_schema # GET /api/schema/latest
client.schema('1.0.0') # GET /api/schema/:version

# Downloads a table file from the specified dump (or all files for a table should the dump have multiple)
# and writes them to a single CSV file.  This also includes a CSV header row of the column names
# pulled from the schema definition
client.download_to_csv_file(dump_id: 'b349ad95-4839-48f3-b763-ec555fc2f42f', table: 'requests', path: '/path/to/output_file.csv')

# Same as #download_to_csv_file, but uses the latest dump available
client.download_latest_to_csv_file(table: 'requests', path: '/path/to/output_file.csv')

Source

Originally from a partners GitHub at https://github.com/ben-y/canvas_data_client.

License

The gem is available as open source under the terms of the MIT License.

FAQs

Package last updated on 29 Oct 2018

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

OSZAR »