The official QingStor SDK for the Swift programming language.
The SDK documents can be found here.
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 |
Refer to the Installation Guide, and have this SDK installed.
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'
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)")
}
}
- Fork it ( https://github.com/yunify/qingstor-sdk-swift/fork )
- Create your feature branch (git checkout -b new-feature)
- Commit your changes (git commit -asm 'Add some feature')
- Push to the branch (git push origin new-feature)
- Create a new Pull Request
The Apache License (Version 2.0, January 2004).