Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/aiyanbo/leancloud-scala-sdk
LeanCloud SDK of Scala
https://github.com/aiyanbo/leancloud-scala-sdk
Last synced: about 2 months ago
JSON representation
LeanCloud SDK of Scala
- Host: GitHub
- URL: https://github.com/aiyanbo/leancloud-scala-sdk
- Owner: aiyanbo
- License: apache-2.0
- Created: 2015-05-12T03:24:39.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2016-03-25T16:30:54.000Z (almost 9 years ago)
- Last Synced: 2023-03-24T02:27:17.191Z (almost 2 years ago)
- Language: Scala
- Homepage:
- Size: 45.9 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# LeanCloud Scala SDK
[![Build Status](https://travis-ci.org/aiyanbo/leancloud-scala-sdk.svg?branch=master)](https://travis-ci.org/aiyanbo/leancloud-scala-sdk)
## SBT
```scala
libraryDependencies += "org.jmotor.leancloud" %% "leancloud-scala-sdk" % "1.0.0-SNAPSHOT"
```
## Dependencies
- Typesafe-Config: [![Current Version](http://stack-badges.herokuapp.com/maven-central/com.typesafe/config/current.svg)](http://stack-badges.herokuapp.com/maven-central/com.typesafe/config)
- AsyncHttpClient: [![Current Version](http://stack-badges.herokuapp.com/maven-central/com.ning/async-http-client/current.svg)](http://stack-badges.herokuapp.com/maven-central/com.ning/async-http-client)## Getting Started
```scala
import org.jmotor.leancloud.LeanCloudClient._
import org.jmotor.conversions.JsonConversions._object Users {
private implicit val className = "users"def add(username: String, age: Integer) = {
insert(Map("username" -> username, "age" -> age))
}def getUser(objectId: String) = {
get(objectId)
}def del(objectId: String) = {
delete(objectId)
}def changeAge(username: String, age: Integer) = {
update(Map("username" -> username), Map("age" -> age))
}def listUsersByAge(age: Integer) = {
query(Map("age" -> Map("$lt" -> age)))
}}
```
## Others
```scala
batch
exists
```
## Requirement
- JDK 1.8+
- Scala 2.11