Skip to content

Commit 1c68060

Browse files
committed
Add getSynopsisSchema() method
Also deprecate shema() method
1 parent 17c1d42 commit 1c68060

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

src/PrestaShopWebserviceExtra.php

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,24 @@ public function getBlankSchema(string $resource): self
126126
return $this;
127127
}
128128

129+
/**
130+
* Get the synopsis shema of a resource
131+
*
132+
* @param string $resource Name of the resource synopsis shema to get
133+
* @return self
134+
*/
135+
public function getSynopsisSchema(string $resource): self
136+
{
137+
$this->initQuery();
138+
$this->setAction('get');
139+
$this->addOption(
140+
'url',
141+
$this->url . '/api/' . $resource . '?schema=synopsis'
142+
);
143+
144+
return $this;
145+
}
146+
129147
/**
130148
* Use the "add" action for the current request
131149
*
@@ -492,6 +510,8 @@ public function idGroupShop(int $idGroupShop): self
492510
*
493511
* @param string $schema kind of shema
494512
* @return self
513+
*
514+
* @deprecated You should use `getSynopsisSchema()` or `getBlankSchema()` instead
495515
*/
496516
public function schema(string $schema): self
497517
{

0 commit comments

Comments
 (0)