     + "&id=#{id}"
 
 
+# Translates a resolution code to an API resolution.
+#
+# @param [Number] code th code to translate
+#
+codeToApiResolution = (code) ->
+  resolutions = [
+    'previewURL'
+    'webformatURL'
+    'largeImageURL'
+    'fullHDURL'
+    'imageURL'
+    'vectorURL'
+  ]
+  resolutions[code]
+
+
+# Translates a human-readable resolution to a resolution code.
+#
+# @param [String] resolution the resolution to translate
+#
+humanResolutionToCode = (resolution) ->
+  humanResolutions = [
+    'tiny'
+    'small'
+    'large'
+    'hd'
+    'full'
+    'vector'
+  ]
+  humanResolutions.indexOf resolution
+
+
 # Checks whether or not a human-readable resolution name is valid.
 #
-# @param [Number] res the resolution code to check.
-#
-isValidResolution = (res) -> humanResolutions.indexOf(res) > -1
-
-
-# Gets the code for a human-readable resolution name.
-#
-# @param [String] res the human-readable resolution name to get the code for
-#
-getResolutionCode = (res) -> humanResolutions.indexOf res
+# @param [Number] resolution the resolution code to check.
+#
+isValidResolutionCode = (resolution) -> humanResolutionToCode(resolution) > -1
 
 
 # Persists an object to a file as JSON.

      log.error 'You didn\'t provide enough arguments! Like this:' \
        + ' \'picksel add <id> <resolution> <destination>\'' # ID not passed in.
  else
    if isValidResolution resolution
      validateId id, (success) ->
        if success
          image =

log = new Log logSettings


class Project
  constructor: () ->
    @directory = ''
