Skip to content

Commit

Permalink
Merge pull request #15 from zaikorea/luna/3.0.1/fix-aesops-error
Browse files Browse the repository at this point in the history
[fix] Rename EventLoggerResponse.php
  • Loading branch information
kyungwon-lee authored Feb 7, 2024
2 parents e56dc99 + c1f7c00 commit 4ceb49b
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "zaikorea/zaiclient",
"version": "3.0.0",
"version": "3.0.1",
"description": "Z.Ai official client SDK",
"hompage": "https://www.zaikorea.org",
"autoload": {
Expand Down
2 changes: 1 addition & 1 deletion src/Responses/EventResponse.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php
namespace ZaiClient\Responses;

class EventLoggerResponse
class EventResponse
{

/**
Expand Down
7 changes: 4 additions & 3 deletions src/ZaiClient.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
use ZaiClient\Requests\Items\ItemRequest;
use ZaiClient\Requests\Recommendations\RecommendationRequest;
use ZaiClient\Requests\Request;
use ZaiClient\Responses\EventLoggerResponse;
use ZaiClient\Responses\EventResponse;
use ZaiClient\Responses\ItemResponse;
use ZaiClient\Responses\RecommendationResponse;
use ZaiClient\Security\ZaiHeaders;
Expand Down Expand Up @@ -92,7 +92,8 @@ public function sendRequest($request, $options = ['is_test' => false])
}

$url = sprintf(
$request->getBaseUrl(), $this->options['custom_endpoint']
$request->getBaseUrl(),
$this->options['custom_endpoint']
) . $path;

try {
Expand All @@ -115,7 +116,7 @@ public function sendRequest($request, $options = ['is_test' => false])

if (is_a($request, EventRequest::class)) {
$response_body = json_decode($response->getBody());
$event_response = $this->json_mapper->map($response_body, new EventLoggerResponse());
$event_response = $this->json_mapper->map($response_body, new EventResponse());
return $event_response;
}

Expand Down

0 comments on commit 4ceb49b

Please sign in to comment.