   }
 
   var url: String {
-    return "\(baseURL)\(path)"
+    return "\(baseURL)\(path).json"
   }
 
 }


  var sampleData: NSData {
    switch self {
    case .Listing:
      return JSONReader.readJSONData("Listing")
    }
  }

  var headers: [String: String]? {
    switch self {
    case .Listing(let token, _, _, _):
      guard let token = token else {
        return nil
      }
      return ["Authorization": "bearer \(token)"]
    default:
      return nil
    }
  }

  var parameterEncoding: ParameterEncoding {


enum RedditAPI {

  case SubredditListing(token: String, after: String?)
  case LinkListing(token: String?, subredditName: String, listing: ListingType, after: String?)

}

