{"id":18728765,"url":"https://github.com/rubyonworld/esa-ruby","last_synced_at":"2025-11-12T05:30:18.893Z","repository":{"id":174007909,"uuid":"542156242","full_name":"RubyOnWorld/esa-ruby","owner":"RubyOnWorld","description":"💝 esa API v1 client library, written in Ruby","archived":false,"fork":false,"pushed_at":"2022-09-27T17:08:41.000Z","size":126,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2024-12-28T14:26:20.960Z","etag":null,"topics":["api","client","esa","library","ruby"],"latest_commit_sha":null,"homepage":"","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/RubyOnWorld.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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}},"created_at":"2022-09-27T15:25:35.000Z","updated_at":"2022-09-27T18:01:43.000Z","dependencies_parsed_at":"2023-09-26T11:04:45.515Z","dependency_job_id":null,"html_url":"https://github.com/RubyOnWorld/esa-ruby","commit_stats":{"total_commits":103,"total_committers":1,"mean_commits":103.0,"dds":0.0,"last_synced_commit":"345fea77143d6d24b07676e40657dad47b11008c"},"previous_names":["rubyonworld/esa-ruby"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RubyOnWorld%2Fesa-ruby","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RubyOnWorld%2Fesa-ruby/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RubyOnWorld%2Fesa-ruby/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RubyOnWorld%2Fesa-ruby/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/RubyOnWorld","download_url":"https://codeload.github.com/RubyOnWorld/esa-ruby/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239599039,"owners_count":19665911,"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","client","esa","library","ruby"],"created_at":"2024-11-07T14:24:17.325Z","updated_at":"2025-11-12T05:30:18.426Z","avatar_url":"https://github.com/RubyOnWorld.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# esa-ruby\n[![Build Status](https://github.com/esaio/esa-ruby/workflows/build/badge.svg)](https://github.com/esaio/esa-ruby/actions)\n\n\nesa API v1 client library, written in Ruby\n\n## Installation\n\nAdd this line to your application's Gemfile:\n\n```ruby\ngem 'esa'\n```\n\nAnd then execute:\n\n    $ bundle\n\nOr install it yourself as:\n\n    $ gem install esa\n\n## Usage\n\n```ruby\n# Initialization\nclient = Esa::Client.new(access_token: \"\u003caccess_token\u003e\", current_team: 'foo')\n\n# Authenticated User API\nclient.user\n#=\u003e GET /v1/user\n\n# Team API\nclient.teams\n#=\u003e GET /v1/teams\n\nclient.team('bar')\n#=\u003e GET /v1/teams/bar\n\nclient.stats\n#=\u003e GET /v1/teams/bar/stats\n\nclient.members\n#=\u003e GET /v1/teams/bar/members\n\nscreen_name = 'alice'\nclient.delete_member(screen_name)\n#=\u003e DELETE /v1/teams/bar/members/alice\n\n# Post API\nclient.posts\n#=\u003e GET /v1/teams/foo/posts\n\nclient.posts(q: 'in:help')\n#=\u003e GET /v1/teams/foo/posts?q=in%3Ahelp\n\nclient.current_team = 'foobar'\npost_number = 1\nclient.post(post_number)\n#=\u003e GET /v1/teams/foobar/posts/1\n\nclient.create_post(name: 'foo')\n#=\u003e POST /v1/teams/foobar/posts\n\nclient.update_post(post_number, name: 'bar')\n#=\u003e PATCH /v1/teams/foobar/posts/1\n\n# (beta)\nclient.append_post(post_number, content: 'bar')\n#=\u003e POST /v1/teams/foobar/posts/1/append\n\nclient.delete_post(post_number)\n#=\u003e DELETE /v1/teams/foobar/posts/1\n\n\n# Comment API\nclient.comments(post_number)\n#=\u003e GET /v1/teams/foobar/posts/1/comments\n\nclient.create_comment(post_number, body_md: 'baz')\n#=\u003e POST /v1/teams/foobar/posts/1/comments\n\ncomment_id = 123\nclient.comment(comment_id)\n#=\u003e GET /v1/teams/foobar/comments/123\n\nclient.update_comment(comment_id, body_md: 'bazbaz')\n#=\u003e PATCH /v1/teams/foobar/comments/123\n\nclient.delete_comment(comment_id)\n#=\u003e DELETE /v1/teams/foobar/comments/123\n\nclient.comments\n#=\u003e GET /v1/teams/foobar/comments\n\nclient.create_sharing(post_number)\n#=\u003e POST /v1/teams/foobar/posts/1/sharing\n\nclient.delete_sharing(post_number)\n#=\u003e DELETE /v1/teams/foobar/posts/1/sharing\n\n\n# Star API\nclient.post_stargazers(post_number)\n#=\u003e GET /v1/teams/foobar/posts/1/stargazers\n\nclient.add_post_star(post_number)\n#=\u003e POST /v1/teams/foobar/posts/1/star\n\nclient.delete_post_star(post_number)\n#=\u003e DELETE /v1/teams/foobar/posts/1/star\n\nclient.comment_stargazers(comment_id)\n#=\u003e GET /v1/teams/foobar/comments/123/stargazers\n\nclient.add_comment_star(comment_id)\n#=\u003e POST /v1/teams/foobar/comments/123/star\n\nclient.delete_comment_star(comment_id)\n#=\u003e DELETE /v1/teams/foobar/comments/123/star\n\n\n# Watch API\nclient.watchers(post_number)\n#=\u003e GET /v1/teams/foobar/posts/1/watchers\n\nclient.add_watch(post_number)\n#=\u003e POST /v1/teams/foobar/posts/1/watch\n\nclient.delete_watch(post_number)\n#=\u003e DELETE /v1/teams/foobar/posts/1/watch\n\n# Categories API\nclient.categories\n#=\u003e GET /v1/teams/foobar/categories\n\nclient.batch_move_category(from: '/esa/', to: '/tori/piyo/')\n#=\u003e POST /v1/teams/foobar/categories/batch_move\n\n# Tags API\nclient.tags\n#=\u003e GET /v1/teams/foobar/tags\n\n# Invitation API\nclient.invitation\n#=\u003e GET /v1/teams/foobar/invitation\n\nclient.regenerate_invitation\n#=\u003e POST /v1/teams/foobar/invitation_regenerator\n\nclient.pending_invitations\n#=\u003e GET /v1/teams/foobar/invitations\n\nclient.send_invitation(emails)\n#=\u003e POST /v1/teams/foobar/invitations\n\nclient.cancel_invitation(invitation_code)\n#=\u003e DELETE /v1/teams/foobar/invitations/baz\n\n# Emoji API\nclient.emojis\n#=\u003e GET /v1/teams/foobar/emojis\n\nclient.create_emoji(code: 'team_emoji', image: '/path/to/image')\n#=\u003e POST /v1/teams/foobar/emojis\n\nclient.create_emoji(code: 'alias_code', origin_code: 'team_emoji')\n#=\u003e POST /v1/teams/foobar/emojis\n\nclient.delete_emoji('team_emoji')\n#=\u003e DELETE /v1/teams/foobar/emojis/team_emoji\n\n# Upload Attachment(beta)\nclient.upload_attachment('/Users/foo/Desktop/foo.png')                 # Path\nclient.upload_attachment(File.open('/Users/foo/Desktop/foo.png'))      # File\nclient.upload_attachment('http://example.com/foo.png')                 # Remote URL\nclient.upload_attachment(['http://example.com/foo.png', cookie_str])   # Remote URL + Cookie\nclient.upload_attachment(['http://example.com/foo.png', headers_hash]) # Remote URL + Headers\n\n# Signed url for secure upload(beta)\nclient.signed_url('uploads/p/attachments/1/2016/08/16/1/foobar.png')\n#=\u003e GET /v1/teams/foobar/signed_url/uploads/p/attachments/1/2016/08/16/1/foobar.png\n```\n\n\nsee also: [dev/api/v1 - docs.esa.io](https://docs.esa.io/posts/102)\n\n## Contributing\n\n1. Fork it ( https://github.com/esaio/esa-ruby/fork )\n2. Create your feature branch (`git checkout -b my-new-feature`)\n3. Commit your changes (`git commit -am 'Add some feature'`)\n4. Push to the branch (`git push origin my-new-feature`)\n5. Create a new Pull Request\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frubyonworld%2Fesa-ruby","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frubyonworld%2Fesa-ruby","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frubyonworld%2Fesa-ruby/lists"}