
Security News
Rspack Introduces Rslint, a TypeScript-First Linter Written in Go
Rspack launches Rslint, a fast TypeScript-first linter built on typescript-go, joining in on the trend of toolchains creating their own linters.
This gem supports ruby version 1.9+ only.
Add this line to your application's Gemfile:
gem 'commentatr'
And then execute:
$ bundle
Or install it yourself as:
$ gem install commentatr
Initialize client
# Without params
Commentatr::Client.new()
# With blog credentials
Commentatr::Client.new(partner_host: "example.com", token: "...your secret token...")
# With client credentials
Commentatr::Client.new(client_id: 42, token: "...your secret token...")
Fetch comments for blog
# All entry comments
cttr.comments(page_id: "blog-1")
# Last 5 entry comments
cttr.comments(page_id: "blog-1", order: "desc", limit: 5)
# All comments since last time you checked
cttr.comments(page_id: "blog-1", after: Time.now.to_i - 3600)
Fetch comments for all client blogs
cttr.client_comments(order: "asc", offset: 100, limit: 10)
Fetch counters of comments for each entry of each client blog
cttr.counters
Moderator actions
cttr.approve(comment_id: 1)
cttr.reject(comment_id: 2)
cttr.delete(comment_id: 3)
cttr.junk(comment_id: 4)
# Mass management
cttr.approve(comment_id: [1, 2, 3, 4])
Admin actions
# Change comments approval setting
cttr = Commentatr::Client.new(partner_host: "example.com", token: "...your secret token...")
cttr.update_config(approval: false, readonly: true)
# Regenerate blog token
commentatr_config[:token] = cttr.regenerate_blog_token(partner_host: "example.com")
# Regenerate client token
commentatr_config[:token] = cttr.regenerate_client_token
You can perform all these actions passing all needed authentication params for each query
cttr = Commentatr::Client.new
cttr.comments(
partner_host: "example.com",
token: "...your secret token...",
page_id: "blog-1",
order: "asc",
offset: 50,
limit: 10
)
All responses are stored in Commentatr::Response
objects
response = cttr.comments(page_id: "blog-1")
response.code
# => 200
response.body.success
# => true
response.body.data
# => [ ...comments here... ]
response.body.errors
# => []
FAQs
Unknown package
We found that commentatr demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Rspack launches Rslint, a fast TypeScript-first linter built on typescript-go, joining in on the trend of toolchains creating their own linters.
Security News
Hacker Demonstrates How Easy It Is To Steal Data From Popular Password Managers
Security News
Oxlint’s new preview brings type-aware linting powered by typescript-go, combining advanced TypeScript rules with native-speed performance.