SelectelSharp is .net SDK for Selectel Cloud Storage written on C# in Async style. At this moment most of API methods are implemented, but some of them are still in development.
For more information see: Selectel.com
Create client
Everything is starts with SelectelClient initialization:
varclient=newSelectelClient();If you working behind a network Proxy, you should pass proxy parameters to the constructor, something like that:
varclient=newSelectelClient("myproxy.com:8080","domain\\whoami","pa$$w0rd");Authorize it
Almost every method in API needs token to perform I/O operations under your storage. You should call AuthorizeAsync method to obtain it. Pass your client id and storage password to this method.
awaitclient.AuthorizeAsync("userId","userKey");If authorization was successful, client will recieve authrization token. In other case it will throw WebException.
Call API methods
Now you could could Api methods, forexample:
varresult=awaitclient.CreateContainerAsync("new-container");Container methods
- GetContainersListAsync
- GetContainerInfoAsync
- GetContainerFilesAsync
- CreateContainerAsync
- SetContainerMetaAsync
- SetContainerToGalleryAsync
- DeleteContainerAsync
File methods
- GetFileAsync
- UploadFileAsync
- SetFileMetaAsync
- DeleteFileAsync
Archive methods
- UploadArchiveAsync
More methods coming soon...