A Ruby interface to the Code 42 API
Add this line to your application's Gemfile:
gem 'code42'
And then execute:
$ bundle
Or install it yourself as:
$ gem install code42
client = Code42::Client.new(
host: 'staging.code42.com',
port: 1234,
https: true,
api_root: '/api/',
username: 'testuser',
password: 'letmein'
)
token = client.get_token
Then you can pass this token for further requests:
client = Code42::Client.new(
host: 'staging.code42.com',
port: 1234,
https: true,
api_root: '/api/',
token: token
)
attributes:
[:id,
:uid,
:status,
:username,
:email,
:first_name,
:last_name,
:quota_in_bytes,
:org_id,
:org_uid,
:org_name,
:active,
:blocked,
:email_promo,
:invited,
:org_type,
:username_is_an_email,
:created_at,
:updated_at]
attributes:
[:id,
:uid,
:name,
:status,
:active,
:blocked,
:parent_id,
:type,
:external_id,
:hierarchy_counts,
:config_inheritance_counts,
:created_at,
:updated_at,
:registration_key,
:reporting,
:custom_config,
:settings,
:settings_inherited,
:settings_summary]
success = client.ping.success?
user = client.user
user = client.user(42)
org = client.org
org = client.org(42)
client.validate_token(token).valid?
The project owner will publish a README.md with each project.
The community can created linked and versioned documentation in the Wiki associated with this project:
https://github.com/code42/code42_api_ruby/wiki
Please open a new issue. Before opening any issue, please search for existing issues.
The Code 42 open source project is a set of frameworks and examples for developing solutions based on the Code 42 CrashPlan REST API.
Our goal is to give developers the tools necessary to build solutions that range from integration efforts to stand-alone application experiences.
The Code 42 API is available as an open source project on Github, located here:
Announcements, updates, bug fixes and issue tracking are managed within each repository listed.
Unless otherwise noted, all files and works contained in the Code 42 projects are covered by the Apache 2 license as detailed below:
Copyright 2013, Code 42 Software Inc.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.