<commit_before>mackerel-client-go
==================

mackerel-client-go is a Go client library for [mackerel.io API](http://help-ja.mackerel.io/entry/spec/api/v0).

# Usage

```go
import mkr "github.com/mackerelio/mackerel-client-go"
```

```go
client = mkr.NewClient("<Put your API key>")
hosts, err := client.FindHosts(&mkr.FindHostsParam{Service: "My-Service", Role: "proxy", Status: 'working'})
params := []*mkr.MetricParam{
        &mkr.MetricParam{name: 'proxy.access_log.latency', time: '1414146305', value: '250'},
}
ret, err := client.PostServiceMetric("My-Service", params)
```<commit_msg>Fix README<commit_after>mackerel-client-go
==================

mackerel-client-go is a Go client library for [mackerel.io API](http://help-ja.mackerel.io/entry/spec/api/v0).

# Usage

```go
import mkr "github.com/mackerelio/mackerel-client-go"
```

```go
client = mkr.NewClient("<Put your API key>")

hosts, err := client.FindHosts(&mkr.FindHostsParam{
        Service: "My-Service",
        Roles: []string{"proxy"},
        Statuses: []string{"working"}
})

err := client.PostServiceMetricValues("My-Service", []*mkr.ServiceMetricValue{
        &mkr.ServiceMetricValue{
              Name:  "proxy.access_log.latency",
              Time:  123456789,
              Value: 500,
        },
})
```
{'fraction_non_alphanumeric': 0.19753086419753085, 'fraction_numerical': 0.020833333333333332, 'mean_word_length': 3.950381679389313, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7400196', 'n_tokens_mistral': 481, 'n_tokens_neox': 450, 'n_words': 82}