{"id":13878730,"url":"https://github.com/pat/render_api","last_synced_at":"2025-05-05T21:43:24.989Z","repository":{"id":43408264,"uuid":"437493781","full_name":"pat/render_api","owner":"pat","description":"Ruby interface for the render.com API.","archived":false,"fork":false,"pushed_at":"2022-05-29T12:50:27.000Z","size":39,"stargazers_count":19,"open_issues_count":0,"forks_count":2,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-21T23:19:11.870Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/pat.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-12-12T08:41:25.000Z","updated_at":"2023-06-14T11:24:56.000Z","dependencies_parsed_at":"2022-08-31T05:52:08.399Z","dependency_job_id":null,"html_url":"https://github.com/pat/render_api","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pat%2Frender_api","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pat%2Frender_api/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pat%2Frender_api/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pat%2Frender_api/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pat","download_url":"https://codeload.github.com/pat/render_api/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252582242,"owners_count":21771634,"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-06T08:01:57.965Z","updated_at":"2025-05-05T21:43:24.972Z","avatar_url":"https://github.com/pat.png","language":"Ruby","funding_links":[],"categories":["Ruby"],"sub_categories":[],"readme":"# Render API\n\nA Ruby interface for [the render.com API](https://render.com/docs/api).\n\nAt this point in time all known API endpoints are supported.\n\n## Installation\n\nAdd this line to your application's Gemfile:\n\n```ruby\ngem \"render_api\"\n```\n\nAnd then execute:\n\n    $ bundle install\n\nOr install it yourself as:\n\n    $ gem install render_api\n\n## Usage\n\nReturned response objects can be enumerated upon when a list of records are returned, and also can provide rate-limit details via `rate_limit`, `rate_limit_remaining`, and `rate_limit_reset` methods.\n\nThe response objects respond to underscored versions of the attribute names - e.g. a service responds to `auto_deploy` with the value from the underlying hash for the key `autoDeploy`. Timestamp strings are automatically converted to Time objects, and nested hashes are also provided as these utility objects.\n\nAlso: when the response objects are from a list, they respond to `cursor`, for use with pagination.\n\n### Creating a client\n\n```ruby\nclient = RenderAPI.client(api_key)\n```\n\n### Services\n\n```ruby\nclient.services.list(limit: nil, cursor: nil, filters: nil)\nclient.services.find(service_id)\n```\n\n```ruby\nservices = client.services.list(limit: 20)\n\nputs services.rate_limit, services.rate_limit_remaining\n\nservices.each do |service|\n  puts service.id\n  puts service.cursor\n  puts service.service_details.build_command\nend\n\n# https://api-docs.render.com/reference/create-service\nclient.services.create(name: \"my-new-service\", ...)\n# https://api-docs.render.com/reference/update-service\nclient.services.update(service_id, name: \"my-new-service\", ...)\nclient.services.delete(service_id)\n\nclient.services.suspend(service_id)\nclient.services.resume(service_id)\nclient.services.scale(service_id, num_instances: 5)\n\nclient.services.list_headers(service_id, limit: nil, cursor: nil, filters: nil)\nclient.services.list_routes(service_id, limit: nil, cursor: nil, filters: nil)\nclient.services.list_variables(service_id, limit: nil, cursor: nil)\n# Note that updating variables requires all variables to be provided.\n# https://api-docs.render.com/reference/update-env-vars-for-service\n# (i.e. a full update, not a partial update)\nclient.services.update_variables(\n  service_id,\n  [\n    { key: \"RAILS_ENV\", value: \"production\" },\n    { key: \"RAILS_SESSION_SECRET\", generate_value: \"yes\" }\n  ]\n)\n```\n\n### Deploys\n\n```ruby\nclient.deploys.list(service_id, limit: nil, cursor: nil, filters: nil)\nclient.deploys.create(service_id, clear_cache: \"do_not_clear\")\nclient.deploys.find(service_id, deploy_id)\n```\n\n### Domains\n\n```ruby\nclient.domains.list(service_id, limit: nil, cursor: nil, filters: nil)\nclient.domains.create(service_id, name: \"example.com\")\nclient.domains.find(service_id, domain_id)\nclient.domains.verify(service_id, domain_id)\nclient.domains.delete(service_id, domain_id)\n```\n\n## Owners\n\n```ruby\nclient.owners.list(limit: nil, cursor: nil, filters: nil)\nclient.owners.find(owner_id)\n```\n\n## Jobs\n\n```ruby\nclient.jobs.list(service_id, limit: nil, cursor: nil, filters: nil)\nclient.jobs.create(service_id, start_command: \"whoami\")\nclient.jobs.find(service_id, job_id)\n```\n\n## Development\n\nAfter checking out the repo, run `bin/setup` to install dependencies. Then, run `bundle exec rspec` to run the tests, and `bundle exec rubocop` to confirm linting and code structure. You can also run `bin/console` for an interactive prompt that will allow you to experiment.\n\n## Contributing\n\nBug reports and pull requests are welcome on GitHub at https://github.com/pat/render_api. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [code of conduct](https://github.com/pat/render_api/blob/main/CODE_OF_CONDUCT.md).\n\n## License\n\nThe gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).\n\n## Code of Conduct\n\nEveryone interacting in the Render API project's codebase and other repository features is expected to follow the [code of conduct](https://github.com/pat/render_api/blob/main/CODE_OF_CONDUCT.md).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpat%2Frender_api","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpat%2Frender_api","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpat%2Frender_api/lists"}