Skip to content
This repository was archived by the owner on Sep 20, 2024. It is now read-only.

Commit 3517983

Browse files
authored
Merge pull request #38 from vulncheck-oss/tag-pdns-param
Adds back param to tags and pdns
2 parents a107219 + fde0730 commit 3517983

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

pdns.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,13 @@ package sdk
33
import (
44
"io"
55
"net/http"
6+
"net/url"
67
)
78

89
// https://docs.vulncheck.com/api/pdns
9-
func (c *Client) GetPdns() (string, error) {
10+
func (c *Client) GetPdns(list string) (string, error) {
1011
client := &http.Client{}
11-
req, err := http.NewRequest("GET", c.GetUrl()+"/v3/pdns/vulncheck-c2", nil)
12+
req, err := http.NewRequest("GET", c.GetUrl()+"/v3/pdns/"+url.QueryEscape(list), nil)
1213
if err != nil {
1314
panic(err)
1415
}

tags.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,13 @@ package sdk
33
import (
44
"io"
55
"net/http"
6+
"net/url"
67
)
78

89
// https://docs.vulncheck.com/api/tags
9-
func (c *Client) GetTag() (string, error) {
10+
func (c *Client) GetTag(tag string) (string, error) {
1011
client := &http.Client{}
11-
req, err := http.NewRequest("GET", c.GetUrl()+"/v3/tags/vulncheck-c2", nil)
12+
req, err := http.NewRequest("GET", c.GetUrl()+"/v3/tags/"+url.QueryEscape(tag), nil)
1213
if err != nil {
1314
panic(err)
1415
}

0 commit comments

Comments
 (0)