Skip to content

This PHP package is a provider for the Prepr GraphQL API.

Notifications You must be signed in to change notification settings

preprio/php-graphql-sdk

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 

Repository files navigation

PHP + Prepr SDK

This package is an SDK for the GraphQL API.

Basics

The SDK on GitHub

Minimal PHP version: ^8.2

Requires GuzzleHttp ^7.7.0

For Laravel projects we recommend using the Laravel providers for REST or GraphQL.

Installation

You can install the SDK as a composer package.

composer require preprio/php-graphql-sdk

Making your first request

Let's start with getting some content items from your Prepr Environment.

<?php

use Preprio\Prepr;

$apiRequest = new Prepr('{ENDPOINT_URL}');

$apiRequest
    ->headers([
    
    ])
    ->query('fileurl')
    ->variables([
    
    ])
    ->request();

print_r($apiRequest->getResponse());
<?php

use Preprio\Prepr;

$apiRequest = new Prepr('{ENDPOINT_URL}');

$apiRequest
    ->headers([
    
    ])
    ->rawQuery('raw-query')
    ->variables([
    
    ])
    ->request();

print_r($apiRequest->getResponse());

Debug Errors

With $apiRequest->getRawResponse() you can get the raw response from the Prepr API.

About

This PHP package is a provider for the Prepr GraphQL API.

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages