Skip to content

Commit

Permalink
Add place api.
Browse files Browse the repository at this point in the history
Signed-off-by: Mior Muhammad Zaki <crynobone@gmail.com>
  • Loading branch information
crynobone committed Aug 2, 2019
1 parent e203da2 commit eb24b4d
Showing 1 changed file with 28 additions and 0 deletions.
28 changes: 28 additions & 0 deletions src/One/Place.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
<?php

namespace Katsana\Sdk\One;

use Katsana\Sdk\Query;
use Laravie\Codex\Contracts\Response;

class Place extends Request
{
/**
* Query places by latitude and longitude.
*
* @param float $latitude
* @param float $longitude
*
* @return \Katsana\Sdk\Response
*/
public function query($latitude, $longitude): Response
{
$this->requiresAccessToken();

$query = Query::with('latitude', $latitude)->with('longitude', $longitude);

return $this->send(
'GET', "places", $this->getApiHeaders(), $this->buildHttpQuery($query)
);
}
}

0 comments on commit eb24b4d

Please sign in to comment.