pointybeard/kickstarter-export-parser

A PHP library for opening and parsing backer exports from Kickstarter campaigns.

1.0.12 2019-04-13 03:38 UTC

This package is auto-updated.

Last update: 2024-11-13 15:30:17 UTC


README

Latest Stable Version License

Opens a backer data zip file downloaded from Kickstarter and parses it for consumption.

Installation

Kickstarter Export Parser is a utility library for inclusion in larger projects. Installation is best done via Composer. To install, use composer require pointybeard/kickstarter-export-parser or add "pointybeard/kickstarter-export-parser": "~1.0" to your composer.json file.

Usage

Here is a basic example of how to use this library:

use pointybeard\Kickstarter\ExportParser\Lib;

$archive = new Lib\BackerArchive(
    "/PATH/TO/KICKSTARTER/EXPORTED/DATA/HERE.zip"
);

foreach($archive->rewards() as $r){
    do{
        $record = $r->records()->current();

        // ... do stuff with $record ...

        $r->records()->next();
    } while($r->records()->valid());
}

$archive->close();

Running the Test Suite

You can check that all code is passing by running the following command from the kickstarter-export-parser folder:

./vendor/bin/phpunit --bootstrap vendor/autoload.php tests/

If you want to run code coverage (e.g. --coverage-html tests/reports/ ...) you'll need xdebug. To install this, use the following commands:

pecl channel-update pecl.php.net
pecl install xdebug

Support

If you believe you have found a bug, please report it using the GitHub issue tracker, or better yet, fork the library and submit a pull request.

Contributing

We encourage you to contribute to this project. Please check out the Contributing documentation for guidelines about how to get involved.

License

"Kickstarter Export Parser" is released under the MIT License.