iOS-MS-Client 2.0.86

iOS-MS-Client 2.0.86

iOS-MS-Client 维护。



 
依赖于
SwiftyJSON~> 3.1.4
Alamofire~> 4.6.0
 

  • Nazar Gorobets

SphereMallGateway iOS SDK

官方 iOS SDK,用于与 SphereMall 产品 集成。 官方文档

版本 2.0.86

支持的微服务

  • 网关 1.1.1
  • 产品 1.1.0
  • 商店 1.0.1
  • 用户 1.0.0
  • 图形界面 1.0.0

安装

您可以通过手动安装或将它添加到 Podfile 中来安装此软件包。

pod 'iOS-MS-Client'

实例化 SDK 客户端

将配置传递给客户端

    var client = SMClient(gatewayUrl: "API_GATEWAY_URL",
                          clientId: "API_CLIENT_ID",
                          secretKey: "API_SECRET_KEY")
                          
    // Get all entity items
    client.products.all { (products, error) in
        print(products)
    }
    
    // Get entity items by predicate
    let predicate = Predicate(field: "title", op: .equal, value: "Name of product")
    client.products.filter(predicate:predicate).all { (products, error) in
        print(products)
    }