Sha256: 1061fc24c47a6299be63157f97f57fbc3254eb136790e12f31ecaee54422ffac
Contents?: true
Size: 1.41 KB
Versions: 2
Compression:
Stored size: 1.41 KB
Contents
require_relative '../model' module Spaceship class ConnectAPI class Device include Spaceship::ConnectAPI::Model attr_accessor :device_class attr_accessor :model attr_accessor :name attr_accessor :platform attr_accessor :status attr_accessor :udid attr_accessor :added_date attr_mapping({ "deviceClass" => "device_class", "model" => "model", "name" => "name", "platform" => "platform", "status" => "status", "udid" => "udid", "addedDate" => "added_date" }) module DeviceClass APPLE_WATCH = "APPLE_WATCH" IPAD = "IPAD" IPHONE = "IPHONE" IPOD = "IPOD" APPLE_TV = "APPLE_TV" MAC = "MAC" end module Status ENABLED = "ENABLED" DISABLED = "DISABLED" end def self.type return "devices" end # # API # def self.all(filter: {}, includes: nil, limit: nil, sort: nil) resps = Spaceship::ConnectAPI.get_devices(filter: filter, includes: includes).all_pages return resps.flat_map(&:to_models) end def self.create(name: nil, platform: nil, udid: nil) resp = Spaceship::ConnectAPI.post_device(name: name, platform: platform, udid: udid) return resp.to_models.first end end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
fastlane_hotfix-2.165.1 | spaceship/lib/spaceship/connect_api/models/device.rb |
fastlane_hotfix-2.165.0 | spaceship/lib/spaceship/connect_api/models/device.rb |