Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/zaneli/escalade-milk

Remember The Milk API Scala wrapper library
https://github.com/zaneli/escalade-milk

Last synced: 28 days ago
JSON representation

Remember The Milk API Scala wrapper library

Awesome Lists containing this project

README

        

#escalade-milk
[Remember The Milk](http://www.rememberthemilk.com/ "Remember The Milk") API Scala wrapper library.

[![Build Status](https://travis-ci.org/zaneli/escalade-milk.png?branch=master)](https://travis-ci.org/zaneli/escalade-milk)

##Authenticate
- Request [API Key and Shared secret](http://www.rememberthemilk.com/services/api/keys.rtm).
- Get frob.

```scala
val client = RtmClientFactory.createClient(, )
val frob = client.auth.getFrob.frob
```

- Create Auth URL and Authorize API Access.
(Permission is com.zaneli.escalade.milk.model.Perms.READ, Perms.READ_WRITE or Perms.ALL)

```scala
println(AuthTool.createAuthUrl(, , , frob))
```

- Get token.

```scala
val token = client.auth.getToken(frob).token
```

##Call Method
- To use method what requires authentication, create RtmClient with token.

```scala
val client = RtmClientFactory.createClient(, , token)
```

Otherwise, create RtmClient either with or without token.

```scala
val client = RtmClientFactory.createClient(, )
```

- Call method.(Sample)

```scala
val timeline = client.timelines.create

val addResult = client.tasks.add(timeline, "Task")
val taskList = addResult.result
val taskseries = taskList.taskseries.head

val setNameResult = client.tasks.setName(timeline, taskList.id, taskseries.id, taskseries.task.id, "NewName")
client.transactions.undo(timeline, setNameResult.transaction.id)
```

More detail, read [API reference](http://www.rememberthemilk.com/services/api/methods/ "Remember The Milk API reference").

## Maven Repository

for Scala 2.10.x and Scala 2.11.x

### pom.xml


com.zaneli
Zaneli Repository
http://www.zaneli.com/repositories



com.zaneli
escalade-milk_2.11
0.0.1

### build.sbt
resolvers += "Zaneli Repository" at "http://www.zaneli.com/repositories"

libraryDependencies ++= {
Seq("com.zaneli" %% "escalade-milk" % "0.0.1" % "compile")
}