Skip to content

Repository files navigation

QcloudSharp: Unoffical Qcloud.com API wrapper for .Net

AppVeyorGitHub licenseNuGetNuGetnetstandard1.6netstandard2.0netstandard2.1

中文说明

Installation

To install QcloudSharp, run the following command in the Package Manager Console

PM>Install-Package QcloudSharp

Example

usingQcloudSharp;usingNewtonsoft.Json;dynamicclient=newQcloudClient{SecretId="Your_Secret_Id",SecretKey="Your_Secret_Key",Endpoint=Constants.Endpoint.Trade,// Endpoint can be used as the first argument of Dynamic MethodsRegion=Constants.Region.CAN,// Region can be used as the first or second argument of Dynamic Methods};varresultString=client.DescribeUserInfo();// e.g. {"code":0,"message": "","userInfo":{"name":"compName","isOwner":1,"mailStatus":1,"mail":"112233@qq.com","phone":"13811112222"}}dynamicresult=JsonConvert.DeserializeObject<ApiResult>(resultString);try{Console.WriteLine(result.Code);Console.WriteLine(result.userInfo.name);Console.WriteLine(result.notExist);}catch(Exceptionex){Console.WriteLine(ex.message);}

Or you can have a look at sample.

Constants

All Constants are provided by class QcloudSharp.Constants.

publicstaticclass Endpoint // Abbreviation for endpoint domain

Members

  • Account
  • Batch
  • Bgpip
  • Bill
  • Bm
  • Bmeip
  • Bmlb
  • Bmvpc
  • Cbs
  • Cdb
  • Cdn
  • Cmem
  • CmqQueue
  • CmqTopic
  • Cns
  • Csec
  • Cvm
  • Dayu
  • Dfw
  • Eip
  • Image
  • Iot
  • Kms
  • Lb
  • Live
  • Market
  • Mongodb
  • Monitor
  • Partners
  • Redis
  • Scaling
  • Snapshot
  • Sqlserver
  • Tdsql
  • Tmt
  • Trade
  • Vod
  • Vod2
  • Vpc
  • Wenzhi
  • Wss
  • Yunsou
publicstaticclass Region // IATA code for Region city

Members

  • BJS bj
  • CAN gz
  • CAN1 gzopen
  • CKG cq
  • CTU cd
  • FRA de
  • HKG hk
  • SEL kr
  • SHA sh
  • SHA2 shjr
  • SIN sg
  • SJC usw
  • SZX2 szjr
  • YTO ca

Classes

QcloudClient

publicclassQcloudClient:DynamicObject

Constructors

  • QcloudClient()
  • QcloudClient(SecretId, SecretKey)

Properties

  • string SecretId
  • string SecretKey
  • string Region
  • string Endpoint

Methods

  • void AddParameter(KeyValuePair<string, string>)
  • void AddParameter(IEnumerable<KeyValuePair<string, string>>)
  • void ClearParameter()
  • Submit(string, string, string)
  • Submit(string, string)
  • Submit(string)

Dynamic Methods

  • {Action}([string][, string][, IEnumerable<KeyValuePair<string, string>>])
  • {Action}([string][, string][, KeyValuePair<string, string> ...])

ApiResult

publicclassApiResult:DynamicObject

Constructors

  • ApiResult()

Properties

  • int Code
  • string Message

Dynamic Properties

  • object Any { Get; Set; }

License

The MIT License

More info see LICENSE

About

Unoffical Qcloud.com API wrapper for .Net

Topics

Resources

Stars

11 stars

Watchers

5 watching

Forks

Releases

Packages

Used by

Contributors

Languages