{"id":22112383,"url":"https://github.com/lukeredpath/musickit-graphql","last_synced_at":"2025-03-24T04:43:03.709Z","repository":{"id":66018043,"uuid":"136482471","full_name":"lukeredpath/musickit-graphql","owner":"lukeredpath","description":"An experimental GraphQL wrapper for the MusicKit REST API, written in Ruby","archived":false,"fork":false,"pushed_at":"2018-06-07T13:42:43.000Z","size":10,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-01-29T10:43:20.629Z","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/lukeredpath.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-06-07T13:36:24.000Z","updated_at":"2019-05-17T12:45:37.000Z","dependencies_parsed_at":"2023-03-03T19:45:17.984Z","dependency_job_id":null,"html_url":"https://github.com/lukeredpath/musickit-graphql","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lukeredpath%2Fmusickit-graphql","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lukeredpath%2Fmusickit-graphql/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lukeredpath%2Fmusickit-graphql/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lukeredpath%2Fmusickit-graphql/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lukeredpath","download_url":"https://codeload.github.com/lukeredpath/musickit-graphql/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245212125,"owners_count":20578439,"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-12-01T10:57:45.693Z","updated_at":"2025-03-24T04:43:03.684Z","avatar_url":"https://github.com/lukeredpath.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# MusicKit GraphQL API Wrapper\n\nJust a learning experiment to help understand both the MusicKit REST API and GraphQL. This is by no means feature complete, but you're welcome to fork and extend.\n\n## Installation\n\nRequirements:\n\n* Ruby 2.x (I'm using Ruby 2.5, I haven't tested other versions)\n* Bundler gem preinstalled (`gem install bundler`)\n\nInstall the bundled gems, I recommend using binstubs (`bundler install --binstubs`).\n\n## Obtaining a MusicKit developer token\n\nYou'll need a MusicKit developer token to authenticate with the REST API.\n\nFollow the [instructions outlined in the MusicKit documentation](https://developer.apple.com/documentation/applemusicapi/getting_keys_and_creating_tokens). Make a note of your key ID and your developer team ID, and download the `.p8` file to the `keys` directory in the project root. The GraphQL server will look for the first file with a `.p8` extension here. The contents of this directory are ignored by git.\n\n## Starting the GraphQL server\n\nThe backend is a simple Sinatra app that serves the GraphQL schema at the `/graphql` endpoint.\n\nThe Gemfile includes the `foreman` and `puma` gems and a `Procfile` and `config.ru` file are supplied, so the server can be started using `foreman start web`.\n\nYou'll need to expose your key ID and team ID to the server using the environment variables `MUSICKIT_KEY_ID` and `MUSICKIT_TEAM_ID` respectively:\n\n```\nMUSICKIT_KEY_ID=abc MUSICKIT_TEAM_ID=123 foreman start web\n```\n\n## Testing the server\n\nThe simplest way to test the server is to use [graphiql](https://github.com/graphql/graphiql/). Simply point it at your endpoint (by default this will be http://localhost:9292/graphql) and start exploring.\n\nHere's an example query:\n\n```graphql\n{\n  artist(id: 302709189, storefront: \"gb\", include: ALBUMS) {\n    id\n    href\n    type\n    attributes {\n      genreNames\n    }\n    relationships {\n      albums {\n        href\n        data {\n          id\n          attributes {\n            name\n          }\n        }\n      }\n    }\n  }\n}\n```\n\nThe API has been designed to mirror the [MusicKit API reference](https://developer.apple.com/documentation/applemusicapi#//apple_ref/doc/uid/TP40017625-CH2-SW1) as closely as possible. The only entity in the MusicKit API reference excluded from returned results is the `ResponseRoot` object.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flukeredpath%2Fmusickit-graphql","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flukeredpath%2Fmusickit-graphql","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flukeredpath%2Fmusickit-graphql/lists"}