Giter Club home page Giter Club logo

itunes-api's Introduction

iTunes API

Maven Central badge Javadocs License build status code coverage

iTunes API is a Java client library providing easy programmatic access to four different iTunes APIs.

Usage

Search

Search for 15 podcasts with CBS Radio as author in the Canadian iTunes store:

Response response = new Search("cbs radio")
	.setCountry(Country.CANADA)
	.setAttribute(Attribute.AUTHOR_TERM)
	.setMedia(Media.PODCAST)
	.setLimit(15)
	.execute();

See also Search API page on apple.com

Lookup

Lookup Bruce Springsteen albums by his iTunes artist id, 178834:

Response response = new Lookup()
	.addId("178834")
	.setEntity(Entity.ALBUM)
	.execute();

See also Lookup API page on apple.com

Feed Generator

The purpose of the Feed Generator API is to create custom RSS feeds of specific iTunes Store content, such as charts and new entries.

This library allows creating feed URLs programmatically. It also allows retrieving the feed content directly.

For example, create a feed URL for the top 10 hot albums for Apple Music in France:

String url = new FeedGenerator()
	.setCountry(Country.FRANCE)
	.setMediaType(MediaType.APPLE_MUSIC)
	.setFeedType(FeedType.HOT_ALBUMS)
	.setResultsLimit(10)
	.getUrl();

To retrieve the feed content directly:

Feed feed = new FeedGenerator()
	.setAllowExplicit(true)
	.setCountry(Country.FRANCE)
	.setMediaType(MediaType.APPLE_MUSIC)
	.setFeedType(FeedType.HOT_ALBUMS)
	.setResultsLimit(10)
	.execute();

See also Feed Generator page on apple.com

Genre ID

Get the full genre hierarchy for the iTunes store, along with relevant links for each genre.

GenreIdsResponse response = new GenreIdsAppendix().getGenres();

See also Genre ID page on apple.com

HTTP connection setup

To reduce external dependencies, iTunes API has a default HTTP implementation relying on java.net.URLConnection. However, using your preferred way to make HTTP requests can be done by implementing the be.ceau.itunesapi.http.Connector interface and passing an instance to the relevant API entry point:

  • be.ceau.itunesapi.Search.execute(Connector)
  • be.ceau.itunesapi.Lookup.execute(Connector)
  • be.ceau.itunesapi.FeedGenerator.execute(Connector)
  • be.ceau.itunesapi.GenreIdsAppendix.execute(Connector)

Requirements

This library requires Java 7 or higher.

Maven Central

Include this project directly from Maven Central

<dependency>
	<groupId>be.ceau</groupId>
	<artifactId>itunes-api</artifactId>
	<version>${project.version}</version>
</dependency>

iTunes Search

iTunes API is an evolution of the iTunes Search library. The new name iTunes API reflects the fact multiple APIs are implemented by the library.

GnuPG public key

Verify signature files with my GnuPG public key.

Javadoc

View javadoc for current release at javadoc.io.

License

Licensed under the Apache 2.0 license.

Disclaimer

iTunes is a trademark of Apple Inc., registered in the U.S. and other countries.

This library has not been authorized, sponsored, or otherwise approved by Apple Inc.

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.