Skip to content

Commit

Permalink
Multi Story Fetch fixes (#2)
Browse files Browse the repository at this point in the history
  • Loading branch information
LuisLopes94 authored Sep 27, 2022
1 parent 4b30077 commit c302ebb
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 10 deletions.
5 changes: 4 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Storyblok Swift SDK - 0.1.2
# Storyblok Swift SDK - 0.1.5

[![Version](https://img.shields.io/cocoapods/v/RXSStoryblokClient.svg?style=flat)](https://cocoapods.org/pods/RXSStoryblokClient)
[![License](https://img.shields.io/cocoapods/l/RXSStoryblokClient.svg?style=flat)](https://cocoapods.org/pods/RXSStoryblokClient)
Expand All @@ -7,6 +7,9 @@
## TL;DR
This is a Swift SDK/Wrapper around the Storyblok Delivery API and the Storyblok Management API. As of now, only Story fetching, creation and deletion is supported. Additionally there is are Utility and Model classes for resolving RichText Objects from Storyblok (As of now there is only an Implementation for transforming the object to an HTML String)

### Version 0.1.5
* Fixed cocoapods source files path
* Fixed Multi story parameters fix (when searching for slugs or uuids)
### Version 0.1.2
* Added a `SingleStory` struct so it processes correctly single stories.
* Fixed the single story fetch methods so they fetch properly even when no custom `dataConnection` is configured.
Expand Down
6 changes: 3 additions & 3 deletions RXSStoryblokClient.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

Pod::Spec.new do |s|
s.name = 'RXSStoryblokClient'
s.version = '0.1.4'
s.version = '0.1.5'
s.summary = 'A lightweight pure Swift SDK for the Storyblok Content Delivery and Management APIs'

# This description is used to generate tags and improve search results.
Expand All @@ -21,11 +21,11 @@ Pod::Spec.new do |s|
'This is a Swift SDK/Wrapper around the Storyblok Delivery API and the Storyblok Management API. The purpose of this Pod is to make using said APIs easier, quicker and more readable.'
DESC

s.homepage = 'https://github.com/regiolix-solutions/storyblok-swift-sdk'
s.homepage = 'https://github.com/Mindera/storyblok-swift-sdk'
# s.screenshots = 'www.example.com/screenshots_1', 'www.example.com/screenshots_2'
s.license = { :type => 'MIT', :file => 'LICENSE' }
s.author = { 'Medweschek Michael' => '[email protected]' }
s.source = { :git => 'https://github.com/regiolix-solutions/storyblok-swift-sdk.git', :tag => '0.1.4' }
s.source = { :git => 'https://github.com/Mindera/storyblok-swift-sdk.git', :tag => '0.1.5' }
# s.social_media_url = 'https://twitter.com/<TWITTER_USERNAME>'

s.ios.deployment_target = '13.0'
Expand Down
12 changes: 6 additions & 6 deletions Sources/RXSStoryblokClient/Classes/Queries/StoryblokQuery.swift
Original file line number Diff line number Diff line change
Expand Up @@ -47,27 +47,27 @@ public class StoryblokQuery: NSObject{
dynamicDescription.append(contentsOf: "&starts_with=\(startsWith)")
}

if let byUUIDs = byUUIDs {
if let byUUIDs = byUUIDs?.map({String($0.uuidString.lowercased())}).joined(separator: ",") {
dynamicDescription.append(contentsOf: "&by_uuids=\(byUUIDs)")
}

if let bySlugs = bySlugs {
if let bySlugs = bySlugs?.joined(separator: ",") {
dynamicDescription.append(contentsOf: "&by_slugs=\(bySlugs)")
}

if let excludingSlugs = excludingSlugs {
if let excludingSlugs = excludingSlugs?.joined(separator: ",") {
dynamicDescription.append(contentsOf: "&excluding_slugs=\(excludingSlugs)")
}

if let byUUIDsOrdered = byUUIDsOrdered {
if let byUUIDsOrdered = byUUIDsOrdered?.map({String($0.uuidString.lowercased())}).joined(separator: ",") {
dynamicDescription.append(contentsOf: "&by_uuids_ordered=\(byUUIDsOrdered)")
}

if let excludingIds = excludingIds {
if let excludingIds = excludingIds?.map({String($0)}).joined(separator: ",") {
dynamicDescription.append(contentsOf: "&excluding_ids=\(excludingIds)")
}

if let excludingFields = excludingFields {
if let excludingFields = excludingFields?.joined(separator: ",") {
dynamicDescription.append(contentsOf: "&excluding_fields=\(excludingFields)")
}

Expand Down

0 comments on commit c302ebb

Please sign in to comment.