actions-on-google / actions-on-google-java

Java/Kotlin library for Actions on Google
Apache License 2.0
286 stars 39 forks source link

DialogflowRequest is internal #21

Closed timrijckaert closed 5 years ago

timrijckaert commented 5 years ago

Hi,

In the README file it states you can create an ActionRequest from a raw json. I looked in the samples and found how:

@Throws(IOException::class)
private fun fromFile(file: String): DialogflowRequest {
    val absolutePath = Paths.get("src", "test", "resources",
            file)
    val gson = Gson()
    val reader = Files.newBufferedReader(absolutePath)
    val json = gson.fromJson(reader, JsonObject::class.java)

    return DialogflowRequest.create(json, null)
}

However when I try this import it seems the DialogflowRequest is internal? What am I missing? How can you create an ActionRequest from a raw JSON?

Screenshot from 2019-05-15 17-50-13

Thanks

aradwyr commented 5 years ago

Closing due to no direct issue with the client library itself. This is a general question and is better suited for Stack Overflow -- Github issues are for reporting bugs contained in Actions on Google samples or client libraries, thank you for understanding.