 	print(error)
 }
 
+var projectLanguages: [JSONDictionary]!
 
+poeditor.listProjectLanguages(projectID: projectID) { result in
+
+	switch result
+	{
+	case .success(let languages):
+		projectLanguages = languages
+		
+	case .failure(WebServiceError.serviceError(let message)):
+		print("POEditor.com responded: \(message)")
+		exit(1)
+		break
+		
+	case .failure(WebServiceError.networkError(let error)):
+		print("Network Error: \(error.localizedDescription)")
+		exit(1)
+		break
+		
+	case .failure(let error):
+		print(error.localizedDescription)
+		break
+	}
+	
+	sema.signal()
+}
+
+sema.wait()
+
+let completeLangs = projectLanguages.filter { (language) -> Bool in
+	if let percent = language["percentage"] as? Int, percent == 100
+	{
+		return true
+	}
+	
+	return false
+}
+
+let codes = completeLangs.map { (language) -> String in
+	return language["code"] as! String
+}
+
+print(codes)
+

let sema = DispatchSemaphore(value: 0)

var token: String!
var projectID: String!

let workingDirURL = URL(fileURLWithPath: FileManager.default.currentDirectoryPath)
let settingsFileURL = workingDirURL.appendingPathComponent("poet.json")

	if let settings = try JSONSerialization.jsonObject(with: data, options: []) as? [String: Any]
	{
		token = settings["token"] as? String
		projectID = settings["projectID"] as? Int
	}
}
catch _
