Swiftpack.co - gofynd/fdk-client-swift as Swift Package

Swiftpack.co is a collection of thousands of indexed Swift packages. Search packages.
See all packages published by gofynd.
gofynd/fdk-client-swift 1.3.3
Fynd Development Kit(FDK) for Swift 
⭐️ 5
🕓 5 days ago
iOS macOS
.package(url: "https://github.com/gofynd/fdk-client-swift.git", from: "1.3.3")

FDK Swift

FDK client for Swift language

Getting Started

Get started with the Swift Development SDK for Fynd Platform

Usage

  1. Add pod 'FDKClient', :git => 'https://github.com/gofynd/fdk-client-swift'
  2. Do pod install
  3. Add import FDKClient
  4. Start integrating

Sample Usage - PublicClient

let config = PublicConfig()
let publicClient = PublicClient(config: config)
publicClient.webhook.fetchAllWebhookEvents() { (webhookEvents, error) in
    if let webhookEvents = webhookEvents {
        print(webhookEvents.debugDescription)
    } else if let error = error {
        print(error.message)
    }
}

Sample Usage - ApplicationClient

guard let config = ApplicationConfig(
    applicationId: "YOUR_APPLICATION_ID",
    applicationToken: "YOUR_APPLICATION_TOKEN") {
        return
}
let applicationClient = ApplicationClient(config: config)
applicationClient.catalog.getProductDetailBySlug(slug: "product-slug") { (product, error) in
    if let product = product {
        print(product.name)
    } else if let error = error {
        print(error.message)
    }
}

Sample Usage - PlatformClient

guard let config = PlatformConfig(
    companyId: "COMPANY_ID", 
    apiKey: "API_KEY", 
    apiSecret: "API_SECRET") {
        return
}
let platformClient = PlatformClient(config: config)
platformClient.catalog.getCompanyDetail { (response, error) in
    if let companyDetail = response {
        print("Name of the company \(companyDetail.name)")
    } else if let error = error {
        print(error.message)
    }
}

Documentation

GitHub

link
Stars: 5
Last commit: 3 days ago
jonrohan Something's broken? Yell at me @ptrpavlik. Praise and feedback (and money) is also welcome.

Release Notes

v1.3.3
5 days ago

Full Changelog: https://github.com/gofynd/fdk-client-swift/compare/1.3.2...1.3.3

  • Compatible with FP version 1.8.2
  • Check the full API changelog here

Swiftpack is being maintained by Petr Pavlik | @ptrpavlik | @swiftpackco | API | Analytics