{"id":22808322,"url":"https://github.com/sixarm/sixarm_ruby_freebase","last_synced_at":"2025-03-30T21:15:46.410Z","repository":{"id":920635,"uuid":"684689","full_name":"SixArm/sixarm_ruby_freebase","owner":"SixArm","description":"SixArm.com » Ruby » Freebase client with a simple way to query Freebase.com ","archived":false,"fork":false,"pushed_at":"2023-09-15T19:28:10.000Z","size":333,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-02-06T00:25:22.093Z","etag":null,"topics":["freebase","freebase-client","gem","ruby"],"latest_commit_sha":null,"homepage":"http://sixarm.com","language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/SixArm.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGES.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":"CODEOWNERS","security":null,"support":null}},"created_at":"2010-05-25T07:21:41.000Z","updated_at":"2023-09-15T19:28:15.000Z","dependencies_parsed_at":"2022-08-16T11:30:14.924Z","dependency_job_id":null,"html_url":"https://github.com/SixArm/sixarm_ruby_freebase","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/SixArm%2Fsixarm_ruby_freebase","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SixArm%2Fsixarm_ruby_freebase/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SixArm%2Fsixarm_ruby_freebase/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SixArm%2Fsixarm_ruby_freebase/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/SixArm","download_url":"https://codeload.github.com/SixArm/sixarm_ruby_freebase/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246379366,"owners_count":20767696,"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":["freebase","freebase-client","gem","ruby"],"created_at":"2024-12-12T11:09:13.766Z","updated_at":"2025-03-30T21:15:46.386Z","avatar_url":"https://github.com/SixArm.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# SixArm.com → Ruby → \u003cbr\u003e Freebase client with a simple way to query Freebase.com\n\n* Doc: \u003chttp://sixarm.com/sixarm_ruby_freebase/doc\u003e\n* Gem: \u003chttp://rubygems.org/gems/sixarm_ruby_freebase\u003e\n* Repo: \u003chttp://github.com/sixarm/sixarm_ruby_freebase\u003e\n\u003c!--header-shut--\u003e\n\n\n## Introduction\n\nFreebase client with a simple way to query Freebase.com\n\nFor docs go to \u003chttp://sixarm.com/sixarm_ruby_freebase/doc\u003e\n\nWant to help? We're happy to get pull requests.\n\n\n\u003c!--install-open--\u003e\n\n## Install\n\n### Gem\n\nTo install this gem in your shell or terminal:\n\n    gem install sixarm_ruby_freebase\n\n### Gemfile\n\nTo add this gem to your Gemfile:\n\n    gem 'sixarm_ruby_freebase'\n\n### Require\n\nTo require the gem in your code:\n\n    require 'sixarm_ruby_freebase'\n\n\u003c!--install-shut--\u003e\n\n\n## Examples\n\nInstall:\n\n    gem install sixarm_ruby_freebase\n\nExample:\n\n    require \"sixarm_ruby_freebase\"\n    require \"pp\" \n\n    query = '{\"id\":\"/en/china\",\"capital\":null,\"type\":\"/location/country\"}'\n\n    pp Freebase.read(query)\n    #=\u003e {\"id\"=\u003e\"/en/china\", \"type\"=\u003e\"/location/country\", \"capital\"=\u003e\"Beijing\"}\n\n    pp Freebase.read(query)['capital']\n    #=\u003e \"Beijing\"\n\nExample of multiple queries\"\n\n    query1 = '{\"id\":\"/en/india\",\"capital\":null,\"type\":\"/location/country\"}'\n    query2 = '{\"id\":\"/en/japan\",\"capital\":null,\"type\":\"/location/country\"}'\n\n    pp Freebase.read(query1,query2)\n    #=\u003e [{\"id\"=\u003e\"/en/india\", \"type\"=\u003e\"/location/country\", \"capital\"=\u003e\"New Delhi\"},\n         {\"id\"=\u003e\"/en/japan\", \"type\"=\u003e\"/location/country\", \"capital\"=\u003e\"Tokyo\"}]\n\n    pp Freebase.read(query1,query2).map{|result| result['capital']}\n    #=\u003e [\"New Delhi\",\"Tokyo\"]\n\n## Name Query\n\nExample:\n\n    query = Freebase.name_query('Cher')\n    #=\u003e  {\"/type/reflect/any_value\"=\u003e[{\n            \"lang\"=\u003e\"/lang/en\",\n            \"link|=\"=\u003e\n              [\n                \"/type/object/name\", \n                \"/common/topic/alias\"\n              ],\n           \"type\"=\u003e\"/type/text\",\n           \"value\"=\u003e\"cher\"\n           }],\n         \"t1:type\"=\u003e\"/people/person\",\n         \"t2:type\"=\u003e\"/common/topic\",\n         \"t3:type\"=\u003e{\n           \"name\"=\u003e\"/people/deceased_person\",\n           \"optional\"=\u003e\"optional\"\n         },\n         \"id\"=\u003e\"null\"\n         }\n\nExample of finding a person's id:\n\n    Freebase.read(Freebase.name_query('Cher'))['id']\n    #=\u003e \"/en/cher\"\n\n\n## Query Formats\n\nYou can provide a query as a JSON string or as a Hash.\n\nThe query methods will convert:\n\n  * a Hash to a JSON string e.g. {:foo=\u003e'bar'} to '{\"foo\":\"bar\"}\n  * a nil value to the freebase 'null' string e.g. {:foo=\u003enil} to {\"foo\":null}\n  * anything else: we call to_s then to_json\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsixarm%2Fsixarm_ruby_freebase","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsixarm%2Fsixarm_ruby_freebase","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsixarm%2Fsixarm_ruby_freebase/lists"}