wit-ai / wit-ios

Wit.ai iOS client
Other
222 stars 71 forks source link

Added support for converse endpoint #78

Closed klintan closed 7 years ago

klintan commented 7 years ago

Added support for the conversation endpoint and updated the deprecated NSURLConnection to NSURLSession (perhaps break supports for earlier versions?)

Perhaps a different delegate method should be implemented for the response from converse, I used the same witDidGraspIntent.

Let me know what you think, thought I'd do an pull request regardless.

hactar commented 7 years ago

Nice to see someone finally working on this, thanks.

I pulled in an older version of your fork into my fork and couldn't get it to work: noticed that you had named session_id incorrectly and were sending both "q" and session id as part of the HTTP body. I've noticed you've fixed that for the session_id, but are still sending q as part of the body? That contradicts the official documentation here: https://wit.ai/docs/http/20160526#post--converse-link

I'll be pulling your pr into my own (https://github.com/wit-ai/wit-ios-sdk/pull/74) later today and will work on implementing new delegate methods as you proposed - separating out msg, action and stop into separate methods.

klintan commented 7 years ago

Thanks for your comments. Yes you are right, nice catch, I noticed that later on as well as I tested it further. Do you want me to fix it and do another one or will you do that in your PR and close this one ?

hactar commented 7 years ago

I've fixed it in #74, now working on improved delegates.

hactar commented 7 years ago

This PR was included in PR #74, closing.