Skip to content
This repository has been archived by the owner on Mar 30, 2023. It is now read-only.
/ itunes-client Public archive
forked from katsuma/itunes-client

itunes-client provides a high level API (like ActiveRecord style) to control your iTunes.

License

Notifications You must be signed in to change notification settings

yosangwon/itunes-client

 
 

Repository files navigation

itunes-client Build Status Coverage Status

itunes-client provides a high level API (like ActiveRecord style) to control your iTunes.

Installation

Add this line to your application's Gemfile:

gem 'itunes-client'

And then execute:

$ bundle

Or install it yourself as:

$ gem install itunes-client

Supported OS

  • OSX Yosemite
  • OSX Mavericks

Supported Ruby

  • 2.2.0-preview1
  • 2.1.3
  • 2.0.0
  • 1.9.3

Usage

require 'itunes-client'
include Itunes

# Add a track to player
track = Itunes::Player.add(path_to_your_sound_file)

# Convert by default encoder
encoded_track = track.convert

# Find all tracks
tracks = Track.find_by(name: "Hello, Goodbye")
# => [#<Itunes::Track:0x007fdd38a1d430 @persistent_id="571B6412CDADBC93", @name="Hello, Goodbye", @album="1", @artist="The Beatles", @track_count="27", @track_number="19">]

track = tracks.first

# Play track
track.play

# Stop track
track.stop

License

itunes-client is released under the MIT License.

Contributing

  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request

Bitdeli Badge

About

itunes-client provides a high level API (like ActiveRecord style) to control your iTunes.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Ruby 85.5%
  • AppleScript 14.5%