{"id":15406902,"url":"https://github.com/dannyben/apicake","last_synced_at":"2025-10-18T03:42:46.413Z","repository":{"id":17498362,"uuid":"81871975","full_name":"DannyBen/apicake","owner":"DannyBen","description":"Build Dynamic API Wrappers","archived":false,"fork":false,"pushed_at":"2024-02-23T13:05:58.000Z","size":74,"stargazers_count":5,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-05-01T14:12:04.588Z","etag":null,"topics":["api","api-wrapper","gem","ruby"],"latest_commit_sha":null,"homepage":null,"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/DannyBen.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","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}},"created_at":"2017-02-13T21:10:25.000Z","updated_at":"2023-05-12T17:55:24.000Z","dependencies_parsed_at":"2024-02-23T14:24:29.268Z","dependency_job_id":"8e90e570-6fca-4f22-a9d2-050080345cf3","html_url":"https://github.com/DannyBen/apicake","commit_stats":{"total_commits":65,"total_committers":3,"mean_commits":"21.666666666666668","dds":0.5076923076923077,"last_synced_commit":"afa9612d3afacefd8d1245d095a65209172a28e3"},"previous_names":[],"tags_count":9,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DannyBen%2Fapicake","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DannyBen%2Fapicake/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DannyBen%2Fapicake/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DannyBen%2Fapicake/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/DannyBen","download_url":"https://codeload.github.com/DannyBen/apicake/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":220053640,"owners_count":16588698,"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":["api","api-wrapper","gem","ruby"],"created_at":"2024-10-01T16:26:08.902Z","updated_at":"2025-10-18T03:42:46.404Z","avatar_url":"https://github.com/DannyBen.png","language":"Ruby","readme":"# API Cake - Build Dynamic API Wrappers\n\nThis gem allows you to easily build rich API wrappers with minimal code.\n\nIt is HTTParty with a Cake.\n\n---\n\n\n## Install\n\n```\n$ gem install apicake\n```\n\nOr with bundler:\n\n```ruby\ngem 'apicake'\n```\n\n\n## TL;DR\n\nTurn this hypothetical API URL:\n\n```\nhttp://api.recipes.com/cakes?layers=3 \n```\n\nTo this:\n\n```ruby\nrecipes = Recipes.new\nrecipes.cakes layers:3\n```\n\nUsing this code only:\n\n```ruby\nclass Recipes \u003c APICake::Base\n  base_uri 'api.recipes.com'\nend\n```\n\n\n## Features\n\n- Uses HTTParty\n- Built in caching\n- Built in save to file\n- Built in response parsing (part of HTTParty)\n- Built in convert and save to CSV\n- Designed for GET-only APIs (e.g., data services)\n\n\n## Usage\n\nCreate a class and inherit from `APICake::Base`.\n\nThis class automatically includes HTTParty, so you can do whatever you do in\nHTTParty. In addition, the `APICake::Base` class defines a `method_missing`\nmethod, so any call to an undefined method, will simply be converted to a \nURL.\n\nFor example:\n\n```ruby\nclass Recipes \u003c\u003c APICake::Base\n  base_uri 'api.recipes.com/v1'\nend\n\nrecipes = Recipes.new\n\n# This will access http://api.recipes.com/v1/cakes\nrecipes.cakes\n\n# This will access http://api.recipes.com/v1/cakes/chocolate\nrecipes.cakes 'chocolate'\n\n# This will access http://api.recipes.com/v1/cakes/chocolate?layers=3\nrecipes.cakes 'chocolate', layers: 3\n```\n\nSee the [Examples folder][1] for more examples.\n\n\n## Caching\n\nAPICake uses [Lightly][2] for caching. By default, cached objects are stored\nin the `./cache` directory for 3600 seconds.\n\nSee the [caching example][3].\n\n\n## Method Reference\n\nFor a detailed explanation of the services and methods you get when inheriting\nfrom `APICake::Base`, see the [class documentation][4].\n\n\n## Real World Examples\n\nThese gems use APICake:\n\n- [Fredric][5] - API wrapper for the FRED database ([go straight to API class][8])\n- [Intrinio][6] - API wrapper for the Intrinio data service ([go straight to API class][9])\n- [Quata][7] - API wrapper for the Quandl data service ([go straight to API class][10])\n- [EOD Historical Data][11] - API wrapper for the EOD Historical Data service ([go straight to API class][12])\n- [Nasdaq][13] - API wrapper for the Nasdaq Data Link API ([go straight to API class][14])\n\n\n---\n\n[1]: https://github.com/DannyBen/apicake/tree/master/examples\n[2]: https://github.com/DannyBen/lightly\n[3]: https://github.com/DannyBen/apicake/blob/master/examples/04-caching.rb\n[4]: http://www.rubydoc.info/gems/apicake/0.1.1/APICake/Base\n[5]: https://github.com/DannyBen/fredric\n[6]: https://github.com/DannyBen/intrinio\n[7]: https://github.com/DannyBen/quata\n[8]: https://github.com/DannyBen/fredric/blob/master/lib/fredric/api.rb\n[9]: https://github.com/DannyBen/intrinio/blob/master/lib/intrinio/api.rb\n[10]: https://github.com/DannyBen/quata/blob/master/lib/quata/api.rb\n[11]: https://github.com/DannyBen/eod\n[12]: https://github.com/DannyBen/eod/blob/master/lib/eod/api.rb\n[13]: https://github.com/dannyben/nasdaq\n[14]: https://github.com/dannyben/nasdaqblob/master/lib/nasdaq/api.rb\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdannyben%2Fapicake","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdannyben%2Fapicake","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdannyben%2Fapicake/lists"}