refsheet
Refsheet - the Ruby gem for the Refsheet.net API
The Refsheet.net API allows another application to view and manipulate data on behalf of a user. To get started, generate an API Key from your account settings.
This SDK is automatically generated by the Swagger Codegen project:
- API version: v1
- Package version: 0.1.0
- Build date: 2020-01-17T12:30:16.510-08:00
- Build package: class io.swagger.codegen.languages.RubyClientCodegen
Installation
Build a gem
To build the Ruby code into a gem:
gem build refsheet.gemspec
Then either install the gem locally:
gem install ./refsheet-0.1.0.gem
(for development, run gem install --dev ./refsheet-0.1.0.gem
to install the development dependencies)
or publish the gem to a gem hosting service, e.g. RubyGems.
Finally add this to the Gemfile:
gem 'refsheet', '~> 0.1.0'
Install from Git
If the Ruby gem is hosted at a git repository: https://github.com/GIT_USER_ID/GIT_REPO_ID, then add the following in the Gemfile:
gem 'refsheet', :git => 'https://github.com/GIT_USER_ID/GIT_REPO_ID.git'
Include the Ruby code directly
Include the Ruby code directly using -I
as follows:
ruby -Ilib script.rb
Getting Started
Please follow the installation procedure and then run the following code:
# Load the gem
require 'refsheet'
# Setup authorization
Refsheet.configure do |config|
# Configure API key authorization: apiKeySecret
config.api_key['X-ApiKeySecret'] = 'YOUR API KEY'
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
#config.api_key_prefix['X-ApiKeySecret'] = 'Bearer'
# Configure API key authorization: apiKeyId
config.api_key['X-ApiKeyId'] = 'YOUR API KEY'
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
#config.api_key_prefix['X-ApiKeyId'] = 'Bearer'
end
api_instance = Refsheet::UsersApi.new
id = "id_example" # String | User GUID
begin
#Retrieves a User
result = api_instance.find(id)
p result
rescue Refsheet::ApiError => e
puts "Exception when calling UsersApi->find: #{e}"
end
Documentation for API Endpoints
All URIs are relative to https://http://dev1.refsheet.net/api/v1
Class | Method | HTTP request | Description |
---|---|---|---|
Refsheet::UsersApi | find | GET /users/id | Retrieves a User |
Documentation for Models
- Refsheet::InlineResponse200
- Refsheet::InlineResponse200Data
- Refsheet::InlineResponse200DataAttributes
- Refsheet::InlineResponse200DataAttributesRoles
Documentation for Authorization
apiKeySecret
- Type: API key
- API key parameter name: X-ApiKeySecret
- Location: HTTP header
apiKeyId
- Type: API key
- API key parameter name: X-ApiKeyId
- Location: HTTP header