PHP Class App\Http\Controllers\NytController

Inheritance: extends Controller
Afficher le fichier Open project: unicodeveloper/laravel-hackathon-starter

Protected Properties

Свойство Type Description
$baseUrl string BaseUrl
$client object Instance of Guzzle Client

Méthodes publiques

Méthode Description
__construct ( ) Initialize the Controller with necessary arguments
getPage ( ) : array Return all the data to the New York times API dashboard
getRelativeUrl ( ) : string Get relative url

Private Methods

Méthode Description
getData ( ) : array Get the data response from a get operation
getResponse ( ) : array Get the whole response from a get operation
setGetResponse ( string $relativeUrl ) Get the response from New York times API

Method Details

__construct() public méthode

Initialize the Controller with necessary arguments
public __construct ( )

getPage() public méthode

Return all the data to the New York times API dashboard
public getPage ( ) : array
Résultat array

getRelativeUrl() public méthode

Get relative url
public getRelativeUrl ( ) : string
Résultat string

Property Details

$baseUrl protected_oe property

BaseUrl
protected string $baseUrl
Résultat string

$client protected_oe property

Instance of Guzzle Client
protected object $client
Résultat object