Skip to content

Commit e9d5824

Browse files
committed
Removed account id
Signed-off-by: Vishal Rana <[email protected]>
1 parent 9cb30d3 commit e9d5824

File tree

5 files changed

+97
-249
lines changed

5 files changed

+97
-249
lines changed

Gopkg.lock

Lines changed: 71 additions & 13 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Gopkg.toml

Lines changed: 18 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
21
# Gopkg.toml example
32
#
43
# Refer to https://github.com/golang/dep/blob/master/docs/Gopkg.toml.md
@@ -17,14 +16,27 @@
1716
# source = "github.com/myfork/project2"
1817
#
1918
# [[override]]
20-
# name = "github.com/x/y"
21-
# version = "2.4.0"
19+
# name = "github.com/x/y"
20+
# version = "2.4.0"
21+
#
22+
# [prune]
23+
# non-go = false
24+
# go-tests = true
25+
# unused-packages = true
2226

2327

28+
[[constraint]]
29+
name = "github.com/go-resty/resty"
30+
version = "1.5.0"
31+
2432
[[constraint]]
2533
name = "github.com/labstack/gommon"
26-
version = "0.2.3"
34+
version = "0.2.5"
2735

2836
[[constraint]]
29-
name = "github.com/go-resty/resty"
30-
version = "1.0.0"
37+
name = "github.com/shirou/gopsutil"
38+
version = "2.18.4"
39+
40+
[prune]
41+
go-tests = true
42+
unused-packages = true

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ import (
2222
)
2323

2424
func main() {
25-
client := labstack.NewClient("<ACCOUNT_ID>", "<API_KEY>")
25+
client := labstack.NewClient("<API_KEY>")
2626
res, err := client.GeocodeAddress(&labstack.GeocodeAddressRequest{
2727
Location: "eiffel tower",
2828
})

client.go

Lines changed: 7 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -2,19 +2,16 @@ package labstack
22

33
import (
44
"fmt"
5-
"os"
65

76
"github.com/go-resty/resty"
87
"github.com/labstack/gommon/log"
9-
"github.com/shirou/gopsutil/process"
108
)
119

1210
type (
1311
Client struct {
14-
accountID string
15-
apiKey string
16-
resty *resty.Client
17-
logger *log.Logger
12+
apiKey string
13+
resty *resty.Client
14+
logger *log.Logger
1815
}
1916

2017
Download struct {
@@ -34,27 +31,18 @@ const (
3431
)
3532

3633
// NewClient creates a new client for the LabStack API.
37-
func NewClient(accountID, apiKey string) *Client {
34+
func NewClient(apiKey string) *Client {
3835
return &Client{
39-
accountID: accountID,
40-
apiKey: apiKey,
41-
resty: resty.New().SetHostURL(apiURL).SetAuthToken(apiKey),
42-
logger: log.New("labstack"),
36+
apiKey: apiKey,
37+
resty: resty.New().SetHostURL(apiURL).SetAuthToken(apiKey),
38+
logger: log.New("labstack"),
4339
}
4440
}
4541

4642
func (c *Client) error(r *resty.Response) bool {
4743
return r.StatusCode() < 200 || r.StatusCode() >= 300
4844
}
4945

50-
func (c *Client) Cube() *Cube {
51-
p, _ := process.NewProcess(int32(os.Getpid()))
52-
return &Cube{
53-
process: p,
54-
client: c,
55-
}
56-
}
57-
5846
func (c *Client) Download(id string, path string) (err *APIError) {
5947
_, e := c.resty.R().
6048
SetOutput(path).

0 commit comments

Comments
 (0)