README.md in crtsh-rb-0.3.0 vs README.md in crtsh-rb-0.3.1
- old
+ new
@@ -1,8 +1,8 @@
# crtsh
-[![Build Status](https://travis-ci.com/ninoseki/crtsh.svg?branch=master)](https://travis-ci.com/ninoseki/crtsh)
+[![Ruby CI](https://github.com/ninoseki/crtsh/actions/workflows/test.yml/badge.svg)](https://github.com/ninoseki/crtsh/actions/workflows/test.yml)
[![Coverage Status](https://coveralls.io/repos/github/ninoseki/crtsh/badge.svg?branch=master)](https://coveralls.io/github/ninoseki/crtsh?branch=master)
[![CodeFactor](https://www.codefactor.io/repository/github/ninoseki/crtsh/badge)](https://www.codefactor.io/repository/github/ninoseki/crtsh)
[crt.sh](https://crt.sh) API client for Ruby.
@@ -13,19 +13,25 @@
```
## Usage
```ruby
+# Interact with Web API
require "crtsh"
-# Interact with Web API
api = Crtsh::API.new
api.search("crt.sh")
api.search("crt.sh", match: "LIKE")
api.search("crt.sh", exclude: "expired")
api.search("crt.sh", match: "LIKE", exclude: "expired")
+```
+```ruby
# Interact with DB
+# Note that you have to install pg manually
+# gem install pg
+require "crtsh/db"
+
db = Crtsh::DB.new
sql = """
SELECT digest(certificate.certificate, 'sha256') sha256
FROM certificate_identity, certificate
WHERE certificate.id = certificate_identity.certificate_id