storyblok / storyblok-php-client

Storyblok - PHP Client
https://www.storyblok.com
MIT License
34 stars 37 forks source link

fix: set from_release parameter in getStories if release is set for client #93

Closed hoersamu closed 1 year ago

hoersamu commented 1 year ago

Pull request type

How to test this PR

Create a release and copy the ID. Execute the Code below:

$client = new Client('API key');
$client->setRelease('Release id');
$options = [
  // Slug of a page with changed content in the release
  'by_slugs' => 'slug'
];
$client->getStories($options);

What is the new behavior?

When fetching data from Storyblok using the getStories function the release string set for the client is now respected.

Other information

Fixes #92

roberto-butti commented 1 year ago

First of all, thank you, @hoersamu, for this PR. Really appreciated. 🥳

@joaokamun and @ademarCardoso , from my point of view, we can merge this PR. I think it was better to add the unit tests, but I can take the opportunity to check all the other parameters are fine, and eventually, i will open a new PR with all the checks.