{"id":30021142,"url":"https://github.com/qnyp/qnyp-graphql-example-ruby","last_synced_at":"2025-08-06T02:19:53.617Z","repository":{"id":37602683,"uuid":"88846351","full_name":"qnyp/qnyp-graphql-example-ruby","owner":"qnyp","description":"Ruby examples with graphql-client for qnyp GraphQL API.","archived":false,"fork":false,"pushed_at":"2024-08-01T01:46:49.000Z","size":1458,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-08-02T04:37:07.858Z","etag":null,"topics":["anime","api","graphql","ruby"],"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/qnyp.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","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":"2017-04-20T09:27:26.000Z","updated_at":"2024-08-01T01:46:51.000Z","dependencies_parsed_at":"2023-02-17T00:30:46.833Z","dependency_job_id":"ae1cdfdb-e533-4c4f-b966-e60c4e989a09","html_url":"https://github.com/qnyp/qnyp-graphql-example-ruby","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/qnyp/qnyp-graphql-example-ruby","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/qnyp%2Fqnyp-graphql-example-ruby","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/qnyp%2Fqnyp-graphql-example-ruby/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/qnyp%2Fqnyp-graphql-example-ruby/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/qnyp%2Fqnyp-graphql-example-ruby/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/qnyp","download_url":"https://codeload.github.com/qnyp/qnyp-graphql-example-ruby/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/qnyp%2Fqnyp-graphql-example-ruby/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":269006010,"owners_count":24343441,"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","status":"online","status_checked_at":"2025-08-06T02:00:09.910Z","response_time":99,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["anime","api","graphql","ruby"],"created_at":"2025-08-06T02:19:48.414Z","updated_at":"2025-08-06T02:19:53.609Z","avatar_url":"https://github.com/qnyp.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# qnyp GraphQL API Example (Ruby)\n\nこのリポジトリには、Rubyから[qnyp GraphQL API](http://developer.qnyp.com)を呼び出す以下のサンプルスクリプトが含まれています。\n\n- `search_titles.rb` - タイトルをキーワード検索して結果を出力します\n- `get_title.rb` - タイトルの情報を取得して結果を出力します\n- `create_log.rb` - エピソードの視聴ログを記録します\n\nサンプルを実行するにはqnypのアクセストークンが必要です。\n\n## アクセストークンの取得\n\nqnypにログインした状態で [https://qnyp.com/settings/api](https://qnyp.com/settings/api) にアクセスすると、 `write` スコープを持つ自分用のアクセストークンを生成することができます。\n\n\u003cimg src=\"./images/personal-access-token.jpg\" width=\"550\" height=\"480\" alt=\"Screenshot\" /\u003e\n\n## 準備\n\n```console\n$ ruby -v\nruby 2.4.1p111 (2017-03-22 revision 58053) [x86_64-darwin16]\n\n$ git clone https://github.com/qnyp/qnyp-graphql-example-ruby.git\n$ cd qnyp-graphql-example-ruby\n$ bundle install --path .bundle\n```\n\n## search_titles.rb\n\n環境変数`ACCESS_TOKEN`にアクセストークンの値を、引数に検索キーワードを指定します。\n\n```console\n$ ACCESS_TOKEN=アクセストークン bundle exec ./search_titles.rb 検索キーワード\n```\n\n実行例:\n\n\u003cimg src=\"./images/example1.png\" width=\"803\" height=\"235\" alt=\"Screenshot\" /\u003e\n\n## get_title.rb\n\n環境変数`ACCESS_TOKEN`にアクセストークンの値を、引数にタイトルのIDを指定します。\n\n```console\n$ ACCESS_TOKEN=アクセストークン bundle exec ./get_title.rb タイトルのID\n```\n\n実行例:\n\n\u003cimg src=\"./images/example2.png\" width=\"640\" height=\"540\" alt=\"Screenshot\" /\u003e\n\n## create_log.rb\n\n環境変数`ACCESS_TOKEN`にアクセストークンの値を、引数に対象のエピソードおよび記録する内容を指定します。\n本文を指定しなかった場合は、本文の無い視聴ログが作成されます。\n\n```console\n$ ACCESS_TOKEN=アクセストークン bundle exec ./create_log.rb エピソードのID 評価 本文\n```\n\n実行例:\n\n```console\n$ ACCESS_TOKEN=アクセストークン bundle exec ./create_log.rb RXBpc29kZS03NDkyOA GREAT \"すごーい！\"\n\nid: TG9nLTIxMTcw\ndatabaeId: XXXXX\ncreatedAt: 2017-04-28T11:11:00Z\nbody: すごーい！\nrating: GREAT\nuser.username: junya\nepisode.subtitle: さばんなちほー\nurl: http://qnyp.com/junya/logs/XXXXX\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fqnyp%2Fqnyp-graphql-example-ruby","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fqnyp%2Fqnyp-graphql-example-ruby","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fqnyp%2Fqnyp-graphql-example-ruby/lists"}