{"id":13994394,"url":"https://github.com/dmarkow/faraday_yaml","last_synced_at":"2025-07-22T19:32:15.533Z","repository":{"id":1376679,"uuid":"1329693","full_name":"dmarkow/faraday_yaml","owner":"dmarkow","description":"YAML Response/Request Middleware for Faraday","archived":true,"fork":false,"pushed_at":"2011-05-10T15:56:55.000Z","size":100,"stargazers_count":5,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2024-10-31T05:52:01.484Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dmarkow.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2011-02-04T21:47:36.000Z","updated_at":"2023-11-07T15:56:52.000Z","dependencies_parsed_at":"2022-07-29T11:09:34.391Z","dependency_job_id":null,"html_url":"https://github.com/dmarkow/faraday_yaml","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/dmarkow%2Ffaraday_yaml","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dmarkow%2Ffaraday_yaml/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dmarkow%2Ffaraday_yaml/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dmarkow%2Ffaraday_yaml/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dmarkow","download_url":"https://codeload.github.com/dmarkow/faraday_yaml/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":227166698,"owners_count":17740964,"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-09T14:02:51.036Z","updated_at":"2024-11-29T16:31:21.778Z","avatar_url":"https://github.com/dmarkow.png","language":"Ruby","funding_links":[],"categories":["Ruby"],"sub_categories":[],"readme":"# Faraday YAML Middleware\n\nYeah, JSON is at least 2.9x cooler than YAML, but sometimes you're stuck using it, right?\n\n## Installation\n\n    gem install faraday_yaml\n\n### Examples\n\nGithub's YAML API is currently deprecated; it works for the response example, but not for the request example.\n\n#### Response\n\n    conn = Faraday::Connection.new(:url =\u003e \"http://github.com\") do |builder|\n      builder.adapter Faraday.default_adapter\n      builder.use Faraday::Response::YAML\n    end\n\n    resp = conn.get do |req|\n      req.url \"/api/v2/yaml/user/show/dmarkow\"\n    end\n\n    u = resp.body\n    u['user']['name']\n    # =\u003e \"Dylan Markow\"\n\n#### Request\n\n    conn = Faraday::Connection.new(:url =\u003e \"http://USERNAME:PASSWORD@github.com\") do |builder|\n      builder.adapter Faraday.default_adapter\n      builder.use Faraday::Request::YAML\n      builder.use Faraday::Response::YAML\n    end\n\n    resp = conn.post do |req|\n      req.url \"/api/v2/yaml/user/show/dmarkow\"\n      req.body = {\n        \"values\" =\u003e {\n          \"location\" =\u003e \"Portland, OR\"\n        }\n      }\n    end\n\n    u = resp.body\n    u['user']['location']\n    # =\u003e \"Portland, OR\"\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdmarkow%2Ffaraday_yaml","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdmarkow%2Ffaraday_yaml","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdmarkow%2Ffaraday_yaml/lists"}