Skip to content

Commit

Permalink
Merge pull request #101 from kaaes/0.2_bump
Browse files Browse the repository at this point in the history
Bump the version to 0.2.0
  • Loading branch information
kundzi committed Nov 29, 2015
2 parents a08e0b7 + 1428be2 commit 92ed683
Show file tree
Hide file tree
Showing 9 changed files with 30 additions and 49 deletions.
33 changes: 12 additions & 21 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,44 +1,35 @@
[![Build Status](https://travis-ci.org/kaaes/spotify-web-api-android.svg?branch=master)](https://travis-ci.org/kaaes/spotify-web-api-android)
[![Release](https://img.shields.io/github/release/kaaes/spotify-web-api-android.svg?label=maven)](https://jitpack.io/#kaaes/spotify-web-api-android)

# Spotify Web API for Android

This project is a wrapper for the [Spotify Web API](https://developer.spotify.com/web-api/).
It uses [Retrofit](http://square.github.io/retrofit/) to create Java interfaces from API endpoints.

## <a name="building"></a>Building
This project is built using [Gradle](https://gradle.org/):

1. Clone the repository: `git clone https://github.com/kaaes/spotify-web-api-android.git`
2. Build: `./gradlew assemble`
3. Grab the `aar` that can be found in `spotify-api/build/outputs/aar/spotify-web-api-android-0.1.1.aar` and put it in the `libs` folder in your application

## Integration into your project

This project depends on `Retrofit 1.9.0` and `OkHttp 2.2.0`. When you [build it](#building), it creates an `aar`
that doesn't contain Retrofit and OkHttp files. To make your app work you'll need to include these
dependencies in your app's `build.gradle` file.
## Integrating into your project

Add following to the `build.gradle` file in your app:
This library is available in [JitPack.io](https://jitpack.io/) repository.
To use it make sure that repository's url is added to the `build.gradle` file in your app:

```groovy
repositories {
mavenCentral()
flatDir {
dirs 'libs'
}
maven { url "https://jitpack.io" }
}
dependencies {
compile(name:'spotify-web-api-android-0.1.1', ext:'aar')
compile 'com.squareup.retrofit:retrofit:1.9.0'
compile 'com.squareup.okhttp:okhttp:2.2.0'
compile 'com.github.kaaes:spotify-web-api-android:0.2'
// Other dependencies your app might use
}
```

The `repositories` section tells your application to look for the `spotify-web-api-android-0.1.1.aar`
in the local repository in the `libs` folder.
## <a name="building"></a>Building
This project is built using [Gradle](https://gradle.org/):

1. Clone the repository: `git clone https://github.com/kaaes/spotify-web-api-android.git`
2. Build: `./gradlew assemble`
3. Grab the `aar` that can be found in `spotify-api/build/outputs/aar/spotify-web-api-android-0.2.0.aar`

## Usage

Expand Down
1 change: 0 additions & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ buildscript {
}
dependencies {
classpath "com.android.tools.build:gradle:${ANDROID_GRADLE_PLUGIN_VERSION}"
classpath "org.robolectric:robolectric-gradle-plugin:${ROBOLECTRIC_GRADLE_PLUGIN_VERSION}"
classpath "com.jakewharton.sdkmanager:gradle-plugin:${SDKMANAGER_GRADLE_PLUGIN_VERSION}"
classpath "com.github.dcendents:android-maven-gradle-plugin:1.3"
// NOTE: Do not place your application dependencies here; they belong
Expand Down
7 changes: 3 additions & 4 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -1,17 +1,16 @@
org.gradle.daemon=true

BASE_NAME=spotify-web-api-android
VERSION_NAME=0.1.1
VERSION_NAME=0.2.0
GROUP=com.spotify.android

# Deps for gradle
ANDROID_GRADLE_PLUGIN_VERSION=1.2.3
ROBOLECTRIC_GRADLE_PLUGIN_VERSION=1.1.0
ANDROID_GRADLE_PLUGIN_VERSION=1.3.0
SDKMANAGER_GRADLE_PLUGIN_VERSION=0.12.+

# Deps for libraries
FEST_ASSERT_CORE_VERSION=2.0M10
GUAVA_VERSION=18.0
JUNIT_VERSION=4.12
MOCKITO_CORE_VERSION=1.+
ROBOLECTRIC_VERSION=2.4
ROBOLECTRIC_VERSION=3.0
2 changes: 1 addition & 1 deletion release.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ jacoco {

def coverageSourceDirs = ['src/main/java' ]

task jacocoTestReport(type:JacocoReport, dependsOn: "testDebug") {
task jacocoTestReport(type:JacocoReport, dependsOn: "test") {
group = "Reporting"
description = "Generate Jacoco coverage reports"

Expand Down
4 changes: 0 additions & 4 deletions sample-search/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,6 @@ android {
versionName "1.0"
}

lintOptions {
disable 'InvalidPackage' // for okio-1.2.0
}

buildTypes {
release {
minifyEnabled false
Expand Down
8 changes: 1 addition & 7 deletions spotify-api/build.gradle
Original file line number Diff line number Diff line change
@@ -1,21 +1,19 @@
apply plugin: 'android-sdk-manager'
apply plugin: 'com.android.library'
apply plugin: 'org.robolectric'
apply plugin: 'com.github.dcendents.android-maven'

project.group = GROUP
version = VERSION_NAME

dependencies {
compile('com.squareup.retrofit:retrofit:1.9.0')
compile('com.squareup.okhttp:okhttp:2.2.0')

testCompile("org.robolectric:robolectric:${ROBOLECTRIC_VERSION}") {
exclude group: 'com.android.support', module: 'support-v4'
exclude group: 'commons-logging', module: 'commons-logging'
exclude group: 'org.apache.httpcomponents', module: 'httpclient'
}
testCompile "com.google.guava:guava:${GUAVA_VERSION}"
testCompile "com.google.guava:guava:${GUAVA_VERSION}"
testCompile "junit:junit:${JUNIT_VERSION}"
testCompile "org.easytesting:fest-assert-core:${FEST_ASSERT_CORE_VERSION}"
testCompile "org.mockito:mockito-core:${MOCKITO_CORE_VERSION}"
Expand All @@ -27,10 +25,6 @@ android {
compileSdkVersion 23
buildToolsVersion '23.0.2'

lintOptions {
disable 'InvalidPackage' // for okio-1.2.0
}

buildTypes {
debug {
testCoverageEnabled = true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1388,42 +1388,44 @@ public interface SpotifyService {
/**
* Get the current user's followed artists.
*
* @return Object containing a list of artists that user follows wrapped in a cursor object.
* @see <a href="https://developer.spotify.com/web-api/get-followed-artists/">Get User's Followed Artists</a>
*/
@GET("/me/following?type=artist")
public ArtistsCursorPager getFollowedArtists();
ArtistsCursorPager getFollowedArtists();

/**
* Get the current user's followed artists.
*
* @param callback Callback method.
* @param callback Callback method.
* @return An empty result
* @see <a href="https://developer.spotify.com/web-api/get-followed-artists/">Get User's Followed Artists</a>
*/
@GET("/me/following?type=artist")
public Result getFollowedArtists(Callback<ArtistsCursorPager> callback);
Result getFollowedArtists(Callback<ArtistsCursorPager> callback);

/**
* Get the current user's followed artists.
*
* @param options Optional parameters. For list of supported parameters see
* <a href="https://developer.spotify.com/web-api/get-followed-artists/">endpoint documentation</a>
* @param options Optional parameters. For list of supported parameters see
* <a href="https://developer.spotify.com/web-api/get-followed-artists/">endpoint documentation</a>
* @return Object containing a list of artists that user follows wrapped in a cursor object.
* @see <a href="https://developer.spotify.com/web-api/get-followed-artists/">Get User's Followed Artists</a>
*/
@GET("/me/following?type=artist")
public ArtistsCursorPager getFollowedArtists(@QueryMap Map<String, Object> options);
ArtistsCursorPager getFollowedArtists(@QueryMap Map<String, Object> options);

/**
* Get the current user's followed artists.
*
* @param options Optional parameters. For list of supported parameters see
* <a href="https://developer.spotify.com/web-api/get-followed-artists/">endpoint documentation</a>
* @param callback Callback method.
* @param callback Callback method.
* @return An empty result
* @see <a href="https://developer.spotify.com/web-api/get-followed-artists/">Get User's Followed Artists</a>
*/
@GET("/me/following?type=artist")
public Result getFollowedArtists(@QueryMap Map<String, Object> options, Callback<ArtistsCursorPager> callback);
Result getFollowedArtists(@QueryMap Map<String, Object> options, Callback<ArtistsCursorPager> callback);

/**********
* Search *
Expand Down

This file was deleted.

3 changes: 3 additions & 0 deletions spotify-api/src/test/resources/robolectric.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
sdk=21
constants= com.spotify.webapi.android.BuildConfig
manifest=src/main/AndroidManifest.xml

0 comments on commit 92ed683

Please sign in to comment.