{"id":21597361,"url":"https://github.com/cleantalk/ruby-antispam","last_synced_at":"2025-04-11T00:52:23.688Z","repository":{"id":26212525,"uuid":"29658909","full_name":"CleanTalk/ruby-antispam","owner":"CleanTalk","description":"API to have CleanTalk anti-spam on Ruby","archived":false,"fork":false,"pushed_at":"2023-06-29T09:06:22.000Z","size":33,"stargazers_count":19,"open_issues_count":2,"forks_count":7,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-04-11T00:52:16.197Z","etag":null,"topics":["anti-spam","antispam","ruby","spam-filtering","spam-protection"],"latest_commit_sha":null,"homepage":null,"language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/CleanTalk.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-01-22T05:04:54.000Z","updated_at":"2024-05-16T07:18:15.000Z","dependencies_parsed_at":"2023-01-14T04:13:04.711Z","dependency_job_id":null,"html_url":"https://github.com/CleanTalk/ruby-antispam","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CleanTalk%2Fruby-antispam","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CleanTalk%2Fruby-antispam/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CleanTalk%2Fruby-antispam/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CleanTalk%2Fruby-antispam/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/CleanTalk","download_url":"https://codeload.github.com/CleanTalk/ruby-antispam/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248322609,"owners_count":21084336,"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":["anti-spam","antispam","ruby","spam-filtering","spam-protection"],"created_at":"2024-11-24T18:08:48.786Z","updated_at":"2025-04-11T00:52:23.662Z","avatar_url":"https://github.com/CleanTalk.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ruby-cleantalk\n\nAPI to have CleanTalk anti-spam on Ruby\n\n## Install\n\nInstall via bundler\n\n    gem 'cleantalk'\n\nFor improve protection include javascript to your layout before \u003c/body\u003e tag:\n```html\n\u003cscript type=\"text/javascript\" src=\"https://moderate.cleantalk.org/ct-bot-detector-wrapper.js\"\u003e\u003c/script\u003e\n```\n\n## Usage\n\n```ruby\nrequire 'cleantalk'\n\n# Create a check_newuser request\nrequest = Cleantalk::CheckNewuser.new({ auth_key: 'ur_api_key', sender_email: 'test@example.org' }) # Can initialize with values\nrequest.sender_ip       = '127.0.0.1' # and also mutate object directly\nrequest.sender_nickname = 'test nickname'\n\nrequest.allowed? # =\u003e true or false\nrequest.result   # =\u003e \u003cObject Cleantalk::CheckNewuserResult\u003e with all response data\n\n# Create a check_message request\nrequest = Cleantalk::CheckMessage.new({\n  auth_key: 'ur_api_key', sender_email: 'test@example.org',\n  sender_ip: '127.0.0.1', sender_nickname: 'test nickname',\n}) # Can initialize with values\nrequest.message = '\u003cp\u003eHello World!\u003c/p\u003e'  # and also mutate object directly\n\nrequest.allowed? # =\u003e true or false\nrequest.result   # =\u003e \u003cObject Cleantalk::CheckMessageResult\u003e with all response data\n\n# You can also pass auth_key has global configuration (still overridable by passing auth_key to request):\nCleantalk.auth_key = 'ur_api_key'\n\n# Create a legacy request instance\nrequest = Cleantalk::Request.new\nrequest.auth_key        = 'your_key'\nrequest.message         = 'test message' # don't use this field for registration check\nrequest.sender_email    = 'stop_email@example.com'\nrequest.sender_nickname = 'test nickname'\nrequest.sender_ip       = '127.0.0.1'\nrequest.sender_info     = {cms_lang: 'en_US'} # here put locale for your language\n\n# In case use js bot detector, add event_token from your form for check frontend data\n# request.event_token     = 'xxx' # fill it with ct_bot_detector_event_token hidden input from your form (auto generate)\n\ncleantalk = Cleantalk.new\nresult = cleantalk.is_allowed_message(request) # for message checking\nresult = cleantalk.is_allowed_user(request)    # for registration checking\n\n# result['allow'] contains our decision: 1 for allowed message, 0 for blocked\n# result['comment'] contains comment for our decision\n```\n## Requirements\n\n* CleanTalk account https://cleantalk.org/register?product=anti-spam","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcleantalk%2Fruby-antispam","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcleantalk%2Fruby-antispam","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcleantalk%2Fruby-antispam/lists"}