2017 © Pedro Peláez
 

library api-serializer

Custom Fractal serializer for our preferred API output.

image

pixelfusion/api-serializer

Custom Fractal serializer for our preferred API output.

  • Monday, May 22, 2017
  • by kielabokkie
  • Repository
  • 1 Watchers
  • 0 Stars
  • 2,118 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 2 Forks
  • 0 Open issues
  • 6 Versions
  • 3 % Grown

The README.md

Pixel Fusion API Serializer

NZ Love Awesomeness, (*1)

This package provides a custom Serializer for Fractal that transforms data into the API output that we at Pixel Fusion prefer., (*2)

Installation

To install the latest version of this package run the following command:, (*3)

composer require pixelfusion/api-serializer

After that you should change the serializer that you want to use to PixelFusion\Fractal\Serializer\ApiSerializer., (*4)

Output format

This API serializer extends the default ArraySerializer but has a slight difference. For the pagination we omitted the fields that we don't use. Below is an example of how a response that includes pagination will look like:, (*5)

{
  "data": [
    {
      "id": "7ywpxp6r",
      "title": "The Godfather",
    },
    {
      "id": "q9pykp17",
      "title": "Pulp Fiction",
    }
  ],
  "pagination": {
    "total": 9,
    "per_page": 2,
    "current_page": 1,
    "last_page": 5
  }
}

The Versions

22/05 2017

dev-master

9999999-dev

Custom Fractal serializer for our preferred API output.

  Sources   Download

MIT

The Requires

 

by Wouter Peschier

api json serializer fractal

22/05 2017

1.1.2

1.1.2.0

Custom Fractal serializer for our preferred API output.

  Sources   Download

MIT

The Requires

 

by Wouter Peschier

api json serializer fractal

22/05 2017

1.1.1

1.1.1.0

Custom Fractal serializer for our preferred API output.

  Sources   Download

MIT

The Requires

 

by Wouter Peschier

api json serializer fractal

31/08 2016

1.1.0

1.1.0.0

Custom Fractal serializer for our preferred API output.

  Sources   Download

MIT

The Requires

 

by Wouter Peschier

api json serializer fractal

19/08 2016

1.0.1

1.0.1.0

Custom Fractal serializer for our preferred API output.

  Sources   Download

MIT

The Requires

 

by Wouter Peschier

api json serializer fractal

18/08 2016

1.0.0

1.0.0.0

Custom Fractal serializer for our preferred API output.

  Sources   Download

MIT

The Requires

 

by Wouter Peschier

api json serializer fractal