Akka/Spray-based Dropbox API client with Sync support
Scala Shell
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
project/scripts
src
.gitignore
LICENSE
README.md
build.sbt

README.md

async-dbx-client

Akka/Spray-based Dropbox API client.

The status of the currently supported & upcoming features can be found here.

Getting Started using sbt

Since the project is not published yet, you have to build your own assembly from the sources.

Just clone the project and publish the assembly to your local repository using sbt:

git clone https://github.com/mrico/async-dbx-client.git
sbt publish-local

Then you can add the dependency to your sbt build configuration:

libraryDependencies += "eu.mrico" %% "async-dbx-client" % "0.1.0"

Documentation

The latest documentation of the API can be found here.

Examples can be found in the test suite.

Connecting to a Dropbox account

The main entry point is the DbxClient. An instance of DbxClient is linked to a single Dropbox account and provides access to the API.

import api._
val client = system.actorOf(Props[DbxClient])
client ! Authenticate(token)
client ! Account.GetInfo // => Response: Account.Info

Keeping a local folder in sync with remote changes

The actor DbxSync can be used to keep a local folder in sync with a given Dropbox account.

val sync = system.actorOf(DbxSync.props(client, "/tmp/dbx"))
// ... later ...
sync ! PoisenPill

Running the test suite

Sign in to your dropbox account and create a new app.

Generate a new access token and put it into a file called test-config.conf which you create in the project folder:

tests {
  auth-token = "YOUR_DROPBOX_ACCESS_TOKEN"
}

Finally run the tests:

$> sbt test

Copyright & Licence

Copyright (c) 2016 Marco Rico Gomez. Released under the MIT Licence.