Class: Spaceship::Tunes::RecoveryDevice

Inherits:
TunesBase show all
Defined in:
lib/spaceship/tunes/recovery_device.rb

Instance Attribute Summary collapse

Attributes inherited from Base

#client, #raw_data

Class Method Summary collapse

Methods inherited from TunesBase

client

Methods inherited from Base

attr_accessor, attr_mapping, #attributes, attributes, #initialize, #inspect, mapping_module, method_missing, set_client, #setup, #to_s

Constructor Details

This class inherits a constructor from Spaceship::Base

Instance Attribute Details

#device_idString

Returns ID provided by Apple.

Examples:

"1801231651"

Returns:

  • (String)

    ID provided by Apple



7
8
9
# File 'lib/spaceship/tunes/recovery_device.rb', line 7

def device_id
  @device_id
end

#device_imageString

Returns Remote URL to an image representing this device This shows the attention to detail by Apple <3.

Examples:

"https://appleid.cdn-apple.com/static/deviceImages-5.0/iPhone/iPhone8,1-e4e7e8-dadcdb/online-sourcelist__3x.png"
"https://appleid.cdn-apple.com/appleauth/static/bin/cb2613252489/images/[email protected]"

Returns:

  • (String)

    Remote URL to an image representing this device This shows the attention to detail by Apple <3



32
33
34
# File 'lib/spaceship/tunes/recovery_device.rb', line 32

def device_image
  @device_image
end

#last_two_digitsString

Examples:

"79"

Returns:



44
45
46
# File 'lib/spaceship/tunes/recovery_device.rb', line 44

def last_two_digits
  @last_two_digits
end

#model_nameString

Examples:

"iPad Air"
nil # e.g. when it's a phone number

Returns:



39
40
41
# File 'lib/spaceship/tunes/recovery_device.rb', line 39

def model_name
  @model_name
end

#nameString

Returns The name of the device.

Examples:

"Felix Krause's iPhone 6"

Returns:

  • (String)

    The name of the device



12
13
14
# File 'lib/spaceship/tunes/recovery_device.rb', line 12

def name
  @name
end

#statusBool

Examples:

true

Returns:

  • (Bool)


24
25
26
# File 'lib/spaceship/tunes/recovery_device.rb', line 24

def status
  @status
end

#trustedBool

Returns This device looks suspicious [add emoji here] this will probably always be true, otherwise the device doesn’t show up.

Examples:

true

Returns:

  • (Bool)

    This device looks suspicious [add emoji here] this will probably always be true, otherwise the device doesn’t show up



19
20
21
# File 'lib/spaceship/tunes/recovery_device.rb', line 19

def trusted
  @trusted
end

#update_dateNumber

Examples:

1446488271926

Returns:

  • (Number)


49
50
51
# File 'lib/spaceship/tunes/recovery_device.rb', line 49

def update_date
  @update_date
end

Class Method Details

.factory(attrs) ⇒ Object



63
64
65
# File 'lib/spaceship/tunes/recovery_device.rb', line 63

def factory(attrs)
  return self.new(attrs)
end