ScalewayApi

Scaleway client for Ruby.

Installation

Install the gem and add to the application's Gemfile by executing:

$ bundle add scaleway_api

If bundler is not being used to manage dependencies, install the gem by executing:

$ gem install scaleway_api

Usage

Configuration

ScalewayApi.configure do |config|
    config.region = 'fr-par-1'
    config.api_key = 'abcdefabcdefabcdef'
end

Access a resource

Resources are all handled the same way. The code below can be adapted to all resources (images, servers, snapshots) and works identically.

# Returns a list of all images
ScalewayApi::Image.all

# Returns the first image
ScalewayApi::Image.all.first

# Returns the name of the first image
ScalewayApi::Image.all.first.name

Development

After checking out the repo, run bin/setup to install dependencies. Then, run rake spec to run the tests. You can also run bin/console for an interactive prompt that will allow you to experiment.

To install this gem onto your local machine, run bundle exec rake install. To release a new version, update the version number in version.rb, and then run bundle exec rake release, which will create a git tag for the version, push git commits and the created tag, and push the .gem file to rubygems.org.

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/code-fabrik/scaleway_api.

License

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