adambalan/laravel-helpscout

A helpscout API package for laravel

1.6.15 2018-03-03 02:53 UTC

README

This is a very simple project that supports the Helpscout API project I started.

As such all tests are in that particular project. Also see that project for the Api.

This particular package for Laravel is nothing more then a Service provider that registers a set of facades to make accessing the API Endpoints easier.

Setup

  • composer require adambalan/laravel-helpscout
  • Create an ENV called: HELPSCOUT_DOCS_API_KEY and assign it your appropriate API key.

GET Requests (Facades)

POST Requests (Facades)

PUT Requests (Facades)

DELETE Requests (Facades)

ASYNC (Facades)

Response Class (Regular Class: HelpscoutApi\Response\Response)

We have a response class that contains two methods: getLocation() and getContents() which allows you to get the location of the created object and the contents of the body of the response.

For the created response to come back, pass in: {'required': true} for the body when implementing the Post Body contracts. This will make sure that any created resources are passed back to you and you can use the getContents() method to get the decoded JSON values.

For more info please see the Response docs.

Where are the tests?

The tests are located in the Helpscout API project I started.

I did not include tests here because this is nothing more then facades and a provider. There is no core logic here.