{"id":15512240,"url":"https://github.com/GetStream/stream-ruby","last_synced_at":"2025-10-12T09:30:36.425Z","repository":{"id":687231,"uuid":"20328056","full_name":"GetStream/stream-ruby","owner":"GetStream","description":"Ruby Client - Build Activity Feeds \u0026 Streams with GetStream.io","archived":false,"fork":false,"pushed_at":"2025-08-14T07:35:43.000Z","size":357,"stargazers_count":85,"open_issues_count":1,"forks_count":32,"subscribers_count":37,"default_branch":"main","last_synced_at":"2025-10-11T13:47:15.395Z","etag":null,"topics":["activity-feed","feed","getstream-io","news-feed","notification-feed","ruby","stream-ruby","timeline"],"latest_commit_sha":null,"homepage":"https://getstream.io","language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/GetStream.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":".github/CODEOWNERS","security":"SECURITY.md","support":null,"governance":null}},"created_at":"2014-05-30T12:06:40.000Z","updated_at":"2025-08-14T07:35:35.000Z","dependencies_parsed_at":"2023-11-20T13:50:37.307Z","dependency_job_id":null,"html_url":"https://github.com/GetStream/stream-ruby","commit_stats":{"total_commits":345,"total_committers":28,"mean_commits":"12.321428571428571","dds":0.6144927536231883,"last_synced_commit":"046f113cf3aaed37ab57f23200874caa0bf95e39"},"previous_names":[],"tags_count":75,"template":false,"template_full_name":null,"purl":"pkg:github/GetStream/stream-ruby","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GetStream%2Fstream-ruby","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GetStream%2Fstream-ruby/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GetStream%2Fstream-ruby/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GetStream%2Fstream-ruby/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/GetStream","download_url":"https://codeload.github.com/GetStream/stream-ruby/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GetStream%2Fstream-ruby/sbom","scorecard":{"id":56092,"data":{"date":"2025-08-11","repo":{"name":"github.com/GetStream/stream-ruby","commit":"50df8e718cbcdec5a0821fca98c548d050a3027c"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":4.5,"checks":[{"name":"Code-Review","score":5,"reason":"Found 8/16 approved changesets -- score normalized to 5","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Security-Policy","score":10,"reason":"security policy file detected","details":["Info: security policy file detected: SECURITY.md:1","Info: Found linked content: SECURITY.md:1","Info: Found disclosure, vulnerability, and/or timelines in security policy: SECURITY.md:1","Info: Found text in security policy: SECURITY.md:1"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Pinned-Dependencies","score":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yml:18: update your workflow using https://app.stepsecurity.io/secureworkflow/GetStream/stream-ruby/ci.yml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/ci.yml:24: update your workflow using https://app.stepsecurity.io/secureworkflow/GetStream/stream-ruby/ci.yml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/ci.yml:26: update your workflow using https://app.stepsecurity.io/secureworkflow/GetStream/stream-ruby/ci.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/initiate_release.yml:15: update your workflow using https://app.stepsecurity.io/secureworkflow/GetStream/stream-ruby/initiate_release.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/initiate_release.yml:31: update your workflow using https://app.stepsecurity.io/secureworkflow/GetStream/stream-ruby/initiate_release.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/release.yml:16: update your workflow using https://app.stepsecurity.io/secureworkflow/GetStream/stream-ruby/release.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/release.yml:20: update your workflow using https://app.stepsecurity.io/secureworkflow/GetStream/stream-ruby/release.yml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/release.yml:31: update your workflow using https://app.stepsecurity.io/secureworkflow/GetStream/stream-ruby/release.yml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/release.yml:36: update your workflow using https://app.stepsecurity.io/secureworkflow/GetStream/stream-ruby/release.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/reviewdog.yml:15: update your workflow using https://app.stepsecurity.io/secureworkflow/GetStream/stream-ruby/reviewdog.yml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/reviewdog.yml:17: update your workflow using https://app.stepsecurity.io/secureworkflow/GetStream/stream-ruby/reviewdog.yml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/reviewdog.yml:22: update your workflow using https://app.stepsecurity.io/secureworkflow/GetStream/stream-ruby/reviewdog.yml/main?enable=pin","Info:   0 out of   6 GitHub-owned GitHubAction dependencies pinned","Info:   0 out of   6 third-party GitHubAction dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/ci.yml:1","Warn: no topLevel permission defined: .github/workflows/initiate_release.yml:1","Warn: no topLevel permission defined: .github/workflows/release.yml:1","Warn: no topLevel permission defined: .github/workflows/reviewdog.yml:1","Info: no jobLevel write permissions found"],"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: BSD 3-Clause \"New\" or \"Revised\" License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'main'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 24 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}}]},"last_synced_at":"2025-08-15T00:47:12.179Z","repository_id":687231,"created_at":"2025-08-15T00:47:12.180Z","updated_at":"2025-08-15T00:47:12.180Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279010938,"owners_count":26084837,"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-10-12T02:00:06.719Z","response_time":53,"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":["activity-feed","feed","getstream-io","news-feed","notification-feed","ruby","stream-ruby","timeline"],"created_at":"2024-10-02T09:53:32.635Z","updated_at":"2025-10-12T09:30:36.120Z","avatar_url":"https://github.com/GetStream.png","language":"Ruby","readme":"# Official Ruby SDK for [Stream Feeds](https://getstream.io/activity-feeds/)\n\n[![build](https://github.com/GetStream/stream-ruby/workflows/build/badge.svg)](https://github.com/GetStream/stream-ruby/actions) [![Gem Version](https://badge.fury.io/rb/stream-ruby.svg)](http://badge.fury.io/rb/stream-ruby)\n\n\u003cp align=\"center\"\u003e\n    \u003cimg src=\"./assets/logo.svg\" width=\"50%\" height=\"50%\"\u003e\n\u003c/p\u003e\n\u003cp align=\"center\"\u003e\n    Official Ruby API client for Stream Feeds, a web service for building scalable newsfeeds and activity streams.\n    \u003cbr /\u003e\n    \u003ca href=\"https://getstream.io/activity-feeds/\"\u003e\u003cstrong\u003eExplore the docs »\u003c/strong\u003e\u003c/a\u003e\n    \u003cbr /\u003e\n    \u003cbr /\u003e\n    \u003ca href=\"https://github.com/GetStream/stream-rails\"\u003eCode Samples\u003c/a\u003e\n    ·\n    \u003ca href=\"https://github.com/GetStream/stream-ruby/issues\"\u003eReport Bug\u003c/a\u003e\n    ·\n    \u003ca href=\"https://github.com/GetStream/stream-ruby/issues\"\u003eRequest Feature\u003c/a\u003e\n\u003c/p\u003e\n\n## 📝 About Stream\n\n\u003e 💡 This is a library for the **Feeds** product. The Chat SDKs can be found [here](https://getstream.io/chat/docs/).\n\nYou can sign up for a Stream account at our [Get Started](https://getstream.io/get_started/) page.\n\nYou can use this library to access Feeds API endpoints server-side.\n\nFor the client-side integrations (web and mobile) have a look at the JavaScript, iOS and Android SDK libraries ([docs](https://getstream.io/activity-feeds/)). This API Client project requires Ruby 2.5.x at a minimum.\n\n\u003e 💡 We have a Rails integration available [here](https://github.com/GetStream/stream-rails).\n\n## ⚙️ Installation\n\n```bash\ngem install 'stream-ruby'\n```\n\n\n## 📚 Full documentation\n\nDocumentation for this Ruby client are available at the [Stream website](https://getstream.io/docs/ruby/?language=ruby).\n\n## ✨ Getting started\n\n```ruby\n# Instantiate a new client to connect to us east API endpoint\nrequire 'stream'\nclient = Stream::Client.new('YOUR_API_KEY', 'API_KEY_SECRET', 'APP_ID', location: 'us-east')\n\n# Find your API keys here https://getstream.io/dashboard/\n\n# Instantiate a feed object\nuser_feed_1 = client.feed('user', '1')\n\n# Get activities from 5 to 10 (slow pagination)\nresult = user_feed_1.get(limit: 5, offset: 5)\n# (Recommended \u0026 faster) Filter on an id less than the given UUID\nresult =\n  user_feed_1.get(limit: 5, id_lt: 'e561de8f-00f1-11e4-b400-0cc47a024be0')\n\n# Create a new activity\nactivity_data = { actor: 1, verb: 'tweet', object: 1, foreign_id: 'tweet:1' }\nactivity_response = user_feed_1.add_activity(activity_data)\n# Create a bit more complex activity\nactivity_data = {\n  actor: 1,\n  verb: 'tweet',\n  object: 1,\n  foreign_id: 'tweet:1',\n  course: { name: 'Golden Gate park', distance: 10 },\n  participants: %w[Thierry Tommaso],\n  started_at: DateTime.now\n}\nactivity_response = user_feed_1.add_activity(activity_data)\n\n# Update an existing activity (requires both :foreign_id and :time fields)\nactivity_data = {\n  actor: 1,\n  verb: 'tweet',\n  object: 1,\n  foreign_id: 'tweet:1',\n  popularity: 100,\n  time: '2016-05-13T16:12:30'\n}\nclient.update_activity(activity_data)\n\n# Update activities\nclient.update_activities([activity_data])\n\n# Remove an activity by its id\nuser_feed_1.remove_activity('e561de8f-00f1-11e4-b400-0cc47a024be0')\n\n# Remove activities by their foreign_id\nuser_feed_1.remove_activity('tweet:1', foreign_id: true)\n\n# Follow another feed\nuser_feed_1.follow('flat', '42')\n\n# Stop following another feed\nuser_feed_1.unfollow('flat', '42')\n\n# Batch adding activities\nactivities = [\n  [actor: '1', verb: 'tweet', object: '1'],\n  [actor: '2', verb: 'like', object: '3']\n]\nuser_feed_1.add_activities(activities)\n\n# Batch following many feeds (requires ruby 2.1 or later)\nfollows = [\n  { source: 'flat:1', target: 'user:1' },\n  { source: 'flat:1', target: 'user:2' },\n  { source: 'flat:1', target: 'user:3' }\n]\nclient.follow_many(follows)\n\n# Add an activity and push it to other feeds too using the `to` field\ndata = [actor_id: '1', verb: 'like', object_id: '3', to: %w[user:44 user:45]]\nuser_feed_1.add_activity(data)\n\n# Updating parts of an activity\nset = {\n  'product.price': 19.99, 'shares': { 'facebook': '...', 'twitter': '...' }\n}\nunset = %w[daily_likes popularity]\n# ...by ID\nclient.activity_partial_update(\n  id: '54a60c1e-4ee3-494b-a1e3-50c06acb5ed4', set: set, unset: unset\n)\n# ...or by combination of foreign ID and time\nclient.activity_partial_update(\n  foreign_id: 'product:123',\n  time: '2016-11-10T13:20:00.000000',\n  set: set,\n  unset: unset\n)\n\n# Generating tokens for client side usage\ntoken = user_feed_1.readonly_token\n\n# Javascript client side feed initialization\nuser1 = client.feed('user', '1', '{{ token }}')\n\n# Retrieve first 10 followers of a feed\nuser_feed_1.followers(0, 10)\n\n# Retrieve followers from 10 to 20\nuser_feed_1.followers(10, 10)\n\n# Retrieve 10 feeds followed by user_feed_1\nuser_feed_1.following(10)\n\n# Retrieve 10 feeds followed by user_feed_1 starting from the 11th\nuser_feed_1.following(10, 10)\n\n# Check if user_feed_1 follows specific feeds\nuser_feed_1.following(0, 2, filter = %w[user:42 user:43])\n\n# Add one activity to many feeds in one request\nfeeds = %w[flat:1 flat:2 flat:3 flat:4]\nactivity = {\n  actor: 'User:2', verb: 'pin', object: 'Place:42', target: 'Board:1'\n}\nclient.add_to_many(activity, feeds)\n\n# Retrive open graph information\nclient.og('https://google.com')\n```\n\n## ✍️ Contributing\nProject is licensed under the [BSD 3-Clause](LICENSE).\n\nWe welcome code changes that improve this library or fix a problem, please make sure to follow all best practices and add tests if applicable before submitting a Pull Request on Github. We are very happy to merge your code in the official repository. Make sure to sign our [Contributor License Agreement (CLA)](https://docs.google.com/forms/d/e/1FAIpQLScFKsKkAJI7mhCr7K9rEIOpqIDThrWxuvxnwUq2XkHyG154vQ/viewform) first. See our [license file](./LICENSE) for more details.\n\n## 🧑‍💻 We are hiring!\n\nWe've recently closed a [$38 million Series B funding round](https://techcrunch.com/2021/03/04/stream-raises-38m-as-its-chat-and-activity-feed-apis-power-communications-for-1b-users/) and we keep actively growing.\nOur APIs are used by more than a billion end-users, and you'll have a chance to make a huge impact on the product within a team of the strongest engineers all over the world.\n\nCheck out our current openings and apply via [Stream's website](https://getstream.io/team/#jobs).\n","funding_links":[],"categories":["Ruby"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FGetStream%2Fstream-ruby","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FGetStream%2Fstream-ruby","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FGetStream%2Fstream-ruby/lists"}