<commit_before>go-leancloud
============

a [leancloud](https://leancloud.cn/) [REST API](https://leancloud.cn/docs/rest_api.html) client library for go

install
------------
```go get -u github.com/zx9597446/go-leancloud```

quick usage
-----------
1. config cloud:
```go
cloud := &leancloud.Cloud{}
cfg := leancloud.Config{}
cfg.AppId = ""
cfg.AppKey = ""
cfg.MasterKey = ""
cfg.UsingMaster = true
cloud.Cfg = cfg
```

2. Object CRUD
```go
className := "TestClass"
o := leancloud.NewObject()
o.Set("key", "value")
fetchOnSave := true
o.Create(cloud, className, fetchOnSave)

o.Set("newKey", "newValue")
o.Update(cloud, className)

o2 := leancloud.NewObject()
oid := o.ObjectId()
o2.Fetch(cloud, className, oid, "")

o2.Delete(cloud, className)
```

3. call leancloud function:
```go<commit_msg>fix document<commit_after>go-leancloud
============

a [leancloud](https://leancloud.cn/) [REST API](https://leancloud.cn/docs/rest_api.html) client library for go

install
------------
```go get -u github.com/zx9597446/go-leancloud```

quick usage
-----------
1. config cloud:
```go
cloud := &leancloud.Client{}
cfg := leancloud.Config{}
cfg.AppId = ""
cfg.AppKey = ""
cfg.MasterKey = ""
cfg.UsingMaster = true
cloud.Cfg = cfg
```

2. Object CRUD
```go
className := "TestClass"
o := leancloud.NewObject()
o.Set("key", "value")
fetchOnSave := true
o.Create(cloud, className, fetchOnSave)

o.Set("newKey", "newValue")
o.Update(cloud, className)

o2 := leancloud.NewObject()
oid := o.ObjectId()
o2.Fetch(cloud, className, oid, "")

o2.Delete(cloud, className)
```

3. call leancloud function:
```go
{'fraction_non_alphanumeric': 0.2198492462311558, 'fraction_numerical': 0.016331658291457288, 'mean_word_length': 4.274834437086093, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 4, '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': '36950', 'n_tokens_mistral': 588, 'n_tokens_neox': 573, 'n_words': 128}