Overview
  • Package
  • Class
  • Tree
  • Todo

Packages

  • AddonValue
    • Interfaces
  • ApiV2Controllers
  • Category
    • Collections
    • Entities
    • Factories
    • Interfaces
    • Providers
    • Repositories
    • Storages
  • Customer
    • Address
    • Country
    • CountryZone
    • Interfaces
    • Validation
    • ValueObjects
  • Email
    • Collections
    • Entities
    • Exceptions
    • Interfaces
    • Repository
    • ValueObjects
  • Http
    • Collections
    • Exceptions
    • Factories
    • Interfaces
    • ValueObjects
  • Loaders
    • CrossCuttingLoader
    • GXCoreLoader
    • Interfaces
  • None
  • Order
    • Collections
    • Entities
    • Factories
    • Interfaces
    • Repositories
    • Storages
    • ValueObjects
  • Product
    • Collections
    • Entities
    • Factories
    • Interfaces
    • Providers
    • Repositories
    • Storages
  • ProductModule
    • Collections
    • Deleter
    • Entities
    • Factories
    • Interface
    • Interfaces
    • Reader
    • Repositories
    • Writer
  • Shared
    • Exceptions
    • FileSystem
    • Interfaces
    • Storage
    • Types
  • Statistics
    • Interfaces
  • UserConfiguration
    • Interfaces
    • Repository

Classes

  • AbstractApiV2Controller
  • AbstractImagesApiV2Controller
  • AddressesApiV2Controller
  • AttachmentsApiV2Controller
  • CategoriesApiV2Controller
  • CategoryIconsApiV2Controller
  • CategoryImagesApiV2Controller
  • CountriesApiV2Controller
  • CustomersApiV2Controller
  • DefaultApiV2Controller
  • EmailsApiV2Controller
  • HttpApiV2Controller
  • OrdersApiV2Controller
  • OrdersHistoryApiV2Controller
  • OrdersItemsApiV2Controller
  • OrdersItemsAttributesApiV2Controller
  • OrdersTotalsApiV2Controller
  • ProductImagesApiV2Controller
  • ProductsApiV2Controller
  • ProductsLinksApiV2Controller
  • ZonesApiV2Controller

Class CategoryIconsApiV2Controller

Class CategoryIconsApiV2Controller

This controller handles the Category Icon file operations. The clients of the API can list, upload, rename or delete files that exist in the server.

AbstractApiV2Controller
Extended by HttpApiV2Controller
Extended by AbstractImagesApiV2Controller
Extended by CategoryIconsApiV2Controller
Package: ApiV2Controllers
Category: System
Located at v2/CategoryIconsApiV2Controller.inc.php

Methods summary

protected
# __initialize( )

Initializes API Controller

Initializes API Controller

protected string
# _getImageFolderName( )

Returns the absolute path where the image files are located.

Returns the absolute path where the image files are located.

Returns

string
Image folder name.
public
# post( )

Api

{post} /category_icons Upload Category Icon

Apidescription

Upload an icon image for the categories. Make this request without the "Content-Type: application/json". Except from the file the POST request must also contain a "filename" value with the final file name.


Apierror

400-BadRequest No image file or filename parameter have been provided.

Apierrorexample

Error-Response (No image file) HTTP/1.1 400 Bad Request { "code": 400, "status": "error", "message": "No image file was provided." }


Error-Response (No filename) HTTP/1.1 400 Bad Request { "code": 400, "status": "error", "message": "The 'filename' parameter is required and was not provided with the request." }


Apigroup

Categories

Apiname

UploadCategoryIcon

Apisuccess

(Success 201) Response-Body Contains information about the uploaded file.

Apisuccessexample

{json} Success-Response { "code": 201, "status": "success", "action": "upload", "filename": "my-icon-file.png" }


Apiversion

2.1.0
public
# put( )

Api

{put} /category_icons Rename Icon File

Apidescription

Use this method to rename an existing icon file.

Apierror

400-BadRequest The body of the request was empty or the request body did not contain the oldFilename or newFilename properties, or their values were invalid.


Apierrorexample

Error-Response (Empty request body) HTTP/1.1 400 Bad Request { "code": 400, "status": "error", "message": "Category icon data were not provided." }


Error-Response (Missing parameters) HTTP/1.1 400 Bad Request { "code": 400, "status": "error", "message": "This operation requires a JSON object with 'oldFilename' and 'newFilename' properties set." }


Apiexample

{json} Request-Body { "oldFilename": "my-old-icon.png", "newFilename": "my-new-icon.png" }


Apigroup

Categories

Apiname

RenameIconFile

Apisuccess

Response-Body Contains information about the executed operation.

Apisuccessexample

{json} Response-Body { "code": 200, "status": "success", "action": "rename", "oldFilename": "my-old-icon.png", "newFilename": "my-new-icon.png" }


Apiversion

2.1.0
public
# delete( )

Api

{delete} /category_icon Delete Category Icon

Apidescription

Removes the category icon file from the server. This method will always provide a successful response even if the image file was not found.


Apierror

400-BadRequest Category icon data were not provided or the request body did not contain the filename or its value was invalid.


Apierrorexample

Error-Response (Empty request body) HTTP/1.1 400 Bad Request { "code": 400, "status": "error", "message": "Category icon data were not provided." }


Error-Response (Missing parameters) HTTP/1.1 400 Bad Request { "code": 400, "status": "error", "message": "This operation requires a JSON object with 'filename' properties set." }


Apiexample

{json} Request-Body { "filename": "file-to-be-deleted.png" }


Apigroup

Categories

Apiname

DeleteCategoryIcon

Apisuccessexample

{json} Success-Response { "code": 200, "status": "success", "action": "delete", "filename": "file-to-be-deleted.png" }


Apiversion

2.1.0
public
# get( )

Api

{get} /category_icon

Apidescription

Returns a list of all category icon files which exists in the server's filesystem through a GET request.

Apiexample

{curl} Get All Category Icons curl -i --user admin@shop.de:12345 http://shop.de/api.php/v2/category_icon


Apigroup

Categories

Apiname

GetCategoryIcons

Apiversion

2.1.0

Overrides

AbstractImagesApiV2Controller::get

Methods inherited from HttpApiV2Controller

_linkResponse(), _locateResource(), _mapResponse(), _minimizeResponse(), _paginateResponse(), _searchResponse(), _setJsonValue(), _sortResponse(), _writeResponse()

Methods inherited from AbstractApiV2Controller

__construct()

Constants summary

Constants inherited from AbstractApiV2Controller

DEFAULT_CONTROLLER_NAME, DEFAULT_PAGE_ITEMS, DEFAULT_RATE_LIMIT, DEFAULT_RATE_RESET_PERIOD

Properties summary

Properties inherited from AbstractImagesApiV2Controller

$writeService

Properties inherited from AbstractApiV2Controller

$api, $uri

API documentation generated by ApiGen