pcs-api-android

A lightweight library that abstract providers and gives a uniform API to several personal cloud storages providers

License

License

Categories

Categories

Net
GroupId

GroupId

net.netheos
ArtifactId

ArtifactId

pcs-api-android
Last Version

Last Version

1.0.1
Release Date

Release Date

Type

Type

aar
Description

Description

pcs-api-android
A lightweight library that abstract providers and gives a uniform API to several personal cloud storages providers
Project URL

Project URL

https://github.com/netheosgithub/pcs_api
Source Code Management

Source Code Management

https://github.com/netheosgithub/pcs_api.git

Download pcs-api-android

How to add to project

<!-- https://jarcasting.com/artifacts/net.netheos/pcs-api-android/ -->
<dependency>
    <groupId>net.netheos</groupId>
    <artifactId>pcs-api-android</artifactId>
    <version>1.0.1</version>
    <type>aar</type>
</dependency>
// https://jarcasting.com/artifacts/net.netheos/pcs-api-android/
implementation 'net.netheos:pcs-api-android:1.0.1'
// https://jarcasting.com/artifacts/net.netheos/pcs-api-android/
implementation ("net.netheos:pcs-api-android:1.0.1")
'net.netheos:pcs-api-android:aar:1.0.1'
<dependency org="net.netheos" name="pcs-api-android" rev="1.0.1">
  <artifact name="pcs-api-android" type="aar" />
</dependency>
@Grapes(
@Grab(group='net.netheos', module='pcs-api-android', version='1.0.1')
)
libraryDependencies += "net.netheos" % "pcs-api-android" % "1.0.1"
[net.netheos/pcs-api-android "1.0.1"]

Dependencies

compile (2)

Group / Artifact Type Version
net.netheos : pcs-api-java jar 1.0.1
org.slf4j : slf4j-android jar 1.7.6

Project Modules

There are no modules declared in this project.

pcs_api

Personal Cloud Storages API: a library that abstract providers and gives a uniform API to several personal cloud storages providers. As of today, the following providers are supported: Dropbox, hubiC, Google Drive, CloudMe.

API provides the following methods:

  • list/create/delete folder
  • upload/download/delete blob (a blob is a regular file)
  • inquire about user and about used/available storage quota.

pcs_api is released under Apache License V2.0

Languages

The API has been developped in many languages (Java, android, Python and C++). Some samples are availables in the samples directory for each one.

Java and android

An implementation exists for Java (1.6+). It is also compliant with android API 8+. The base library uses a maven artefact with the following dependencies:

  • httpclient for the network access (already provided on android platform)
  • json to parse the JSON server responses (already provided on android platform)
  • slf4j for the logging

The unit tests are done using the JUnit4 library (JUnit3 on android).

Android Studio has been used to build the android library. It generates an archives aar which can be used in an application. This works as a Maven artefact.

WARNING: the aar file can only be used with Android Studio ; it is not compatible with Eclipse.

Python

An implementation exists for Python (tested on version 2.7), available as a pypi package.

Python implementation has some dependencies, as specified in setup.py (pip and virtualenv are recommended for installation). Basically, requests and requests-oauthlib are used for http requests and OAuth authentication, pytest is used for testing.

C++

An implementation exists for C++11 (tested on MSVC 2013 and gcc-4.8).

C++ implementation depends on Microsoft cpprestsdk for http requests (aka Casablanca: https://casablanca.codeplex.com), and boost libraries (v1.55). googletest is used for testing (included in repository as a git submodule: cpp/third_party/gtest). Build is based on cmake (tested with cmake 2.8.12). pcs_api has been tested on Windows (desktop, non mobile) and Linux. Due to limitations in cpprestsdk, CloudMe provider is not available for non Windows platforms.

Getting started

See this page.

Build

See this page

Features

pcs_api can handle several authentications types:

  • OAuth2 (used by Dropbox, hubiC, Google Drive)
  • Login / password (CloudMe uses http digest authentication)

Each provider has its specificity that are described here;

The stream on files are wrapped by the same objects whatever the choosen provider. To download a file (blob) from provider the ByteSink interface must be used and to upload some data, the ByteSource interface must be used. More informations are available here;

For more technical informations, please read this page.

Support

Please fill a github issue to report any problem or enhancement request.

Contributors are welcome.

Versions

Version
1.0.1