Skip to content

Commit

Permalink
Document export/import lua functions
Browse files Browse the repository at this point in the history
  • Loading branch information
ValentinFunk committed Sep 1, 2015
1 parent 55a42ee commit 77f57ef
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions api/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -200,3 +200,27 @@ Player integration
Adds premium points to a player's wallet.

**points**: Amount of points given


Export & Import
---------------

.. lua:function:: Pointshop2Controller:exportItems()
Exports all items of the shop into a timestamped text file. The name of the file is written to console. The file is written into the data directory.

.. lua:function:: Pointshop2Controller:exportCategoryOrganization()
Exports all categories and item->category mappings of the shop into a timestamped text file. The name of the file is written to console. The file is written into the data directory.

.. lua:function:: Pointshop2Controller:importCategoriesFromFile( filename )
Imports categories and item->category mappings of the shop from a text file.

**filename**: Name/path of the file to import from as string, relative to the data directory.

.. lua:function:: Pointshop2Controller:importItemsFromFile( filename )
Imports items from a text file.

**filename**: Name/path of the file to import from as string, relative to the data directory.

0 comments on commit 77f57ef

Please sign in to comment.