Skip to content

qingstor-incubating/qingstor-sdk-swift

Repository files navigation

QingStor SDK for Swift

Build Status CocoaPods Compatible API Reference License

The official QingStor SDK for the Swift programming language.

The SDK documents can be found here.

Getting Started

Swift versions support

Below is a table that shows which version of QingCloudSDK you should use for your Swift version.

Swift Version QingCloudSDK Version
3.x <= 2.4.0
4.x >= 2.4.1

Installation

Refer to the Installation Guide, and have this SDK installed.

Preparation

Before your start, please go to QingCloud Console to create a pair of QingCloud API AccessKey.

API AccessKey Example:

access_key_id: 'ACCESS_KEY_ID_EXAMPLE'
secret_access_key: 'SECRET_ACCESS_KEY_EXAMPLE'

Usage

Now you are ready to code. You can read the detailed guides in the list below to have a clear understanding or just take the quick start code example.

Checkout our releases and change log for information about the latest features, bug fixes and new ideas.

Quick Start Code Example:

import QingStorSDK

func main() {
    Registry.register(accessKeyID: "ACCESS_KEY_ID", secretAccessKey: "SECRET_ACCESS_KEY")
    let qsService = QingStor()
    qsService.listBuckets(input: ListBucketsInput()) { response, error in
        // Print HTTP status code.
        print("\(response?.statusCode)")
        
        // Print the count of buckets.
        print("\(response?.output.count)")
        
        // Print the first bucket name.
        print("\(response?.output.buckets?[0].name)")
    }
}

Demos

Reference Documentations

Contributing

  1. Fork it ( https://github.com/yunify/qingstor-sdk-swift/fork )
  2. Create your feature branch (git checkout -b new-feature)
  3. Commit your changes (git commit -asm 'Add some feature')
  4. Push to the branch (git push origin new-feature)
  5. Create a new Pull Request

LICENSE

The Apache License (Version 2.0, January 2004).

About

The official QingCloud SDK for the Swift programming language.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages