{"id":15685215,"url":"https://github.com/nejdetkadir/render-ruby","last_synced_at":"2025-05-07T18:09:15.632Z","repository":{"id":43541296,"uuid":"463278732","full_name":"nejdetkadir/render-ruby","owner":"nejdetkadir","description":"Ruby bindings for Render API V1","archived":false,"fork":false,"pushed_at":"2022-02-27T20:53:27.000Z","size":31,"stargazers_count":9,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-05-07T18:04:38.177Z","etag":null,"topics":["client","render","render-com","ruby","ruby-bindings","ruby-client","ruby-gem"],"latest_commit_sha":null,"homepage":"https://api-docs.render.com/reference/introduction","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/nejdetkadir.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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}},"created_at":"2022-02-24T19:38:53.000Z","updated_at":"2023-06-17T17:33:25.000Z","dependencies_parsed_at":"2022-09-02T06:12:30.649Z","dependency_job_id":null,"html_url":"https://github.com/nejdetkadir/render-ruby","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nejdetkadir%2Frender-ruby","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nejdetkadir%2Frender-ruby/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nejdetkadir%2Frender-ruby/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nejdetkadir%2Frender-ruby/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nejdetkadir","download_url":"https://codeload.github.com/nejdetkadir/render-ruby/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252931533,"owners_count":21827111,"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":["client","render","render-com","ruby","ruby-bindings","ruby-client","ruby-gem"],"created_at":"2024-10-03T17:24:20.583Z","updated_at":"2025-05-07T18:09:15.550Z","avatar_url":"https://github.com/nejdetkadir.png","language":"Ruby","readme":"[![Gem Version](https://badge.fury.io/rb/render_ruby.svg)](https://badge.fury.io/rb/render_ruby)\n![test](https://github.com/nejdetkadir/render-ruby/actions/workflows/test.yml/badge.svg?branch=main)\n![rubocop](https://github.com/nejdetkadir/render-ruby/actions/workflows/rubocop.yml/badge.svg?branch=main)\n[![Ruby Style Guide](https://img.shields.io/badge/code_style-rubocop-brightgreen.svg)](https://github.com/rubocop/rubocop)\n![Ruby Version](https://img.shields.io/badge/ruby_version-\u003e=_2.6.0-blue.svg)\n\n# RenderRuby\nRuby bindings for [Render API](https://api-docs.render.com)\n\n## Installation\n\nAdd this line to your application's Gemfile:\n\n```ruby\ngem 'render_ruby'\n```\n\nAnd then execute:\n\n    $ bundle install\n\nOr install it yourself as:\n\n    $ gem install render_ruby\n\n## Usage\nTo access the API, you'll need to create a RenderRuby::Client and pass in your API key. You can find your API key at https://render.com/docs/api\n\n```ruby\nclient = RenderRuby::Client.new(api_key: ENV['RENDER_API_KEY'])\n```\nThe client then gives you access to each of the resources.\n\n## Resources\nThe gem maps as closely as we can to the Render API so you can easily convert API examples to gem code.\n\nResponses are created as objects like RenderRuby::Owner. Having types like RenderRuby::Owner is handy for understanding what type of object you're working with. They're built using OpenStruct so you can easily access data in a Ruby-ish way.\n\n#### Pagination\n\n`list` endpoints return pages of results. The result object will have a data key to access the results, as well as metadata like next_cursor and prev_cursor for retrieving the next and previous pages. You may also specify the\n\n```ruby\nresults = client.owners.list(limit: 100) # limit is optional, defaults to 20.\n#=\u003e RenderRuby::Collection\n\nresults.total\n#=\u003e 55\n\nresults.data\n#=\u003e [#\u003cRenderRuby::Owner\u003e, #\u003cRenderRuby::Owner\u003e]\n\nresults.next_cursor\n#=\u003e \"XMTjXEjiQJmNjEwZ2QwZWQ5N2x2MGZ\"\n\n# Retrieve the next page\nclient.owners.list(limit: 100, cursor: results.next_cursor)\n#=\u003e RenderRuby::Collection\n```\n\n### Owners\n```ruby\nresponse = client.owners.list\n#=\u003e RenderRuby::Collection\n\nresponse.data.first.user?\n#=\u003e true\n\nresponse.data.first.team?\n#=\u003e false\n\nclient.owners.retrieve(owner_id: 'XMTjXEjiQJmNjEwZ2QwZWQ5N2x2MGZ')\n#=\u003e RenderRuby::Owner\n```\n\n### Services\n```ruby\nclient.services.list\n#=\u003e RenderRuby::Collection\n\nservice = client.services.retrieve(service_id: 'XMTjXEjiQJmNjEwZ2QwZWQ5N2x2MGZ')\n#=\u003e RenderRuby::Service\n\nservice.auto_deploy_enabled?\n#=\u003e true\n\nservice.suspended?\n#=\u003e false\n\nRenderRuby::Service::TYPES\n#=\u003e ['static_site', 'web_service', 'private_service', 'background_worker', 'cron_job']\n\nclient.services.create(\n  type: RenderRuby::Service::TYPES.sample,\n  name: 'foo bar',\n  ownerId: 'XMTjXEjiQJmNjEwZ2QwZWQ5N2x2MGZ',\n  repo: 'https://github.com/render-examples/flask-hello-world',\n  autoDeploy: 'yes', # or 'no',\n  branch: 'master'\n)\n#=\u003e RenderRuby::Service\n\nclient.services.update(\n  service_id: 'XMTjXEjiQJmNjEwZ2QwZWQ5N2x2MGZ',\n  name: 'foo bar',\n  autoDeploy: 'yes', # or 'no',\n  branch: 'master'\n)\n#=\u003e RenderRuby::Service\n\nclient.services.delete(service_id: 'XMTjXEjiQJmNjEwZ2QwZWQ5N2x2MGZ')\n#=\u003e Faraday::Response\n\nclient.services.suspend(service_id: 'XMTjXEjiQJmNjEwZ2QwZWQ5N2x2MGZ')\n#=\u003e Faraday::Response\n\nclient.services.resume(service_id: 'XMTjXEjiQJmNjEwZ2QwZWQ5N2x2MGZ')\n#=\u003e Faraday::Response\n\nclient.services.retrieve_env_vars(service_id:'XMTjXEjiQJmNjEwZ2QwZWQ5N2x2MGZ')\n#=\u003e RenderRuby::Collection\n\nclient.services.update_env_var(\n  service_id: 'XMTjXEjiQJmNjEwZ2QwZWQ5N2x2MGZ',\n  env_vars: [\n    {\n       name: 'FOO',\n       value: 'bar'\n    }\n  ]\n)\n#=\u003e RenderRuby::EnvironmentVariable\n\nclient.services.retrieve_headers(service_id: 'XMTjXEjiQJmNjEwZ2QwZWQ5N2x2MGZ')\n#=\u003e RenderRuby::Collection\n\nresults = client.services.retrieve_redirect_and_rewrite_rules(service_id: 'XMTjXEjiQJmNjEwZ2QwZWQ5N2x2MGZ')\n#=\u003e RenderRuby::Collection\n\nresults.data.first.redirect?\n#=\u003e true\n\nresults.data.first.rewrite?\n#=\u003e false\n\nclient.services.scale(service_id: 'XMTjXEjiQJmNjEwZ2QwZWQ5N2x2MGZ', num_instances: 1)\n#=\u003e RenderRuby::Scale\n```\n\n### Jobs\n```ruby\nclient.jobs.list(service_id: 'XMTjXEjiQJmNjEwZ2QwZWQ5N2x2MGZ')\n#=\u003e RenderRuby::Collection\n\nclient.jobs.retrieve(service_id: 'XMTjXEjiQJm', job_id: 'XMTjXEjiQJ')\n#=\u003e RenderRuby::Job\n\nclient.jobs.create(\n  service_id: 'XMTjXEjiQJmNjEwZ2QwZWQ5N2x2MGZ',\n  start_command: 'yarn dev',\n  planId: 'XMTjXEjiQJmNjEwZ2QwZWQ5N2x2MGZ' # optional\n)\n#=\u003e RenderRuby::Job\n```\n\n### Deploys\n```ruby\nclient.deploys.list(service_id: 'XMTjXEjiQJmNjEwZ2QwZWQ5N2x2MGZ')\n#=\u003e RenderRuby::Collection\n\nclient.deploys.retrieve(service_id: 'XMTjXEjiQJm', deploy_id: 'XMTjXEjiQJ')\n#=\u003e RenderRuby::Deploy\n\nclient.deploys.trigger(\n  service_id: 'XMTjXEjiQJmNjEwZ2QwZWQ5N2x2MGZ',\n  clear_cache: 'clear' # or 'do_not_clear'\n)\n#=\u003e RenderRuby::Deploy\n```\n\n### Custom Domains\n```ruby\nclient.custom_domains.list(service_id: 'XMTjXEjiQJmNjEwZ2QwZWQ5N2x2MGZ')\n#=\u003e RenderRuby::Collection\n\nclient.custom_domains.retrieve(service_id: 'XMTjXEjiQJm', custom_domain_id: 'XMTjXEjiQJ')\n#=\u003e RenderRuby::CustomDomain\n\nclient.custom_domains.create(\n  service_id: 'XMTjXEjiQJmNjEwZ2QwZWQ5N2x2MGZ',\n  domain: 'www.nejdetkadirbektas.com'\n)\n#=\u003e RenderRuby::CustomDomain\n\nclient.custom_domains.delete(service_id: 'XMTjXEjiQJm', custom_domain_id: 'XMTjXEjiQJ')\n#=\u003e Faraday::Response\n```\n\n## Contributing\n\nBug reports and pull requests are welcome on GitHub at https://github.com/nejdetkadir/render-ruby. 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/nejdetkadir/render-ruby/blob/main/CODE_OF_CONDUCT.md).\n\n## License\n\nThe gem is available as open source under the terms of the [MIT License](LICENSE).\n\n## Code of Conduct\n\nEveryone interacting in the RenderRuby project's codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/nejdetkadir/render-ruby/blob/main/CODE_OF_CONDUCT.md).\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnejdetkadir%2Frender-ruby","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnejdetkadir%2Frender-ruby","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnejdetkadir%2Frender-ruby/lists"}