diff --git a/src/Builders/Builder.php b/src/Builders/Builder.php index 78c62a1..0fedc15 100644 --- a/src/Builders/Builder.php +++ b/src/Builders/Builder.php @@ -33,7 +33,7 @@ public function __construct(Request $request ) */ public function get($filters = [] ) { - $filters[] = [ 'limit', '=', 1500 ]; + $filters[] = [ 'limit', '=', 1000 ]; $urlFilters = $this->parseFilters( $filters ); @@ -102,7 +102,7 @@ public function all($filters = [] ) $response = function ( $filters, $page ) { - $filters[] = [ 'limit', '=', 1500 ]; + $filters[] = [ 'limit', '=', 1000 ]; $filters[] = [ 'page', '=', $page ]; $urlFilters = $this->parseFilters( $filters ); @@ -185,4 +185,4 @@ public function setEntity( $new_entity ) return $this->entity; } -} \ No newline at end of file +} diff --git a/src/Utils/Request.php b/src/Utils/Request.php index 37b8346..4e009b4 100644 --- a/src/Utils/Request.php +++ b/src/Utils/Request.php @@ -33,9 +33,10 @@ public function __construct( $token = null, $options = [], $headers = [] ) { $token = $token ?? config( 'rackbeat.token' ); $headers = array_merge( $headers, [ - - 'Accept' => 'application/json', - 'Content-Type' => 'application/json', + + 'User-Agent' => config('rackbeat.user_agent'), + 'Accept' => 'application/json; charset=utf8', + 'Content-Type' => 'application/json; charset=utf8', 'Authorization' => 'Bearer ' . $token, ] ); $options = array_merge( $options, [ @@ -92,4 +93,4 @@ public function handleWithExceptions( $callback ) throw new RackbeatClientException( $message, $code ); } } -} \ No newline at end of file +} diff --git a/src/config/rackbeat.php b/src/config/rackbeat.php index 968f7c9..2f22aa7 100644 --- a/src/config/rackbeat.php +++ b/src/config/rackbeat.php @@ -9,6 +9,7 @@ return [ 'token' => env( 'RACKBEAT_API_TOKEN' ), + 'user_agent' => env('RACKBEAT_USER_AGENT', 'kg-bot/laravel-rackbeat') 'supplier' => [ 'fields' => [ @@ -20,4 +21,4 @@ ], ], 'base_uri' => env( 'RACKBEAT_BASE_URL', 'https://app.rackbeat.com/api/' ), -]; \ No newline at end of file +];