{"id":21358529,"url":"https://github.com/jsonapi-rb/jsonapi-client","last_synced_at":"2025-06-12T05:32:15.911Z","repository":{"id":46124001,"uuid":"72305241","full_name":"jsonapi-rb/jsonapi-client","owner":"jsonapi-rb","description":null,"archived":false,"fork":false,"pushed_at":"2018-07-18T01:28:48.000Z","size":18,"stargazers_count":0,"open_issues_count":2,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-16T06:17:07.282Z","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":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jsonapi-rb.png","metadata":{"files":{"readme":"README.md","changelog":null,"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":"2016-10-29T19:32:14.000Z","updated_at":"2022-01-14T09:48:15.000Z","dependencies_parsed_at":"2022-07-26T10:32:04.553Z","dependency_job_id":null,"html_url":"https://github.com/jsonapi-rb/jsonapi-client","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/jsonapi-rb/jsonapi-client","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jsonapi-rb%2Fjsonapi-client","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jsonapi-rb%2Fjsonapi-client/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jsonapi-rb%2Fjsonapi-client/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jsonapi-rb%2Fjsonapi-client/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jsonapi-rb","download_url":"https://codeload.github.com/jsonapi-rb/jsonapi-client/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jsonapi-rb%2Fjsonapi-client/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":259404491,"owners_count":22852202,"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-11-22T05:18:23.323Z","updated_at":"2025-06-12T05:32:15.888Z","avatar_url":"https://github.com/jsonapi-rb.png","language":"Ruby","readme":"# jsonapi-client\nRuby gem for consuming [JSON API](http://jsonapi.org) documents.\n\n## Status\n\n[![Gem Version](https://badge.fury.io/rb/jsonapi-client.svg)](https://badge.fury.io/rb/jsonapi-client)\n[![Build Status](https://secure.travis-ci.org/jsonapi-rb/jsonapi-client.svg?branch=master)](http://travis-ci.org/jsonapi-rb/client?branch=master)\n\n## Installation\n```ruby\n# In Gemfile\ngem 'jsonapi-client'\n```\nthen\n```\n$ bundle\n```\nor manually via\n```\n$ gem install jsonapi-client\n```\n\n## Usage\n\nFirst, require the gem:\n```ruby\nrequire 'jsonapi/client'\n```\n\nThen\n```ruby\npayload = {\n  \"links\" =\u003e {\n    \"self\" =\u003e \"http://example.com/articles\",\n    \"next\" =\u003e \"http://example.com/articles?page[offset]=2\",\n    \"last\" =\u003e \"http://example.com/articles?page[offset]=10\"\n  },\n  \"data\" =\u003e [\n    {\n      \"type\" =\u003e \"articles\",\n      \"id\" =\u003e \"1\",\n      \"attributes\" =\u003e {\n        \"title\" =\u003e \"JSON API paints my bikeshed!\"\n      },\n      \"relationships\" =\u003e {\n        \"author\" =\u003e {\n          \"links\" =\u003e {\n            \"self\" =\u003e \"http://example.com/articles/1/relationships/author\",\n            \"related\" =\u003e \"http://example.com/articles/1/author\"\n          },\n          \"data\" =\u003e { \"type\" =\u003e \"people\", \"id\" =\u003e \"9\" }\n        },\n        \"comments\" =\u003e {\n          \"links\" =\u003e {\n            \"self\" =\u003e \"http://example.com/articles/1/relationships/comments\",\n            \"related\" =\u003e \"http://example.com/articles/1/comments\"\n          },\n          \"data\" =\u003e [\n            { \"type\" =\u003e \"comments\", \"id\" =\u003e \"5\" },\n            { \"type\" =\u003e \"comments\", \"id\" =\u003e \"12\" }\n          ]\n        }\n      },\n      \"links\" =\u003e {\n        \"self\" =\u003e \"http://example.com/articles/1\"\n      }\n    }\n  ],\n  \"included\" =\u003e [\n    {\n      \"type\" =\u003e \"people\",\n      \"id\" =\u003e \"9\",\n      \"attributes\" =\u003e {\n        \"first-name\" =\u003e \"Dan\",\n        \"last-name\" =\u003e \"Gebhardt\",\n        \"twitter\" =\u003e \"dgeb\"\n      },\n      \"links\" =\u003e {\n        \"self\" =\u003e \"http://example.com/people/9\"\n      }\n    }, {\n      \"type\" =\u003e \"comments\",\n      \"id\" =\u003e \"5\",\n      \"attributes\" =\u003e {\n        \"body\" =\u003e \"First!\"\n      },\n      \"relationships\" =\u003e {\n        \"author\" =\u003e {\n          \"data\" =\u003e { \"type\" =\u003e \"people\", \"id\" =\u003e \"2\" }\n        }\n      },\n      \"links\" =\u003e {\n        \"self\" =\u003e \"http://example.com/comments/5\"\n      }\n    }, {\n      \"type\" =\u003e \"comments\",\n      \"id\" =\u003e \"12\",\n      \"attributes\" =\u003e {\n        \"body\" =\u003e \"I like XML better\"\n      },\n      \"relationships\" =\u003e {\n        \"author\" =\u003e {\n          \"data\" =\u003e { \"type\" =\u003e \"people\", \"id\" =\u003e \"9\" }\n        }\n      },\n      \"links\" =\u003e {\n        \"self\" =\u003e \"http://example.com/comments/12\"\n      }\n    }\n  ]\n}\n\ndocument = JSONAPI::Client::Document.new(json_hash)\n\ndocument.data[0].relationships['author'].data.attributes['first-name']\n# =\u003e \"Dan\"\n```\n\n## License\n\njsonapi-client is released under the [MIT License](http://www.opensource.org/licenses/MIT).\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjsonapi-rb%2Fjsonapi-client","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjsonapi-rb%2Fjsonapi-client","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjsonapi-rb%2Fjsonapi-client/lists"}