{"id":18818414,"url":"https://github.com/smithsonian/edanrb","last_synced_at":"2025-04-13T23:32:40.794Z","repository":{"id":11847836,"uuid":"14405280","full_name":"Smithsonian/edanrb","owner":"Smithsonian","description":"ruby connector for EDAN API","archived":false,"fork":false,"pushed_at":"2013-11-16T14:20:19.000Z","size":128,"stargazers_count":4,"open_issues_count":0,"forks_count":1,"subscribers_count":16,"default_branch":"master","last_synced_at":"2025-04-11T03:07:02.712Z","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":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Smithsonian.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"license.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2013-11-14T19:53:38.000Z","updated_at":"2022-03-03T22:38:41.000Z","dependencies_parsed_at":"2022-08-29T07:20:20.669Z","dependency_job_id":null,"html_url":"https://github.com/Smithsonian/edanrb","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/Smithsonian%2Fedanrb","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Smithsonian%2Fedanrb/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Smithsonian%2Fedanrb/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Smithsonian%2Fedanrb/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Smithsonian","download_url":"https://codeload.github.com/Smithsonian/edanrb/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248796904,"owners_count":21163050,"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-08T00:16:39.965Z","updated_at":"2025-04-13T23:32:40.766Z","avatar_url":"https://github.com/Smithsonian.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# EDAN API Ruby Library\n\nThis is for an initial exploration of a Smithsonian API.\n\nUse of this library requires a name \u0026 password and is currently for developers who are registered volunteers.\n\nContact Info:\n  Sarah Allen\n  allensa@si.edu\n\n## Usage\n\n```\ngem install edanrb\nexport EDANUSER=SECRETNAME\nexport EDANPASS=SECRETPASS\n\ngem install json\nirb\n\u003e require 'edan'\n\u003e eq = EDANQuery.new('myapp')\n\u003e res = eq.request('q=art\u0026wt=json')\n\u003e res.code\n =\u003e \"200\"\n\n\u003e require 'json'\n\u003e JSON.parse(res.body)\n =\u003e {\"responseHeader\" ...\n```\n\n## Using the Gem with Rails 3.x+\n### Add edanrb gem to your Gemfile:\n```\ngem 'edanrb'\n```\nThen, run the 'bundle install' command.\n\n### Add authentication settings:\nThere are two ways to do this, you can create a file in your /config/initializer directory:\n```\nconfig/initializer/edanrb_settings.rb:\n\n# specify the username and password for the EDAN API:\nENV['EDANUSER'] = \"this_is_my_username\"\nENV['EDANPASS'] = \"this_is_my_password\"\n```\n\nAlternatively, you can do this from the command line when you start your rails server if you do not want to commit auth info for security reasons.\n```\n\u003e EDANUSER=\"this_is_my_username\" EDANPASS=\"this_is_my_password\" rails server\n```\n\n## That's it! Now you're ready to rock with EDAN.\nDon't forget to add the 'require' statement to your controllers or other locations where you'll be calling edanrb methods:\n```\nrequire 'edan'\n\ndef hello_edan_world\n   eq = EDANQuery.new('myapp')\n   res = eq.request('q=art\u0026wt=json')\n   json_res = JSON.parse(res.body)\nend\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsmithsonian%2Fedanrb","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsmithsonian%2Fedanrb","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsmithsonian%2Fedanrb/lists"}