the official QingStor SDK for the Scala programing language
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:
package demo
import com.qingstor.sdk.config.QSConfig
import com.qingstor.sdk.service.QingStor
import scala.concurrent.Await
import scala.concurrent.duration.Duration
object Demo extends App {
val config = QSConfig("ACCESS_KEY_ID", "SECRET_ACCESS_KEY")
// Initialize service object for QingStor.
val qsService = QingStor(config)
// List all buckets.
val outputFuture = qsService.listBuckets(QingStor.ListBucketsInput())
val listBucketsOutput = Await.result(outputFuture, Duration.Inf)
// Print HTTP status code.
println(listBucketsOutput.statusCode.getOrElse(-1))
// Print the count of buckets.
println(listBucketsOutput.count.getOrElse(-1))
// Print the first bucket name.
println(listBucketsOutput.buckets.flatMap(_.head.name).getOrElse("No buckets"))
System.exit(0)
}
- Fork it ( https://github.com/yunify/qingstor-sdk-scala/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).
This project was originally developed by Cheerx as a third-party QingStor SDK for Scala. Later on, it was accepted to be the official QingStor SDK for Scala by QingStor team. It will be maintained by both QingStor team and Cheerx.