{"id":15468531,"url":"https://github.com/winebarrel/kani_laser","last_synced_at":"2025-09-02T11:41:23.023Z","repository":{"id":56879864,"uuid":"230869575","full_name":"winebarrel/kani_laser","owner":"winebarrel","description":"SendGrid v3 Mail Send API Ruby Client that validates API request body using JSON Schema.","archived":false,"fork":false,"pushed_at":"2021-03-16T00:42:27.000Z","size":43,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-07-29T16:29:38.644Z","etag":null,"topics":["email","ruby","sendgrid"],"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/winebarrel.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-12-30T07:29:24.000Z","updated_at":"2021-03-16T00:42:29.000Z","dependencies_parsed_at":"2022-08-20T23:40:09.373Z","dependency_job_id":null,"html_url":"https://github.com/winebarrel/kani_laser","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/winebarrel/kani_laser","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/winebarrel%2Fkani_laser","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/winebarrel%2Fkani_laser/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/winebarrel%2Fkani_laser/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/winebarrel%2Fkani_laser/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/winebarrel","download_url":"https://codeload.github.com/winebarrel/kani_laser/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/winebarrel%2Fkani_laser/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":272971549,"owners_count":25024099,"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-08-31T02:00:09.071Z","response_time":79,"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":["email","ruby","sendgrid"],"created_at":"2024-10-02T01:41:30.455Z","updated_at":"2025-09-02T11:41:23.002Z","avatar_url":"https://github.com/winebarrel.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# KaniLaser\n\n[SendGrid v3 Mail Send API](https://sendgrid.com/docs/API_Reference/Web_API_v3/Mail/index.html) Ruby Client that validates API request body using [JSON Schema](https://github.com/winebarrel/kani_laser/blob/master/lib/kani_laser/schema.rb).\n\n[![Gem Version](https://badge.fury.io/rb/kani_laser.svg)](http://badge.fury.io/rb/kani_laser)\n[![Build Status](https://travis-ci.org/winebarrel/kani_laser.svg?branch=master)](https://travis-ci.org/winebarrel/kani_laser)\n\n## Installation\n\nAdd this line to your application's Gemfile:\n\n```ruby\ngem 'kani_laser'\n```\n\nAnd then execute:\n\n    $ bundle\n\nOr install it yourself as:\n\n    $ gem install kani_laser\n\n## Usage\n\n```ruby\nrequire 'kani_laser'\n\nclient = KaniLaser::Client.new(api_key: 'ZAPZAPZAP')\n\n# see https://sendgrid.com/docs/API_Reference/Web_API_v3/Mail/index.html\nclient.send_mail(\n  personalizations: [\n    {\n      to: [\n        {\n          email: 'john@example.com'\n        }\n      ],\n      subject: 'Hello, World!'\n    }\n  ],\n  from: {\n    email: 'from_address@example.com'\n  },\n  content: [\n    {\n      type: 'text/plain',\n      value: 'Hello, World!'\n    }\n  ]\n)\n```\n\n### For testing\n\n```ruby\nclient = KaniLaser::Client.new(options) do |faraday|\n  faraday.adapter :test, Faraday::Adapter::Test::Stubs.new do |stub|\n    stub.post('/v3/mail/send') do |_env|\n      [202, {}, '']\n    end\n  end\nend\n\nclient.send_mail(...)\n```\n\n### Use `On-Behalf-Of`\n\n```ruby\nKaniLaser::Client.new(options) do |faraday|\n  faraday.headers['On-Behalf-Of'] = '\u003csubuser_username\u003e'\nend\n```\n\n## Request parameter validation error example\n\n```ruby\n# Invalid Parameter\n{\n  personalizations: [{ to: [{ email: 'sugawara@winebarrel.jp' }] }],\n  subject: 'Hello, World!',\n  from: { email: 'from_address@example.com' },\n  content: [{ value: 'Hello, World!' }],\n}\n```\n\n```\nJSON::Schema::ValidationError: The property '#/content/0' did not contain a required property of 'type'\n```\n\n## Update schema\n\n```sh\nrake schema:update\n```\n\n## Related links\n\n* https://sendgrid.com/docs/API_Reference/Web_API_v3/Mail/index.html\n* https://sendgrid.api-docs.io/\n* https://github.com/sendgrid/sendgrid-oai/\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwinebarrel%2Fkani_laser","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwinebarrel%2Fkani_laser","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwinebarrel%2Fkani_laser/lists"}