{"id":21421736,"url":"https://github.com/feracommerce/fera-api-ruby","last_synced_at":"2026-04-11T03:32:43.399Z","repository":{"id":50423465,"uuid":"519007557","full_name":"feracommerce/fera-api-ruby","owner":"feracommerce","description":"Official Fera API ruby SDK gem to make interfacing with your business's reviews easy.","archived":false,"fork":false,"pushed_at":"2024-01-06T00:32:44.000Z","size":131,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-07-04T17:50:33.148Z","etag":null,"topics":["api-client","bigcommerce","customer-reviews","fera","magento","magento2","rails","reviews","ruby","ruby-gem","rubygem","shopify","ugc","user-generated-content","wix"],"latest_commit_sha":null,"homepage":"https://developers.fera.ai","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/feracommerce.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}},"created_at":"2022-07-28T22:12:28.000Z","updated_at":"2023-07-18T09:14:55.000Z","dependencies_parsed_at":"2024-01-06T01:46:31.927Z","dependency_job_id":null,"html_url":"https://github.com/feracommerce/fera-api-ruby","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/feracommerce/fera-api-ruby","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/feracommerce%2Ffera-api-ruby","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/feracommerce%2Ffera-api-ruby/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/feracommerce%2Ffera-api-ruby/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/feracommerce%2Ffera-api-ruby/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/feracommerce","download_url":"https://codeload.github.com/feracommerce/fera-api-ruby/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/feracommerce%2Ffera-api-ruby/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31668046,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-10T17:19:37.612Z","status":"online","status_checked_at":"2026-04-11T02:00:05.776Z","response_time":54,"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":["api-client","bigcommerce","customer-reviews","fera","magento","magento2","rails","reviews","ruby","ruby-gem","rubygem","shopify","ugc","user-generated-content","wix"],"created_at":"2024-11-22T20:37:44.879Z","updated_at":"2026-04-11T03:32:43.374Z","avatar_url":"https://github.com/feracommerce.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Checks](https://github.com/feracommerce/fera-api-ruby/actions/workflows/checks.yml/badge.svg)](https://github.com/feracommerce/fera-api-ruby/actions/workflows/checks.yml)\n[![Tests](https://github.com/feracommerce/fera-api-ruby/actions/workflows/tests.yml/badge.svg)](https://github.com/feracommerce/fera-api-ruby/actions/workflows/tests.yml)\n\n# Fera API Ruby Client\n\nWelcome to the Fera API gem for Ruby. This gem is Fera's official Ruby SDK and make it easy to interact with the Fera API.\n\nFera API Developer Docs and API Reference can be found at: [https://developers.fera.ai](developers.fera.ai)\n\n# Installation\n\nInstall the gem and add to the application's Gemfile by executing:\n\n```ruby\n  gem 'fera-api'\n```\n\n# Configuration\nThe Fera::API gem accepts 2 [both Secret/API Key authentication](https://developers.fera.ai/docs/api-key-authentication) \nto authenticate against your own Fera store/account, or \n[Auth Token authentication](https://developers.fera.ai/docs/partners-app-authentication) to authenticate against a Fera \nstore/account that you have access to with your Fera App.\n\nYou can learn more about how to obtain your API key or obtain an auth token in our [developer docs](https://developers.fera.ai).\n\n## Configuring for your own Fera store/account\nAssuming you're using the `dotenv` gem (recommended) simply set the `FERA_SECRET_KEY` env variable to your store's\nsecret key, then run:\n```ruby\nFera::API.configure(ENV['FERA_SECRET_KEY'])\n```\n\nIf you're not using the `dotenv` then just run `Fera::API.configure(\"sk_your_secret_key\")` directly.\n\n## Rails Setup\nIf you're using rails the best way to configure the gem is to add the following to your `config/initializers/fera.rb`:\n\n```ruby\nFera::API.configure(ENV['FERA_SECRET_KEY'])\n```\n(And of course set the ENV variable)\n\n## Configuring as a Fera App\nIf you're building a Fera Partner App, you're going to need to authenticate like this instead:\n```ruby\nFera::API.configure(store_auth_token) do\n  # Some code here that will run against the store which you're authenticated against\nend\n```\n`store_auth_token` is what you get after successfully completing [OAuth flow for a Fera account/store](https://developers.fera.ai/docs/partners-app-authentication)./\n\nThis gem also comes with a helper class for working with an app:\n```ruby\n$fera_app = Fera::App.new(ENV['FERA_CLIENT_ID'], ENV['FERA_CLIENT_SECRET'])\n```\nWe recommend assigning this to a global variable since the methods in the `Fera::App` instance won't vary from Fera \nstore/account to store/account.\n\n\n# Usage\nIf you've configured the gem globally because you're only working with 1 store, you can now just call Fera models just\nlike you would call a Rails model:\n```ruby\nFera::Review.all # Returns collection of reviews.\n```\n\n\n### Partner App Usage\nIf you're building an app and want to run a method against a specific store only, you can run the same code but within\nthe `Fera::API` block:\n```ruby\nFera::API.configure(store_auth_token) do\n  Fera::Review.all # Returns collection of reviews.\nend\n```\nIf you're building a partner app on Ruby, you might also want to check out the [Fera OmniAuth Strategy gem](https://github.com/feracommerce/omniauth-fera)\nthat will make it easy to connect our app to Fera to get an auth token and start using this API.\n\n# Examples\n## Reviews\nSee https://developers.fera.ai/reference/reviews\n### List all reviews\n```ruby\nFera::Review.all # Returns collection of reviews.\n```\n\n### List a product's reviews\n```ruby\nFera::Review.for_product(product_id: \"123\") # Returns collection of reviews for product with id \"123\".\n```\n\n### List a customer's reviews\n```ruby\nFera::Review.where(customer_id: \"123\")\n```\n\n### Create a review\n```ruby\nFera::Review.create(\n  product_id: \"123\",\n  rating: 5,\n  body: \"This is a great product!\"\n)\n```\n\n### Retrieve specific review\n```ruby\nFera::Review.find(\"frev_abc123\") # Returns review with id \"frev_abc123\".\n```\n\n### Update review\n```ruby\nreview.update(body: \"This is a new review body\")\n# OR:\nreview.body = \"This is a new review body\"\nreview.save!\n```\n\n### Delete review\n```ruby\nreview.destroy!\n```\n\n\n## Photos and Videos (Media)\nA media object may either be a photo or a video.\n\nSee https://developers.fera.ai/reference/media\n\n### List all photos and videos\n```ruby\nFera::Media.all # Returns collection of reviews.\n```\n\n### List a product's photos and videos\n```ruby\nFera::Media.for_product(product_id: \"123\") # Returns collection of reviews for product with id \"123\".\n```\n\n### Create photo\n```ruby\nFera::Photo.create(\n  product_id: \"123\",\n  file: \"path/to/file\",\n  caption: \"This is my photo.\"\n)\n```\n\n### Create video\n```ruby\nFera::Video.create(\n  product_id: \"123\",\n  file: \"path/to/file\",\n  caption: \"This is my video.\"\n)\n```\n\n### Retrieve specific photo or video\n```ruby\nmedia = Fera::Media.find(\"fmed_abc123\") # Returns photo or video with id \"frev_abc123\".\nputs \"URL to #{ media.is_photo? ? 'photo' : 'video' }: #{ media.url }\"\n```\n\n### Update photo or video\n```ruby\nmedia.update(caption: \"This is a new media caption\")\n# OR:\nmedia.caption = \"This is a new media caption\"\nmedia.save!\n```\n\n### Delete photo or video\n```ruby\nmedia.destroy!\n```\n\n\n## Customers\nSee https://developers.fera.ai/reference/customers\n\n### List all customers\n```ruby\nFera::Customer.all # Returns collection of customers.\n```\n\n### Create customer\n```ruby\nFera::Customer.create(\n  name: \"Michael Bluth\",\n  email: \"michael.bluth@example.com\",\n  external_id: \"shopify_customer_1234\"\n)\n```\n\n### Retrieve specific customer\n```ruby\nFera::Customer.find(\"fcus_abc123\") # Returns customer with id \"fcus_abc123\".\n```\n\n### Update customer\n```ruby\ncustomer.update(name: \"Tobias Funke\")\n# OR:\ncustomer.name = \"Tobias Funke\"\ncustomer.save!\n```\n\n### Delete customer\n```ruby\ncustomer.destroy!\n```\n\n## Ratings\nSee https://developers.fera.ai/reference/ratings\n\n### Retrieve a specific product's rating\n```ruby\nrating = Fera::Rating.for_product(\"product_id_1\")\nputs \"Product has #{ rating.count } reviews with an average rating of #{ rating.average }/5.\"\n```\n\n### List a list of product ratings\n```ruby\nFera::Rating.for_products([\"product_id_1\", \"product_id_2\", \"product_id_3\"]) # Returns collection of ratings for product with id \"123\".\n```\n\n### Retrieve the store's overall rating\n```ruby\nrating = Fera::Rating.for_store\nputs \"This store is rated #{ rating.average }/5 on average by #{ rating.count } customer(s).\"\n```\n\n\n## Other resources to check out\nYou can use some of the other resources the same way:\n- [Webhooks](https://developers.fera.ai/reference/webhooks)\n- [Store](https://developers.fera.ai/reference/store)\n- [Products](https://developers.fera.ai/reference/products)\n\n**See our [developer API reference](https://developers.fera.ai/reference) for all filters, methods and options.**\n\n# Contributing\n\nBug reports and pull requests are welcome on GitHub at https://github.com/feracommerce/fera-api-ruby.\n\n\n### How to contribute\nTo contribute to the repository:\n\n1. Fork the repository.\n2. Clone the forked repository locally.\n3. Create a branch descriptive of your work. For example \"my_new_feature_xyz\".\n4. When you're done work, push up that branch to **your own forked repository** (not the main one).\n5. Visit https://github.com/feracommerce/fera-api-ruby and you'll see an option to create a pull request from your forked branch to the master. Create a pull request.\n\n\n# License\n\nThe gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fferacommerce%2Ffera-api-ruby","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fferacommerce%2Ffera-api-ruby","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fferacommerce%2Ffera-api-ruby/lists"}