 
 import Foundation
 import Alamofire
+import ObjectMapper
 
 extension String {
   public func hostUrl() -> String {
     return self.contains("http") ? self : "\(K.Api.host)\(self)"
   }
+}
+
+class PageMeta: Mappable {
+  var perPage: Int?
+  var totalPages: Int?
+  var totalObjects: Int?
+
+  func mapping(map: Map) {
+    perPage <- map["per_page"]
+    totalPages <- map["total_pages"]
+    totalObjects <- map["total_objects"]
+  }
+  required init?(map: Map) { }
 }
 
 open class API {

          prompt(message ?? "伺服器內部錯誤，請稍後再試。")
          appDelegate().did500Error()
        default:
          if let message = item.value(forKey: K.Api.Response.message) as? String {
            prompt(message)
          } else if let texts = item.value(forKey: K.Api.Response.message) as? NSDictionary {

    if Development.Log.API.request { _logForAnyMode(response.request!, title: "response.request") }
    switch response.result {
    case .success(let value):
      if value is NSArray { // 傳回陣列
        run(response)
      } else if let item = value as? NSDictionary { // 傳回 JSON
        if let debug = item.value(forKey: "debug") as? String { if _isWho("CT") { prompt(debug) } }
        let message = item.value(forKey: K.Api.Response.message) as? String
        switch (response.response?.statusCode)! {
        case 400, 404, 405, 422:
