Module: RubyLokaliseApi::Rest::Comments
- Included in:
- Client
- Defined in:
- lib/ruby_lokalise_api/rest/comments.rb
Instance Method Summary collapse
-
#comment(project_id, key_id, comment_id) ⇒ RubyLokaliseApi::Resources::Comment
Returns a single comment for the given key.
-
#comments(project_id, key_id, params = {}) ⇒ RubyLokaliseApi::Collection::Comment<RubyLokaliseApi::Resources::Comment>
Returns all comments for the given key inside the given project.
-
#create_comments(project_id, key_id, params) ⇒ RubyLokaliseApi::Collection::Comment<RubyLokaliseApi::Resources::Comment>
Creates one or more comments for the given key inside the given project.
-
#destroy_comment(project_id, key_id, comment_id) ⇒ Hash
Deletes comment for the given key inside the given project.
-
#project_comments(project_id, params = {}) ⇒ RubyLokaliseApi::Collection::Comment<RubyLokaliseApi::Resources::Comment>
Returns all comments for all keys inside the given project.
Instance Method Details
#comment(project_id, key_id, comment_id) ⇒ RubyLokaliseApi::Resources::Comment
Returns a single comment for the given key
13 14 15 |
# File 'lib/ruby_lokalise_api/rest/comments.rb', line 13 def comment(project_id, key_id, comment_id) c_r RubyLokaliseApi::Resources::KeyComment, :find, [project_id, key_id, comment_id] end |
#comments(project_id, key_id, params = {}) ⇒ RubyLokaliseApi::Collection::Comment<RubyLokaliseApi::Resources::Comment>
Returns all comments for the given key inside the given project
34 35 36 |
# File 'lib/ruby_lokalise_api/rest/comments.rb', line 34 def comments(project_id, key_id, params = {}) c_r RubyLokaliseApi::Collections::KeyComment, :all, [project_id, key_id], params end |
#create_comments(project_id, key_id, params) ⇒ RubyLokaliseApi::Collection::Comment<RubyLokaliseApi::Resources::Comment>
Creates one or more comments for the given key inside the given project
45 46 47 |
# File 'lib/ruby_lokalise_api/rest/comments.rb', line 45 def create_comments(project_id, key_id, params) c_r RubyLokaliseApi::Resources::KeyComment, :create, [project_id, key_id], params, :comments end |
#destroy_comment(project_id, key_id, comment_id) ⇒ Hash
Deletes comment for the given key inside the given project
56 57 58 |
# File 'lib/ruby_lokalise_api/rest/comments.rb', line 56 def destroy_comment(project_id, key_id, comment_id) c_r RubyLokaliseApi::Resources::KeyComment, :destroy, [project_id, key_id, comment_id] end |
#project_comments(project_id, params = {}) ⇒ RubyLokaliseApi::Collection::Comment<RubyLokaliseApi::Resources::Comment>
Returns all comments for all keys inside the given project
23 24 25 |
# File 'lib/ruby_lokalise_api/rest/comments.rb', line 23 def project_comments(project_id, params = {}) c_r RubyLokaliseApi::Collections::ProjectComment, :all, project_id, params end |