GithubHelp home page GithubHelp logo

tencentcloud-ios-master's Introduction

tencentcloud-ios

api3.0-v3-ios 使用方法:直接将两个文件拖到项目,在需要使用的地方引入头文件,只需要setConfig一次

示例如下:

#import "TencentCloudAPI3.h"
// 以下内容,需要从云api中获取
// 1、初始化,只需要初始化一次
NSString *SECRET_ID = @"<替换为你的id>";
NSString *SECRET_KEY = @"<替换为你的key>";
NSString *HOST = @"xx.tencentcloudapi.com";
NSString *SERVICE = @"xx";
NSString *VERSION = @"2018-04-08";
[[TencentCloudAPI3 TC] setConfig:@{
  @"SECRET_ID": SECRET_ID,
  @"SECRET_KEY": SECRET_KEY,
  @"HOST": HOST,
  @"SERVICE": SERVICE,
  @"VERSION": VERSION
}];
 // 2、构造数据
 NSDictionary *getTokenParams = @{
   @"action": @"xxxxx", // action是接口的Action
   @"data": @{ // data里面是真正的数据
     @"Bid": @1,
     @"Scene": @2
   }
 };
   
// 3、获取token示例
[[TencentCloudAPI3 TC] getResult:getTokenParams success:^(NSDictionary *responseObject){
  NSLog(@"responseObject");
  NSLog(@"%@", responseObject);
} failure:^(NSError *error){
  NSLog(@"error");
  NSLog(@"%@", error.localizedDescription);
}];

tencentcloud-ios-master's People

Contributors

xiaolong-jiang avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.