Skip to content
This repository has been archived by the owner on May 28, 2023. It is now read-only.

Misc (1.0)

Percy Mamedy edited this page Mar 11, 2017 · 1 revision

Custom Headers

If you want to pass custom Http Headers, to use in each API call to Watson:

$insights = app('PersonalityInsights')->appendHeaders(['X-foo' => 'Bar']);

Using another credentials

You can specify the credentials to use for the requests to Watson, just make sure you have defined them in config/personality-insights.php see Credentials

$insights = app('PersonalityInsights')->usingCredentials('anotherCredentialName');

House keeping

By default the service keeps profile data and contentItems that have been analysed in the object properties, if you ever want to clean everything and start from scratch again use the clean() method

$insights->clean();