Fixed some bugs in api configuration.

New class created with the event type constants.
This commit is contained in:
José Lorente
2018-06-04 11:43:19 +02:00
parent a52000d07f
commit df8a344066
6 changed files with 69 additions and 12 deletions
+5 -1
View File
@@ -19,12 +19,14 @@
namespace Jlorente\Appsflyer\Api;
use GuzzleHttp\RequestOptions;
use Jlorente\Appsflyer\Core\Api;
/**
* Class InAppEvent.
*
* @author Jose Lorente <jose.lorente.martin@gmail.com>
* @see https://support.appsflyer.com/hc/en-us/articles/115005544169-Rich-In-App-Events-Android-and-iOS#EventTypes
*/
class InAppEvent extends Api
{
@@ -46,7 +48,9 @@ class InAppEvent extends Api
*/
public function create($appId, array $parameters = [])
{
return $this->_post("inappevent/$appId", $parameters);
return $this->_post("inappevent/$appId", [
RequestOptions::JSON => $parameters
]);
}
}