mirror of
https://github.com/arcan1s/ffxivbis.git
synced 2025-04-25 01:37:17 +00:00
fix to recent xivapi changes
This commit is contained in:
parent
bdfb5aedeb
commit
12c99bd52c
@ -61,7 +61,7 @@ class Ariyala extends Actor with StrictLogging {
|
|||||||
val uri = Uri(xivapiUrl)
|
val uri = Uri(xivapiUrl)
|
||||||
.withPath(Uri.Path / "item")
|
.withPath(Uri.Path / "item")
|
||||||
.withQuery(Uri.Query(Map(
|
.withQuery(Uri.Query(Map(
|
||||||
"columns" -> Seq("ID", "IsEquippable").mkString(","),
|
"columns" -> Seq("ID", "Lot").mkString(","),
|
||||||
"ids" -> itemIds.mkString(","),
|
"ids" -> itemIds.mkString(","),
|
||||||
"private_key" -> xivapiKey.getOrElse("")
|
"private_key" -> xivapiKey.getOrElse("")
|
||||||
)))
|
)))
|
||||||
@ -123,7 +123,7 @@ object Ariyala {
|
|||||||
Future {
|
Future {
|
||||||
js.fields("Results") match {
|
js.fields("Results") match {
|
||||||
case array: JsArray =>
|
case array: JsArray =>
|
||||||
array.elements.map(_.asJsObject.getFields("ID", "IsEquippable") match {
|
array.elements.map(_.asJsObject.getFields("ID", "Lot") match {
|
||||||
case Seq(JsNumber(id), JsNumber(isTome)) => id.toLong -> (isTome == 0)
|
case Seq(JsNumber(id), JsNumber(isTome)) => id.toLong -> (isTome == 0)
|
||||||
case other => throw deserializationError(s"Could not parse $other")
|
case other => throw deserializationError(s"Could not parse $other")
|
||||||
}).toMap
|
}).toMap
|
||||||
|
Loading…
Reference in New Issue
Block a user