Giter VIP home page Giter VIP logo

libepimetheuskotlin's Introduction

libepimetheus

##This version of the library is abandoned. I'm rewriting it in Dart.

About

Libepimetheus is an Android library to connect to Pandora Music's REST API, documented here. It's the same API the web app uses. Libepimetheus doesn't enforce ads or skip limits.
The library can optionally use a free smart DNS service, Portaller, to access Pandora from outside the US.
I'm building a Pandora client for Android with this, check it out.

Planned features (to be implemented later)

  • Browse functions
  • Functions to get song details (lyrics, etc.)

Download

The library is available through JitPack. Add the JitPack repository to your app module's build.gradle file:

repositories {
	...
	maven { url 'https://jitpack.io' }
}

Then, add the library in the dependencies closure.

dependencies {
    ...
    implementation 'com.github.EpimetheusAndroid:libepimetheus:1.0'
}

Alternatively, you can manually use the library aar and sources jar from the releases page. Make sure to add the following dependencies if you do:

dependencies {
    ...
    // Not necessary when using JitPack
    implementation 'androidx.media:media:1.0.0'
    implementation 'com.squareup.okhttp3:okhttp:3.11.0'
}

Documentation

KDoc, generated in GFM Markdown, is available in the docs directory in this repository.
Continue reading to get started.

Get started

To authenticate with Pandora, create a User object. The last boolean enables Portaller, a free smart DNS service, to access Pandora outside the US. User objects are Parcelable.

val user = User("username", "password", usePortaller = true)

Get a list of the user's stations with the Stations.getStations function. This will return a list of Station objects. Station objects are Parcelable.

val stations: List<Station> = Stations.getStation(user)

Get a station playlist with the Station.getPlaylist function. This will return a list of (usually) four Song objects.

val playlist: List<Song> = stations[index].getPlaylist(user)

To get more songs, call getPlaylist again.

playlist += stations[index].getPlaylist(user)

Song objects have many properties, like:

// Song name, album, artist
song.name; song.album; song.artist

// Audio URI
song.audioUri

// Art URL (returns the URL for the nearest larger existing size)
song.getArtUrl(preferredSize)

// Rating
song.rating

Add and remove feedback with the feedback functions:

song.addTired(user)
song.addFeedback(thumbsUp = true, user)
song.deleteFeedback(user)

Custom API requests

You can use this function to make a custom API request.

libepimetheuskotlin's People

Contributors

hacker1024 avatar

Stargazers

 avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.