{"id":13531775,"url":"https://github.com/gemhome/faraday-xml","last_synced_at":"2025-04-01T20:30:30.890Z","repository":{"id":65217258,"uuid":"588252494","full_name":"gemhome/faraday-xml","owner":"gemhome","description":"Faraday XML Middleware","archived":false,"fork":false,"pushed_at":"2023-09-15T06:34:25.000Z","size":29,"stargazers_count":1,"open_issues_count":2,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-05T13:49:48.999Z","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/gemhome.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2023-01-12T17:28:39.000Z","updated_at":"2024-12-05T13:05:17.000Z","dependencies_parsed_at":"2023-02-14T04:15:30.883Z","dependency_job_id":null,"html_url":"https://github.com/gemhome/faraday-xml","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gemhome%2Ffaraday-xml","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gemhome%2Ffaraday-xml/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gemhome%2Ffaraday-xml/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gemhome%2Ffaraday-xml/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/gemhome","download_url":"https://codeload.github.com/gemhome/faraday-xml/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246709921,"owners_count":20821296,"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-01T07:01:05.628Z","updated_at":"2025-04-01T20:30:30.274Z","avatar_url":"https://github.com/gemhome.png","language":"Ruby","readme":"# Faraday XML\n\n[![GitHub Workflow Status](https://img.shields.io/github/workflow/status/gemhome/faraday-xml/ci)](https://github.com/gemhome/faraday-xml/actions?query=branch%3Amain)\n[![Gem](https://img.shields.io/gem/v/faraday-xml.svg?style=flat-square)](https://rubygems.org/gems/faraday-xml)\n[![License](https://img.shields.io/github/license/gemhome/faraday-xml.svg?style=flat-square)](LICENSE.md)\n\nFaraday XML Middleware.\n\n## Installation\n\nAdd this line to your application's Gemfile:\n\n```ruby\ngem 'faraday-xml'\n```\n\nAnd then execute:\n\n```shell\nbundle install\n```\n\nOr install it yourself as:\n\n```shell\ngem install faraday-xml\n```\n\n## Usage\n\n```ruby\nrequire 'faraday'\nrequire 'faraday/xml'\n\nconn = Faraday.new do |builder|\n  builder.headers.update(\n    \"Accept\" =\u003e \"application/xml\",\n    \"Content-Type\" =\u003e \"application/xml;charset=UTF-8\",\n  )\n  # or builder.use Faraday::XML::Request\n  builder.request :xml # encode Hash as XML\n  # or builder.use Faraday::XML::Response\n  builder.response :xml # decode response bodies from XML\nend\n```\n\nThere is also basic support for first class XML encoding/parsing\n\n```ruby\nrequire 'faraday'\nrequire 'faraday/xml'\nhash = { 'user' =\u003e { 'name' =\u003e 'Erik Michaels-Ober', 'screen_name' =\u003e 'sferik' } }\nxml = '\u003cuser\u003e\u003cname\u003eErik Michaels-Ober\u003c/name\u003e\u003cscreen_name\u003esferik\u003c/screen_name\u003e\u003c/user\u003e'\n\nencoder = Faraday::XML::Encoder.build!(indent: 0)\nencoder.encode(hash) == xml\n\nparser = Faraday::XML::Parser.build!\nparser.parse(xml) == hash\n```\n\n## Development\n\nAfter checking out the repo, run `bin/setup` to install dependencies.\n\nThen, run `bin/test` to run the tests.\n\nTo install this gem onto your local machine, run `rake build`.\n\nTo release a new version, make a commit with a message such as \"Bumped to 0.0.2\" and then run `rake release`.\nSee how it works [here](https://bundler.io/guides/creating_gem.html#releasing-the-gem).\n\n## Contributing\n\nBug reports and pull requests are welcome on [GitHub](https://github.com/gemhome/faraday-xml).\n\n## License\n\nThe gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).\n","funding_links":[],"categories":["Middleware"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgemhome%2Ffaraday-xml","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgemhome%2Ffaraday-xml","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgemhome%2Ffaraday-xml/lists"}