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

cloudn-api

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

cloudn-api

  • 0.0.1
  • Rubygems
  • Socket score

Version published
Maintainers
1
Created
Source

CloudnAPI

CloudnAPI is a library for manipulating Cloudn API easily.

This library is designed as external library so you can't use CloudAPI alone like ./cloudn-api. If you need an executable one, then check Cloudn CLI.

Installation

Add this line to your application's Gemfile:

gem 'cloudn-api'

And then execute:

$ bundle

Or install it yourself as:

$ gem install cloudn-api

Install path option such as '--path vendor/bundle' is recommended in order to limit scope.

Usage

2 steps are required:

STEP 1. Set up Cloudn configuration

You can choose one of methods to write down the configuration:

  • a) Create JSON file(*) wherever you like, then specify it when you create instance as STEP 2.
  • b) Create JSON file at ~/.cloudnapi/config, which is the default location Cloudn API gem will seek.
  • c) Set 3 Environmental Variables : 'CLOUDN_API_KEY', 'CLOUDN_SECRET_KEY', 'CLOUDN_URL'. The values of them is same as JSON file as follows.

*JSON file :

{
  "url" : "CLOUDN API ENDPOINT",
  "api_key" : "YOUR API KEY",
  "secret_key" : "YOUR SECRET KEY",
  "debug_level" : "info"
}

The string of debug_level is based on Ruby Logger.

STEP 2. Create instance of Cloudn API (Synopsis)

Write down some fancy codes with Cloudn API.

require 'cloudn-api'

# Create Cloudn API instance
client = CloudnAPI::Client.new

# Configuration file can be specified here explicitly.
## client = CloudnAPI::Client.new('hoge/foobar.json')

# Then use Cloudn API

## when an API doesn't need any options, call method with no argument like this:
client.listUsers

## when an API needs options, then call method with arguments like this:
client.listUsers({ keyword: 'YOUR KEY WORD' })

Methods available are checked at :

Misc

  • Async query is handled as synced query, which means CloudnAPI library waits for http response from Cloudn.

Contributing

  1. Fork it ( https://github.com/[my-github-username]/CloudnAPI/fork )
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create a new Pull Request

FAQs

Package last updated on 27 Feb 2015

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