Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

v0.0.1 -finally!

  • Loading branch information...
commit 586b50952fbf3a35b876480953d4b2b8e5b8d9fa 1 parent e32a664
sshaw authored
Showing with 76 additions and 12 deletions.
  1. +0 −1  README.rdoc
  2. +76 −11 lib/itunes/store/transporter.rb
View
1  README.rdoc
@@ -117,7 +117,6 @@ Default options and email notifications can be placed in a YAML file at <code>$H
=== More Info
-* Documentation: http://rdoc.info/github/sshaw/itunes_store_transporter
* Source Code: http://github.com/sshaw/itunes_store_transporter
* Bugs: http://github.com/sshaw/itunes_store_transporter/issues
View
87 lib/itunes/store/transporter.rb
@@ -15,10 +15,19 @@ module Store
class Transporter
##
+ # === Arguments
+ #
+ # [options (Hash)] Transporter options
+ #
# === Options
#
- # Options given here will be used as defaults, i.e., for all subsequent method calls. Thus you can set method specific options here but, if you call a method that does not accept these options, it will raise an OptionError.
- #
+ # Options given here will be used as defaults for all subsequent method calls. Thus you can set method specific options here but, if you call a method that does not accept one of these options, an OptionError will be raised.
+ #
+ # See specific methods for a list of options.
+ #
+ # [:username (String)] Your username
+ # [:password (String)] Your password
+ # [:shortname (String)] Your shortname. Optional, not every iTunes account has one
# [:path (String)] The path to the +iTMSTransporter+. Optional.
# [:print_stdout (Boolean)] Print +iTMSTransporter+'s stdout to your stdout. Defaults to +false+.
# [:print_stderr (Boolean)] Print +iTMSTransporter+'s stderr to your stderr. Defaults to +false+.
@@ -40,8 +49,18 @@ def initialize(options = nil)
#
# Retrieve the metadata for a previously delivered package.
#
+ # === Arguments
+ #
+ # [options (Hash)] Transporter options
+ #
+ # ==== Options
+ #
# You must use either the +:apple_id+ or +:vendor_id+ option to identify the package
#
+ # === Errors
+ #
+ # TransporterError, OptionError, ExecutionError
+ #
# === Returns
#
# [String] The metadata
@@ -53,6 +72,14 @@ def initialize(options = nil)
#
# List of Providers for whom your account is authorzed to deliver for.
#
+ # === Arguments
+ #
+ # [options (Hash)] Transporter options
+ #
+ # === Errors
+ #
+ # TransporterError, OptionError, ExecutionError
+ #
# === Returns
#
# [Array] Each element is a +Hash+ with two keys: +:shortname+ and +:longname+ representing the given provider's long and short names
@@ -64,24 +91,46 @@ def initialize(options = nil)
#
# Download a RelaxNG schema file for a particular metadata specification.
#
+ # === Arguments
+ #
+ # [options (Hash)] Transporter options
+ #
+ # === Options
+ #
+ # [:type (String)] transitional or strict
+ # [:version (String)] The schema version you'd like to download. This is typically in the form of +schemaVERSION+. E.g., +film4.8+
+ #
+ # === Errors
+ #
+ # TransporterError, OptionError, ExecutionError
+ #
# === Returns
#
# [String] The schema
-
+
##
# :method: status
# :call-seq:
# status(options = {})
#
# Retrieve the status of a previously uploaded package.
+ #
+ # === Arguments
+ #
+ # [options (Hash)] Transporter options
+ #
+ # === Options
+ #
+ # [:vendor_id (String)] ID of the package you want status info on
+ #
+ # === Errors
#
- # You must use either the +:vendor_id+ option to identify the package.
+ # TransporterError, OptionError, ExecutionError
#
# === Returns
#
# [Hash] Descibes various facets of the package's status.
-
##
# :method: upload
# :call-seq:
@@ -91,18 +140,26 @@ def initialize(options = nil)
#
# === Arguments
#
- # [package (String)] The path to the package to upload
- # [options (Hash)] Upload options
+ # [package (String)] The path to the package directory to upload. Package names must end in +.itmsp+.
+ # [options (Hash)] Transporter options
#
# === Options
#
- # [:transport] The method used to upload your package. Optional. Can be one of: <code>"Aspera"</code>, <code>"Signiant"</code>, or <code>"DEV"</code>. By default +iTMSTransporter+ automatically selects the transport.
- # [:rate] Target bitrate in Kbps. Optional, only used with +Aspera+ and +Signiant+
+ # [:transport (String)] The method/protocol used to upload your package. Optional. Can be one of: <code>"Aspera"</code>, <code>"Signiant"</code>, or <code>"DEV"</code>. By default +iTMSTransporter+ automatically selects the transport.
+ # [:rate (Integer)] Target bitrate in Kbps. Optional, only used with +Aspera+ and +Signiant+
+ # [:success (String)] A directory to move the package to if the upload succeeds
+ # [:failure (String)] A directory to move the package to if the upload fails
+ # [:delete (Boolean)] Delete the package if the upload succeeds. Defaults to +false+.
+ # [:log_history (String)] Write an +iTMSTransporter+ log to this directory. Off by default.
+ #
+ # === Errors
+ #
+ # TransporterError, OptionError, ExecutionError
#
# === Returns
#
# +true+ if the upload was successful.
-
+
##
# :method: verify
# :call-seq:
@@ -115,9 +172,17 @@ def initialize(options = nil)
#
# === Arguments
#
- # [package (String)] The path to the package to verify
+ # [package (String)] The path to the package directory to verify. Package names must end in +.itmsp+.
# [options (Hash)] Verify options
#
+ # === Options
+ #
+ # [:verify_assets (Boolean)] If false the assets will not be verified. Defaults to +true+.
+ #
+ # === Errors
+ #
+ # TransporterError, OptionError, ExecutionError
+ #
# === Returns
#
# +true+ if the package was verified.
Please sign in to comment.
Something went wrong with that request. Please try again.