GithubHelp home page GithubHelp logo

golden_delicious's Introduction

GoldenDelicious

Tasty info about an Apple serial number

Apple tries really hard to make it impossible to know anything about a serial number. Additionally, Apple uses about 5 different ways to identify a computer. This gem aims to make things a little easier.

NOTE: Every time you use this gem you make at least 2 HTTP requests.

Usage

I only want information about a serial number

Well then, just do this:

serial_number = GoldenDelicious::SerialNumber.new SERIAL_NUMBER

You'll get back an object with the following information:

serial_number.location The code for the plant this computer was manufactured at.
serial_number.year A code indicating what year this computer was manufactured.
serial_number.week The week this computer was manufactured.
serial_number.id The unique identifier for this computer.
serial_number.mode The computer's model identifier (e.g. Z5W or 1AX).
### I really only care about the computer's model

If you already know the model identifier then just do this:

model = GoldenDelicious::Model.new MODEL_IDENTIFIER

You'll get an object with the following information:

model.memory Information about the RAM that this computer uses.
model.storage Information about the hard drive in this computer.
model.identifiers Most of the identifiers Apple uses for this model.

Please see lib/golden_delicious/model.rb for more information - it's really simple, though quite ugly.

If you DON'T know the model identifier but you have a serial number:

device = GoldenDelicious::Device.new SERIAL_NUMBER

This object has all of the information that SerialNumber AND Model have! It's awesome!

Help?

This is just a gem I need for work projects, but if you want to help me, please feel free. Right now my tests woefully brittle: I don't have any serial numbers to test edge cases (older computers, iPhones, iPods, etc.). Please feel free to send me your serial number; I won't do anything weird with it - just put it in some tests to ensure that this gem does what it's supposed to.

golden_delicious's People

Contributors

sirovenmitts avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

fharbe

golden_delicious's Issues

Parse all relevant information from Apple serial numbers

Apple embeds several pieces of information in a serial number such as:

  • Where the computer was manufactured
  • What year it was manufactured
  • What week of the year it was manufactured

These values are encoded differently for the old style (11 digit) and new style (12 digit) numbers.

Currently GoldenDelicious doesn't do anything with the values it extracts, and so the raw encoded values are returned for SerialNumber#year and SerialNumber#week. I want to decode this information and provide an estimated manufacture date (week and year) as a Date object. Additionally, I want to find a list of Apple plants and match the code to the location; then I can return a string with the name of the plant.

Provide a link to an icon for the computer

Apple's selfsolve website (selfsolve.apple.com) shows an icon for a serial number. These icons are stored in a CDN in a well known location (based on the model identifier). I want to provide a link to the icon, if it's available, as a URI object for easy fetching.

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.