{"id":16335656,"url":"https://github.com/hoverbear/digitalocean","last_synced_at":"2025-03-20T23:30:45.895Z","repository":{"id":20121422,"uuid":"88180534","full_name":"Hoverbear/digitalocean","owner":"Hoverbear","description":"A prototype API for Digital Ocean.","archived":false,"fork":false,"pushed_at":"2023-10-24T17:38:21.000Z","size":311,"stargazers_count":37,"open_issues_count":9,"forks_count":11,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-03-17T18:48:41.060Z","etag":null,"topics":["api","api-wrapper","digitalocean","provisioning","rust-library"],"latest_commit_sha":null,"homepage":"https://docs.rs/crate/digitalocean/","language":"Rust","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/Hoverbear.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-04-13T15:38:03.000Z","updated_at":"2023-10-24T17:38:25.000Z","dependencies_parsed_at":"2024-10-28T09:09:43.101Z","dependency_job_id":"eea1cf01-8682-4197-8395-54e643c1a577","html_url":"https://github.com/Hoverbear/digitalocean","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Hoverbear%2Fdigitalocean","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Hoverbear%2Fdigitalocean/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Hoverbear%2Fdigitalocean/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Hoverbear%2Fdigitalocean/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Hoverbear","download_url":"https://codeload.github.com/Hoverbear/digitalocean/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244710435,"owners_count":20497239,"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":["api","api-wrapper","digitalocean","provisioning","rust-library"],"created_at":"2024-10-10T23:42:04.416Z","updated_at":"2025-03-20T23:30:45.633Z","avatar_url":"https://github.com/Hoverbear.png","language":"Rust","readme":"# DigitalOcean\n\n[![Build Status](https://travis-ci.org/Hoverbear/digitalocean.svg?branch=master)](https://travis-ci.org/Hoverbear/digitalocean)\n[![Crates.io](https://img.shields.io/crates/v/digitalocean.svg)](https://crates.io/crates/digitalocean)\n\nA crate for interacting with the Digital Ocean API.\n\nWhile browsing this documentation, please feel encouraged to reference the\n[DigitalOcean docs](https://developers.digitalocean.com/documentation/v2/).\n\n## A Basic Example\n\n```rust,no_run\nextern crate digitalocean;\nuse digitalocean::prelude::*;\nuse std::env;\n\nfn main() {\n    let api_key = env::var(\"API_KEY\")\n        .expect(\"API_KEY not set.\");\n    let client = DigitalOcean::new(api_key)\n        .unwrap();\n\n    Droplet::list()\n        .execute(\u0026client);\n}\n```\n\n## Usage Fundamentals\n\nAll values (`Domain`, `SshKey`, etc) can be found in the `api` module.\n\nCalling an action will return a `Request\u003c_,_\u003e` type. For example `Droplet::create()` will create a\n`Request\u003cCreate, Droplet\u003e`. These types may then have specific futher functions to futher build up\nthe request or transform it into some other request.\n\n```rust,no_run\nextern crate digitalocean;\nuse digitalocean::DigitalOcean;\nuse digitalocean::api::Domain;\n\nfn main() {\n    // Gets details of a specific domain.\n    let req = Domain::get(\"foo.com\");\n\n    // Get the records for that domain instead (futher build the request)\n    let req = req.records();\n    // Get the records of a domain without having a prior request.\n    let req = Domain::get(\"foo.com\").records();\n\n    // Create a new record for a domain\n    let req = Domain::get(\"foo.com\").records().create(\"CNAME\", \"test\", \"127.0.0.1\");\n}\n```\n\nIn order to realize any action, `.execute()` must be called with a `DigitalOcean`\n client. It is also possible to call `do_client.execute(some_request)`.\n\nIn order to use the entire API, it is recommended to reference the various `Request` types.\n\n## Design\n\nThe crate is founded on a few design considerations:\n\n* Keep things simple and generic.\n* Map closely to the DigitalOcean API.\n* `Request`s are agnostic over `Client`s.\n* It should be difficult to make an invalid API request.\n* Use static dispatch as much as possible.\n* Only the bare minimum amount of information should be carried around.\n* Allow for easy construction of separate clients (`hyper`, etc.)\n* No caching (yet). (DigitalOcean does not have [ETags](https://en.wikipedia.org/wiki/HTTP_ETag))\n\n## Debugging\n\nThis crate uses the [`log`](https://doc.rust-lang.org/log/log/index.html) crate. You can see `digitalocean` logs by passing an environment variable such as:\n\n```bash\nRUST_LOG=digitalocean=debug cargo run\n```\n\n## Development Status\n\nThis crate is in a prototype state.\n\nNot all endpoints have been fully end-to-end tested on the production DigitalOcean API. It's very\nlikely that some endpoints will have parsing errors due to unexpected values returned from the API.\n\n**If something does not work please file a bug!**\n\nFeedback, patches, and new features are encouraged. \nPlease just open an issue or PR!\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhoverbear%2Fdigitalocean","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhoverbear%2Fdigitalocean","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhoverbear%2Fdigitalocean/lists"}