字幕组成品列表(Beta)
  • 写在前面
  • Android 平台
    • Game On! 游戏开发系列 - 031
      • Pie Noon - 1503060393
      • The Death of Base Game Activity - 1504030543
      • Surviving OpenGL Context Loss - 1504030546
      • WebP for Game Devs - 1504030547
      • Saved Games In-Depth (Part 1) - 1504070556
      • Saved Games In-Depth (Part 2) - 1504030548
      • Smaller Flipbook Textures with CRABBY - 1504030544
      • Google Tag Manager - 1504030545
      • Flatbuffers - 1505050794
      • Achievement Point Pointers - 1505050796
      • Frequency Scaling - 1505050797
      • Meet the Management APIs - 1501140367
      • Y U Ship Broken Games - 1505050795
    • Android 性能优化 - 088
      • Garbage Collection in Android - 1503170425
      • Performance Cost of Memory Leaks - 1503170424
      • Rendering Performance 101 - 1501130351
      • Understanding Overdraw - 1501130352
      • Understanding VSYNC - 1501130353
      • Tool - Profile GPU Rendering - 1501130354
      • Why 60fps? - 1501130355
      • Android UI and the GPU - 1501130356
      • Invalidations, Layouts, and Performance - 1501130357
      • Overdraw, Cliprect, QuickReject - 1501130358
      • Tool - Memory Monitor - 1501130363
      • Battery Performance 101 - 1501130364
      • Understanding Battery Drain on Android - 1501130365
      • Battery Drain and WakeLocks - 1501130366
      • Memory Performance 101 - 1504170661
    • I/O 2014 Android 开发专题 - 089
      • Activity Transitions - 1504020505
      • Building Apps For Android TV - 1504020520
      • Building great Android media experiences - 1504020510
      • Building a quality app from start to finish - 1504020515
      • App Indexing API - 1504020507
      • What's new in WebView - 1504010484
      • Bluetooth Low Energy - 1504010486
      • Building impressive Android media experiences - 1504010493
      • The next Generation of Authentication - 1504020497
      • Don't Alpha That Pixel! - 1504020523
      • NFC + HCE Your phone in an interactive world - 1504020509
      • Demystifying encodes and decodes of WebM - 1504020521
      • Google Cloud Messaging - 1504020524
      • Getting your Game on the Big Screen - 1504020518
      • I hear you like realtime memes - 1504020511
      • Offerize your App - 1504020506
      • Using the Android Job Scheduler - 1504020504
      • From Holo to Material - 1504020526
      • Under the Hood of Android Auto - 1504020501
      • Isolation for Android App Developers - 1504020498
      • Android Work - 1504010496
      • ExoPlayer: Adaptive video streaming on Android - 1504010489
      • Sample rates and resampling: Why can't we all just agree? - 1504010488
      • Drive Android API - 1504010485
    • Android Studio - 004
      • Layout Editor (Ep 3, Android Studio) - 1503290479
      • Introducing Gradle (Ep 2, Android Studio) - 1503170426
    • I/O 2014 Android 分发主题 - 091
      • Introduction to Google Play - 1504030534
      • Google Play: building your user community - 1504030535
      • Optimizing Apps for Education - 1504030536
      • Succeeding in Education Technology - 1504030530
      • Subscriptions Made Easy with Google Play - 1504030531
      • The world is your playground - go global with Google - 1504030533
      • Maximizing discoverability on Google Play - 1504030538
    • Android Auto - 003
      • Introduction to Android Auto - 1504130615
      • Android Auto Messaging - 1504130617
      • Android Auto Audio - 1504130616
    • Android Wear - 006
      • Designing for Android Wear - 1503210448
      • How We Customized Google Apps for Android Wear - 1503210450
      • Fullscreen apps for Android Wear - 1503210445
      • New Notification Features for Android Wear - 1503210446
      • Building Cloud-powered wearable Apps - 1503210449
      • An Introduction to Android Wear - 1503190435
      • Google I/O 2014 - Android Wear: The developer's perspective - 1503210442
      • Devoxx 2014 Interviews: Android Wear - 1503210440
      • DevBytes: Watch Faces for Android Wear - 1503210439
    • Android TV - 005
      • Using the Leanback library - 1504080588
      • Beach Buggy Racing Multiplayer with Nearby Connections (Play Services) - 1503060387
    • Android for Work - 106
      • Android for Work for Developers - 1503060390
      • App Configurations, Testing and Launchers - 1504110590
    • IO Bytes 2014 - Android - 066
      • Chrome Apps on Android and iOS - 1501080014
      • Perf Primer CPU, GPU and your Android game - 1501080017
  • Chrome 平台
    • IO Bytes 2014 - Chrome and Web - 067
      • Using the PageSpeed API - 1505070815
      • Fabulous Forms for the multi-device web - 1505070816
      • Testing multi-screen web pages - 1505070817
      • Responsive images today - 1505070819
      • Web Performance Testing at YouTube - 1505070828
      • Building sites for the multi-device web - 1505070820
      • Deep dive: Google Cloud Messaging for Chrome - 1505070827
  • Google 创业者资源
    • Coffee with a Googler - 012
      • Chat with Allen Huang of AndroidTV - 1503040384
      • Chat with Fred Chung about developer advocacy - 1503070395
      • Google Fit platform with Michelle Haq - 1503210443
      • Android Auto Product Manager Andrew Brenner - 1501120027
      • Chat with Francis Ma about Google Play services - 1501120028
    • Root Access For Startups - 077
      • What we learned building plug-ins for Android, with startup Magnet - 1503230453
      • How to use crowdfunding to your advantage, with startup Hale Devices - 1503280462
      • How to overcome customer objections when selling tech, with startup Guesswork - 1503280458
    • First Things First - 029
      • Getting started with Android: A crash-course in developing for Android - 1504120601
      • How to ask a question: conducting research for your startup - 1504120603
      • MVP Design Hacks: transform your hot idea into a validated prototype - 1504120602
      • Build something people want: Solving real problems - 1504120605
    • How I - 061
      • Use BigQuery to find my most valuable customers - 1504070573
      • Manage beta testing communities using Google Play - 1504070572
      • Use paper wireframing to build native prototypes - 1504070570
      • Used social media and $0 marketing to get 68 million users - 1504070568
      • Prep to fundraise with four questions - 1504070564
      • Validated my idea in 2 days (with no code) - 1504070562
      • Build open platforms on Android - 1504120596
      • Get cheap, automatic analytics for my business using BigQuery - 1504070571
      • Write press releases to get international media coverage - 1504070569
      • Test beta-product features using Google Apps - 1504070563
      • Use URL builder to measure ROI on social media - 1504070561
      • Use events to build DeadSocial's brand - 1504070557
      • Use BigQuery to visualize streaming data - 1503220452
      • Find, screen, and hire developers - 1503120406
      • Drive engagement with social challenges - 1504070558
  • 设计
    • DesignBytes - 017
      • Paper and Ink: The Materials that Matter - 1505050793
  • 云计算
    • DevBytes: Google Cloud Platform - 021
      • Powering the next killer app with the Google Cloud Platform - 1504210672
      • Introduction to Google Cloud Endpoints - 1504210675
      • The Beauty of Scale with Google Cloud Platform - 1504210678
    • Google Cloud Platform - Big Data - 105
      • GDELT & BigQuery: Understand the world - 1502200379
    • Uncategorized - 999
      • Introducing Google Cloud Platform Resources - 1501190370
  • Google 应用开发
    • Launchpad Online - 072
      • The Setup: Creating new apps using Google APIs - 1503190428
      • Listing your files in Google Drive - 1503190429
      • Customizing Google Analytics for your startup - 1503290473
      • The Launchpad Online series - 1503190427
      • Getting started with Google Analytics - 1503290472
      • Accessing Google Maps from a spreadsheet?!? - 1502220381
      • Change the world in 10 lines of code - 1503080398
    • Google Play Services - 054
      • Google Play services 6.1 - 1503290481
      • Google Play Services 7.0 - 1503200437
      • Google Play Services 6.5 - 1501080015
    • 谷歌地图 iOS SDK - 053
      • Maps Live: New Features in the Google Maps Mobile APIs for Android and iOS - 1504300777
    • Google 移动搜索开发 - 055
      • Is your app in the Google index? - 1504120598
      • Get more engaged users with Google Search for Developers - 1503070397
    • DevBytes: Google Cast - 020
      • Google Cast SDK for Android - 1504180666
      • Media Router Framework - Part 1 - Media Router API - 1504180667
      • Overview for Google Cast Receivers - 1504180664
      • Google Cast SDK for iOS - 1504180663
    • Getting Started with the Google Maps SDK for iOS - 035
      • Getting started with the Google Maps SDK for iOS, Part 1 - 1504270757
    • IO Bytes 2014 - Wearables - 070
      • Voice Driven GDK Glassware - 1505280836
    • Route 85 - 078
      • Introducing Route 85 - 1501120022
      • Quick Tip: Don't Default that Switch! - 1501190371
      • OpenInChrome on iOS, Part 1 - 1501120023
      • OpenInChrome on iOS, Part 2 - 1501120024
      • OpenInChrome on iOS, Part 3 - 1501120025
      • OpenInChrome on iOS, Part 4 - 1501120026
    • DevBytes 2014 - 019
      • Web Components - Template - 1505040789
      • Wearable DataLayer API - 1505050792
      • Using srcset for responsive images - 1505050790
      • The picture element for art direction - 1505050791
    • Uncategorized - 999
      • Sun Surveyor brings augmented reality to photographers using Google Maps APIs - 1504200668
      • Snappy travels with the Roads API - 1503060392
      • Easy Maps Apps in Java and Python - 1501140030
  • Google 广告平台
  • Polymer
    • Polycasts - 076
      • The Awesome Power of Auto-Binding Templates -- Polycasts #08 - 1502220382
      • Content Switcheroo with Core-Pages -- Polycasts #09 - 1502200380
      • Core Iconset -- Polycasts #02 - 1505040788
  • Web 平台
    • HTTP 203 - 062
      • Gotchas - 1501140368
      • Font Rendering - 1501080016
    • Web Components - 081
      • DevBytes: Web Components - Overview - 1504250709
  • 宣传视频
    • Uncategorized - 999
      • Google Developers - 1501150369
      • I/O Extended 2014 - Join me - 1502220383
  • Google 各类开发者会议
    • 2014 Chrome 开发者高峰会议 - 009
      • Keynote - Chrome Dev Summit 2014 (Darin Fisher) - 1503120407
      • TLS All the Things! - Security with Performance(Chris Palmer) - 1503140412
      • Let’s build some apps with Polymer!(Rob Dodson) - 1503150415
      • Day One Closing Remarks(Sundar Pichai) - 1503150417
      • Chrome Leadership panel - 1503160422
      • Fundamentals of Mobile Web Development(Matt Gaunt) - 1503150416
    • 2015 游戏开发者大会中 - 039
      • FlatBuffers - 1504150640
      • Games for Google Cast - 1504150637
      • Top 10 Things Android Game Developers Should Know v 3.0 - 1504150643
      • Automate Publishing for Google Play APIs - 1504150639
      • 3 Game Design Mistakes You're Making - 1504150636
      • Android TV - 1504150638
      • How to Go Viral Without Really Trying - 1504150641
    • Devoxx 2014 Interviews - 024
      • What's new in Android 5.0 Lollipop - 1504260740
      • Android Tools - 1504260743
      • BigQuery and user-defined functions - 1504260744
    • IO Bytes 2014 - 065
      • Dart in Google Cloud - 1505070810
      • Big genomic data on Google Cloud Platform - 1505070811
      • Easy International Checkout with Chrome - 1505070802
      • Google developer tools and APIs for iOS - 1503190436
      • Whet your appetite with IO Bytes - 1501080021
    • PlayTime@Shanghai - 095
      • 主题演讲 Chris Yerga - 1504060549
      • 如何成功地开发你的应用 Ellie Powers - 1504060550
      • 在Google上营利 Brahim Elbouchikhi - 1504060551
      • Playtime Shanghai event sizzle reel - 1504070552
    • Project Google I/O 2015 - 098
      • Project Tango Mobile 3D tracking and perception - 1506120857
      • Democratizing Education - 1506120868
      • Improve your Android app’s accessibility - 1506120864
      • Google Cloud Messaging 3.0 - 1506120844
      • Developers connecting the world through Google Play - 1506120862
  • 开源开放技术
    • Compressor Head - 013
      • The Trailer, Season 2 - 1503060385
      • Behind the Scenes - 1503210441
      • Arithmetic Compression (Ep 5, Compressor Head) Google - 1503070394
      • Introducing Compressor Head - 1502120372
      • Episode 1 (Variable Length Codes) - 1502120373
      • Episode 2 (The LZ77 Compression Family) - 1502120374
      • Episode 3 (Markov Chain Compression) - 1502120375
Powered by GitBook
On this page
  • 译者信息
  • 解说词中文版:

Was this helpful?

  1. Google 应用开发
  2. Launchpad Online - 072

The Setup: Creating new apps using Google APIs - 1503190428

PreviousLaunchpad Online - 072NextListing your files in Google Drive - 1503190429

Last updated 5 years ago

Was this helpful?

视频发布时间

2014年11年13日

视频介绍

For developers new to Google APIs, this episode shows you how to setup a new app ("project") in the Google Developers Console and how to obtain the credentials necessary to use our APIs with.

视频推介语

暂无,待补充。

译者信息

翻译

润稿

终审

原始链接

中文字幕

翻译流水号

加入字幕组

高冰

虞高

——

1503190428

解说词中文版:

大家好 我是Wesley Chun

Google工程师兼布道师

如果你想在你的app里加入Google提供的技术支持

从本集视频看起是再好不过的了

在本视频里 我们会讲到在开发程序时

调用Google API的详细步骤

首先 Google Developer Tools到底是什么呢

在上一集中

噢 要是你还没看过可以点击左上角的视频链接

在上一集中 谈到了大家对Google搜索或者Youtube相关工具的使用已经再熟悉不过了

但是你能想象自己去创建一套

Google地图或者Google云端硬盘吗

我们当然做不出来

但你可以通过使用我们提供好的API

和我们的开源开发者工具为自己所用

这样就没有必要再重复造轮子了

那我现在就向大家展示一下这个入门是有多轻松

你将会学到怎样在开发者控制台(英文Developer Console 也叫DevConsole)

上面创建一个项目 怎样让API能够为你所用

最后 你将会学到

怎样获得调用Google API的凭证

不论你是想获取授权的数据还是调用一个简单

的API key来访问公共数据 我们都会涉及到

在接下来的几集视频中

我会写一个Pyhton脚本程序 并让它能够获得调用Google API的凭证

这个示例代码适用于所有的程序

调用多少API都是一个道理 所用语言的不同也不会造成什么影响

另外 如果你不读取需要授权才能访问的数据

请求代码会更少

你的代码在任何场合下都可以获得Google服务

不论是在网页还是手机应用中

或者是在云端服务器中都是没问题的

因为在这些平台上获取的方式都极其的类似

全部的工作就是在浏览器的后台中部署好即可

让我们在电脑上实际操作一下吧

那好 我要开始了

如果想让你的程序能够调用Google API

或者使用到Google的云服务 你必须时要先登录开发者控制台

才可以

打开浏览器 输入console.developers.google.com

如果之前没有登录就要先输入账号和密码

如果你还没有Google账户

那就点击登录框下面创建账户的链接

新建一个Google账户吧

登录成功之后

就会进入了控制台的主页

上面展示了你创建过的所有工程

如果你还没有创建项目 别担心

这些空白很快就会被填上

要想去填补这些空白 我们需要做三件事

第一 创建一个新项目

第二 开启你的项目中所要用到的API

第三 创建并下载相应的凭证

首先让我们点击这个蓝色的按钮Create Project

来创建一个新项目

你需要输入两条信息

一个是项目名称 该名称只在你的控制台内有效

如果你不喜欢现在起的名字 以后随时都可以进行更改

另外一个是你要为你的项目创建项目ID

该ID是你项目的唯一标识

能够和系统中所有的其他项目区分开

正因如此 这个ID一经创建就就不能再变

所以现在就起一个好点的名字吧

为了方便起见 Google会自动生成一个随机ID

可以看到我这里就随机生成了一个

如果你不喜欢 可以自己输入一个还未被使用过的ID

或者点击这里的刷新按钮

Google就会再随机生成一个新的ID

确认信息无误后 点击Create按钮

Google数据中心就会精雕细琢

为你开辟出一个全新的项目

这个过程大约会花费半分钟左右的时间

项目创建之后 页面会跳转到

新项目的控制面板

现在就暂停视频去动手创建一个自己的项目吧

当项目创建成功并看到了控制面板页

继续回来观看也为时不晚

好啦 我们的项目已经成功创建了

现在我们在Overview选项打开的页面中

本着大道至简的原则 我们的项目只有一个侧边栏

对于移动端或者云服务程序项目

同样也会有这样的一个界面

那我就继续向下展示了

接下来 让我们来开启API

是的 就是点击控制面板里的这个Enable an API按钮

页面会跳转到API服务页面

在这你可以开启你要用到的API

可以看到一些Google云服务的功能已经

默认开启

如果你对使用这些服务不感兴趣

在右边的开关可以随时进行关闭

现在就让我们来找一找我们想要开启的API吧

比如 你想调用Google云端硬盘的API

向下拖到相应位置 点击打开开关即可

在这呢

再比如 如果想调用YouTube data API

再将页面向下拖动 找到相对应的API选项

采取同样的操作即可打开它

选好你要调用的API之后

重新回到页面顶部

确保它们都已经打开了 就像这样

接下来让我们来创建自己的凭证

点击一下左侧的链接

在这个页面上 由OAuth开放授权和公共API 存取这两部分组成

这两部分我都会去创建

对于Google云端硬盘 你应该要知道

云端硬盘里的文件和文件夹就是你的用户数据

也就是说你的程序需要被授权

才可以访问这些数据

点击Create New Client ID按钮

会弹出来一个对话框 你需要确认程序的类型

既然我们是要编写一个简单的脚本程序

它不是网页端程序(通过浏览器存取数据)

后台也不需要自动调用Google服务 如果需要调用的话就选择Service Account选项

我们的程序属于已安装的应用程序 那就选中这个选项吧

既然不是网页程序和已安装好的手机应用

只是一段脚本程序

那我们就选择Other吧

点击Create Client ID来创建你的OAuth凭证

最后一步 点击这里的Download JSON按钮

点击之后会下载凭证

它能使程序在调用Google服务时获得授权

我建议将此文件下载到

程序所存放的文件夹下

就像我做的这样

这一部分就做完了

再回到我们凭证页面

来看第二部分

可以看到这里的意思是创建一个简单的公共API存取

也就是说会创建一个API key

在进行一些只读操作时会用到它

例如在搜索YouTube视频时

在这种情况下 有一个API key就足够了

这里用不到授权

点击Create New Key按钮

跟刚才一样 我们的代码是几行脚本

不是网页程序和手机应用

所以严格来讲 这属于服务器程序 所以我们选第一个

这里可以设定允许使用的IP段

如果想跳过此步 点击Create

嗖的一下 API key就出现了

API key是一个字符串 可以直接复制它

粘贴到你的代码里 拿它做测试也是信手拈来

显而易见的是 这种方式实际上并不安全

如果你打算将此方法应用于正式产品的开发中

一定要确保该API key被放到了牢靠的数据库中

或者非明文的地方

不管怎样 你现在已经有授权过的公共API key了

视频中说列的任务已经全部完成了

剩下的工作就要靠你自己了

好啦 现在你已经拥有自己的项目了

可以开始编写代码了

在下一集里 我会跟你一起看一看

调用Google API时常用的安全措施

那今天就到这里吧

记得观看下集时把你的代码也带过来

我是Google的Wesley Chun

下期在线Launchpad 我们再见

Youtube
Youtube
加入 GDG 字幕组
video_screenshot