Created
September 16, 2016 15:00
-
-
Save informz/97408c74d2de57b6e5ac83444289bfe9 to your computer and use it in GitHub Desktop.
Fetches Inventory
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import play.api.libs.json.Json | |
import play.api.libs.ws.ning.NingWSClient | |
import scala.concurrent.ExecutionContext.Implicits.global | |
/** | |
* Created by ball on 9/16/16. | |
*/ | |
object InventoryFetcher { | |
def main(args: Array[String]): Unit = { | |
val wsClient = NingWSClient() | |
val postRequest = Json.parse( | |
""" | |
{ | |
"channels" : [], | |
"qtrStartDate" : "26-SEP-2015", | |
"qtrEndDate" : "25-DEC-2016" | |
} | |
""") | |
wsClient.url("https://inventory-stage.cloudeast.inbcu.com/inventory/extractInventoryData") | |
.post(postRequest) | |
.map { inv => | |
println(inv.json) | |
wsClient.close() | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment