{"id":13484147,"url":"https://github.com/lostisland/sawyer","last_synced_at":"2025-05-15T11:00:21.930Z","repository":{"id":683966,"uuid":"2544008","full_name":"lostisland/sawyer","owner":"lostisland","description":"Secret User Agent of HTTP","archived":false,"fork":false,"pushed_at":"2022-06-07T13:11:17.000Z","size":293,"stargazers_count":246,"open_issues_count":7,"forks_count":65,"subscribers_count":10,"default_branch":"master","last_synced_at":"2025-03-15T05:07:18.096Z","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":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/lostisland.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2011-10-09T19:15:53.000Z","updated_at":"2024-12-17T08:07:19.000Z","dependencies_parsed_at":"2022-08-16T10:40:42.268Z","dependency_job_id":null,"html_url":"https://github.com/lostisland/sawyer","commit_stats":null,"previous_names":[],"tags_count":24,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lostisland%2Fsawyer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lostisland%2Fsawyer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lostisland%2Fsawyer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lostisland%2Fsawyer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lostisland","download_url":"https://codeload.github.com/lostisland/sawyer/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244407570,"owners_count":20447810,"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-07-31T17:01:19.927Z","updated_at":"2025-05-15T11:00:21.899Z","avatar_url":"https://github.com/lostisland.png","language":"Ruby","funding_links":[],"categories":["Ruby","HTTP Clients and tools","HTTP"],"sub_categories":[],"readme":"# Sawyer\n\nSawyer is an experimental hypermedia agent for Ruby built on top of [Faraday][faraday].\n\n[faraday]: https://github.com/lostisland/faraday\n\n## Installation\n\nAdd this line to your application's Gemfile:\n\n```ruby\ngem 'sawyer'\n```\n\nAnd then execute:\n\n```sh\nbundle\n```\n\nOr install it yourself as:\n\n```sh\ngem install sawyer\n```\n\n## Usage\n\n```ruby\nrequire \"sawyer\"\n\n# Create a Sawyer agent\nagent = Sawyer::Agent.new(\"https://api.github.com\",\n  links_parser: Sawyer::LinkParsers::Simple.new)\n\n# Fetch the root of the API\nroot = agent.root.data\n\n# Access a resource directly\ncontributors = agent.call(:get, \"repos/lostisland/sawyer/contributors\").data\n\n# Load a hypermedia relation\ntop_contributor = contributors.first\nfollowers = top_contributor.rels[:followers].get.data\n```\n\nFor more information, check out the [documentation](http://www.rubydoc.info/gems/sawyer/).\n\n## Development\n\nAfter checking out the repo, run `script/test` to bootstrap the project and run the tests.\nYou can also run `script/console` for an interactive prompt that will allow you to experiment.\n\nTo package the gem, run `script/package`. To release a new version, update the version number in [`lib/sawyer.rb`](lib/sawyer.rb), and then run `script/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\nCheck out the [contributing guide](CONTRIBUTING.md) for more information on contributing.\n\n## License\n\nThe gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flostisland%2Fsawyer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flostisland%2Fsawyer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flostisland%2Fsawyer/lists"}