{"id":18728762,"url":"https://github.com/rubyonworld/flare","last_synced_at":"2025-11-12T05:30:18.939Z","repository":{"id":174007908,"uuid":"542162023","full_name":"RubyOnWorld/flare","owner":"RubyOnWorld","description":"Super thin Ruby wrapper for Cloudflare's V4 API.","archived":false,"fork":false,"pushed_at":"2022-09-28T01:15:45.000Z","size":33,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2024-12-28T14:26:20.734Z","etag":null,"topics":["api","ruby","super","v4","wrapper"],"latest_commit_sha":null,"homepage":"","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/RubyOnWorld.png","metadata":{"files":{"readme":"README.md","changelog":null,"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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-09-27T15:37:56.000Z","updated_at":"2022-09-28T04:07:46.000Z","dependencies_parsed_at":null,"dependency_job_id":"f7d17dac-f797-4f4e-9efe-d5baf9700a5e","html_url":"https://github.com/RubyOnWorld/flare","commit_stats":null,"previous_names":["rubyonworld/flare"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RubyOnWorld%2Fflare","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RubyOnWorld%2Fflare/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RubyOnWorld%2Fflare/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RubyOnWorld%2Fflare/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/RubyOnWorld","download_url":"https://codeload.github.com/RubyOnWorld/flare/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239599039,"owners_count":19665911,"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","ruby","super","v4","wrapper"],"created_at":"2024-11-07T14:24:16.504Z","updated_at":"2025-11-12T05:30:18.231Z","avatar_url":"https://github.com/RubyOnWorld.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Gem Version](https://badge.fury.io/rb/rubyflare.svg)](https://badge.fury.io/rb/rubyflare) [![Code Climate](https://codeclimate.com/github/trev/rubyflare/badges/gpa.svg)](https://codeclimate.com/github/trev/rubyflare) [![Test Coverage](https://codeclimate.com/github/trev/rubyflare/badges/coverage.svg)](https://codeclimate.com/github/trev/rubyflare/coverage) [![Build Status](https://travis-ci.org/trev/rubyflare.svg?branch=master)](https://travis-ci.org/trev/rubyflare)\n# Rubyflare\n\nSuper thin Ruby wrapper for Cloudflare's V4 API.\n\n## Installation\n\nAdd this line to your application's Gemfile:\n\n```ruby\ngem 'rubyflare'\n```\n\nAnd then execute:\n\n    $ bundle\n\nOr install it yourself as:\n\n    $ gem install rubyflare\n\n## Usage\n\nFirst off, open https://api.cloudflare.com/ to see all the available endpoints\n\n### Quick start\n\n#### Setup connection\n\n```\n  require 'rubyflare'\n  \n  connection = Rubyflare.connect_with('bear@dog.com', 'supersecretapikey')\n\n  # OR connect with API Token\n  connection = Rubyflare.connect_with_token('API_TOKEN')\n```\n\n#### GET your user account details\n\n```\n  user = connection.get('user')\n\n  # Read the first result\n  p user.result\n\n  # Read your first name\n  p user.result[:first_name]\n```\n\n#### Update(PATCH) your user account\n\n```\n  user = connection.patch('user', { first_name: 'Bear' })\n\n  # Read the first result\n  p user.result\n```\n\n#### GET all your zones\n\n```\n  zones = connection.get('zones')\n\n  # Read the first zone\n  p zones.result\n\n  # Read the array of zones. Pluralize #result\n  p zones.results\n```\n\n#### Create(POST) a new zone (domain)\n\n```\n  zone = connection.post('zones', { name: 'supercooldomain.com' })\n\n  # Check it out\n  p zone.result\n```\n\n#### Add(POST) an A Record to the zone\n\n```\n  dns_record = connection.post('zones/{#zone.result[:id]}/dns_records', {\n                               type: 'A',\n                               name: 'supercooldomain.com',\n                               content: '127.0.0.1'\n                               })\n  \n  # Check it out\n  p dns_record.result\n```\n\n#### DELETE a zone\n\n```\n  deleted_zone = connection.delete('zones/#{zone.result[:id]}')\n  \n  # Check out the response\n  p deleted_zone\n```\n\n#### Catch errors\n\n```\n  begin\n    connection.get('user')\n  rescue =\u003e e\n    # Inspect e.reponse for more details\n    p e.response\n  end\n```\n\n## Development\n\nAfter 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.\n\nTo 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 tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).\n\n## Contributing\n\nBug reports and pull requests are welcome on GitHub at https://github.com/trev/rubyflare. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](contributor-covenant.org) code of conduct.\n\n\n## License\n\nThe gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frubyonworld%2Fflare","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frubyonworld%2Fflare","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frubyonworld%2Fflare/lists"}