{"id":13665687,"url":"https://github.com/motdotla/digitalocean","last_synced_at":"2025-05-07T04:09:21.649Z","repository":{"id":7337083,"uuid":"8659770","full_name":"motdotla/digitalocean","owner":"motdotla","description":"The easiest and most complete rubygem for DigitalOcean.","archived":false,"fork":false,"pushed_at":"2022-02-14T11:15:06.000Z","size":213,"stargazers_count":154,"open_issues_count":0,"forks_count":37,"subscribers_count":18,"default_branch":"master","last_synced_at":"2025-05-07T04:09:09.515Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"http://rubygems.org/gems/digitalocean","language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/motdotla.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2013-03-08T21:01:31.000Z","updated_at":"2025-05-04T08:10:48.000Z","dependencies_parsed_at":"2022-08-29T15:31:33.925Z","dependency_job_id":null,"html_url":"https://github.com/motdotla/digitalocean","commit_stats":null,"previous_names":["scottmotte/digitalocean"],"tags_count":8,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/motdotla%2Fdigitalocean","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/motdotla%2Fdigitalocean/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/motdotla%2Fdigitalocean/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/motdotla%2Fdigitalocean/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/motdotla","download_url":"https://codeload.github.com/motdotla/digitalocean/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252810273,"owners_count":21807759,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-02T06:00:47.490Z","updated_at":"2025-05-07T04:09:21.623Z","avatar_url":"https://github.com/motdotla.png","language":"Ruby","funding_links":[],"categories":["1. language"],"sub_categories":["1.1 ruby"],"readme":"[![Donate](http://www.opensourcecitizen.org/badge)](http://www.opensourcecitizen.org/project?url=github.com/motdotla/digitalocean)\n\nIf you found this library useful, donate some CPU cycles to this project by clicking above. Thank you! 😇\n\n# Digitalocean Rubygem\n\n![](https://raw.github.com/scottmotte/digitalocean/master/digitalocean-rubygem.jpg)\n\n### The easiest and most complete rubygem for [DigitalOcean](https://www.digitalocean.com).\n\nNOTICE: This is a DigitalOcean V1 API client. It supports everything, the V1 API can do with a simple interface written in Ruby. Use [DropletKit](https://github.com/digitalocean/droplet_kit) for consuming the DigitalOcean V2 API.\n\n[![Build Status](https://travis-ci.org/motdotla/digitalocean.svg?branch=master)](https://travis-ci.org/motdotla/digitalocean)\n[![Gem Version](https://badge.fury.io/rb/digitalocean.svg)](http://badge.fury.io/rb/digitalocean)\n\n```ruby\nDigitalocean.client_id  = \"your_client_id\"\nDigitalocean.api_key    = \"your_api_key\"\nresult = Digitalocean::Droplet.all\n# =\u003e\n# \u003cRecursiveOpenStruct status=\"OK\", droplets=[\n#   {\"id\"=\u003e12345, \"name\"=\u003e\"dev\", \"image_id\"=\u003e2676, \"size_id\"=\u003e63, \"region_id\"=\u003e3, \"backups_active\"=\u003efalse, \"ip_address\"=\u003e\"198.555.55.55\", \"private_ip_address\"=\u003enil, \"locked\"=\u003efalse, \"status\"=\u003e\"active\", \"created_at\"=\u003e\"2013-06-12T03:07:14Z\"},\n#   {\"id\"=\u003e234674, \"name\"=\u003e\"server2\", \"image_id\"=\u003e441012, \"size_id\"=\u003e62, \"region_id\"=\u003e1, \"backups_active\"=\u003efalse, \"ip_address\"=\u003e\"192.555.55.56\", \"private_ip_address\"=\u003enil, \"locked\"=\u003efalse, \"status\"=\u003e\"active\", \"created_at\"=\u003e\"2013-06-17T00:30:12Z\"}\n# ]\u003e\n#\n\nresult.status\nresult.droplets\nresult.droplets.first.ip_address\n```\n\n## Installation\n\nAdd this line to your application's Gemfile:\n\n```\ngem 'digitalocean'\n```\n\nAnd then execute:\n\n```\nbundle\n```\n\nOr install it yourself as:\n\n```\ngem install digitalocean\n```\n\nThen in your application initialize the gem:\n\n```ruby\nDigitalocean.client_id  = \"your_client_id\"\nDigitalocean.api_key    = \"your_api_key\"\n```\n\nYou can find your keys at [https://cloud.digitalocean.com/api_access](https://cloud.digitalocean.com/api_access)\n\n[![](https://raw2.github.com/scottmotte/digitalocean/master/example.png)](https://cloud.digitalocean.com/api_access)\n\n## Usage\n\n### List Droplets\n\n```ruby\nDigitalocean::Droplet.all\n```\n\n### Find Droplet\n\n```ruby\nDigitalocean::Droplet.find(\"id_of_droplet\")\n```\n\n### Create Droplet\n\n```ruby\nDigitalocean::Droplet.create({:name =\u003e droplet_name, :size_id =\u003e size_id, :image_id =\u003e image_id, :region_id =\u003e region_id})\n```\n## Available Commands\n\n```ruby\nDigitalocean::Domain.all\nDigitalocean::Domain.find(id)\nDigitalocean::Domain.create({name: name, ip_address: ip_address})\nDigitalocean::Domain.destroy(id)\n\nDigitalocean::Droplet.all\nDigitalocean::Droplet.find(id)\nDigitalocean::Droplet.rename(id, {name: name})\nDigitalocean::Droplet.reboot(id)\nDigitalocean::Droplet.power_cycle(id)\nDigitalocean::Droplet.shutdown(id)\nDigitalocean::Droplet.power_off(id)\nDigitalocean::Droplet.power_on(id)\nDigitalocean::Droplet.snapshot(id, {name: name})\nDigitalocean::Droplet.create({name: name, size_id: size_id, image_id: image_id, region_id: region_id, ssh_key_ids: ssh_key_ids})\nDigitalocean::Droplet.destroy(id)\nDigitalocean::Droplet.resize(id, {size_id: size_id})\n\nDigitalocean::Image.all\nDigitalocean::Image.all({filter: \"my_images\"})\nDigitalocean::Image.find(id)\nDigitalocean::Image.destroy(id)\nDigitalocean::Image.transfer(id, {region_id: region_id})\n\nDigitalocean::Record.all(domain_id)\nDigitalocean::Record.find(domain_id, record_id)\nDigitalocean::Record.create(domain_id, {record_type: record_type, data: data})\nDigitalocean::Record.edit(domain_id, record_id, {record_type: record_type, data: data})\nDigitalocean::Record.destroy(domain_id, record_id)\n\nDigitalocean::Region.all\nDigitalocean::Region.find(region_id)\n\nDigitalocean::Size.all\nDigitalocean::Size.find(size_id)\n\nDigitalocean::SshKey.all\nDigitalocean::SshKey.find(id)\nDigitalocean::SshKey.create({name: name, ssh_pub_key: ssh_pub_key}) # Keep in mind you have to use CGI::escape for your ssh_pub_key\n\nDigitalocean::Event.find(id)\n```\n\n## Example\n\nThere is a [digitalocean-rubygem-example](https://github.com/scottmotte/digitalocean-rubygem-example) to help jumpstart your development.[tada]\n\n## Options\n\n```ruby\nDigitalocean.verify_ssl = false # optionally set this to false. defaults to true.\n```\n\n## Contributing\n\n1. Fork it\n2. Create your feature branch (`git checkout -b my-new-feature`)\n5. Commit your changes (`git commit -am 'Add some feature'`)\n6. Push to the branch (`git push origin my-new-feature`)\n7. Create new Pull Request\n\nWhen adding methods, add to the list of DEFINITIONS in `lib/digitalocean.rb`. Additionally, write a spec and add it to the list in the README.\n\n## Running Specs\n\n```\nbundle exec rspec spec/*\n```\n\n## Publish to RubyGems.org\n\nYou first need to request access from [scottmotte](http://github.com/scottmotte).\n\n```\ngem build digitalocean.gemspec\ngem push digitalocean-1.0.1.gem\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmotdotla%2Fdigitalocean","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmotdotla%2Fdigitalocean","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmotdotla%2Fdigitalocean/lists"}