我正在尝试使用服务帐户通过Google Calendar API插入活动.目标是拥有一个所有用户都可以查看的日历:服务器到服务器的设置.
截至目前,我可以正确调用日历API并列出所述日历上的事件:
var moment = require("moment"),
googleapis = require("googleapis"),
googleCal = googleapis.calendar("v3");
serviceEmail = "********@developer.gserviceaccount.com",
serviceKeyFile = "./key.pem";
var authClient = new googleapis.auth.JWT(
serviceEmail,
serviceKeyFile,
null,
["https://www.googleapis.com/auth/calendar"]
);
authClient.authorize(function (err, tokens) {
if (err) {
console.log(err);
} else {
googleCal.events.list({
auth: authClient,
calendarId: "********@gmail.com",
fields: {
items: ["end","start","summary"]
}
}, function (err, CL) {
if (err) {
console.log(err);
} else {
console.log(CL);
}
});
}
})
Run Code Online (Sandbox Code Playgroud)
这会正确返回一个JSON对象,该对象列出日历上的所有不同对象.但是,当我尝试在googleCal.events.list呼叫的正下方插入事件时:
googleCal.events.insert({
auth: authClient,
calendarId: "primary",
resources: {
start: { …Run Code Online (Sandbox Code Playgroud) javascript google-calendar-api google-api node.js google-api-nodejs-client
我在我的项目中使用google-api-php-client库.我正在使用Composer在我的项目中自动加载库.其他类(即:Google_Client)工作正常.当我去实例化一个对象时,根据Google文档,我收到以下错误:
Fatal error: Class 'Google_DriveFile' not found
Run Code Online (Sandbox Code Playgroud)
这是导致错误的行:
$file = new Google_DriveFile();
Run Code Online (Sandbox Code Playgroud) 我正在尝试在Google Compute引擎上运行Hadoop Job来对抗我们的压缩数据,该数据位于Google云端存储上.在尝试通过SequenceFileInputFormat读取数据时,我得到以下异常:
hadoop@hadoop-m:/home/salikeeno$ hadoop jar ${JAR} ${PROJECT} ${OUTPUT_TABLE}
14/08/21 19:56:00 INFO jaws.JawsApp: Using export bucket 'askbuckerthroughhadoop' as specified in 'mapred.bq.gcs.bucket'
14/08/21 19:56:00 INFO bigquery.BigQueryConfiguration: Using specified project-id 'regal-campaign-641' for output
14/08/21 19:56:00 INFO gcs.GoogleHadoopFileSystemBase: GHFS version: 1.2.8-hadoop1
14/08/21 19:56:01 WARN mapred.JobClient: Use GenericOptionsParser for parsing the arguments. Applications should implement Tool for the same.
14/08/21 19:56:03 INFO input.FileInputFormat: Total input paths to process : 1
14/08/21 19:56:09 INFO mapred.JobClient: Running job: job_201408211943_0002
14/08/21 19:56:10 INFO mapred.JobClient: map 0% reduce …Run Code Online (Sandbox Code Playgroud) google-api google-api-java-client google-compute-engine snappy google-hadoop
我一直在尝试找出如何将收件人自动添加到通过其Ruby库使用Gmail API创建的草稿电子邮件中。我可以毫无问题地创建草稿,但设置收件人会给我造成麻烦,而且我还找不到任何显示添加电子邮件特定内容的最佳方法的良好示例。
使用Google API操场并拉入已经创建的草稿,看起来结构应类似于下面所示,但是一旦创建草稿,便没有收件人。
@result = client.execute(
:api_method => gmail.users.drafts.create,
:parameters => {
'userId' => "me"
},
:body_object => {
'message' => {
'raw' => Base64.urlsafe_encode64('Test Email Message'),
'payload' => {
'headers' =>
[
{
'name' => "To",
'value' => "John Smith <john_smith.fake@gmail.com>"
}
]
}
}
}
)
Run Code Online (Sandbox Code Playgroud) 我正在使用谷歌API来创建图表.我能够创建OHLC(烛台)图表.但我想在其中添加移动平均线的叠加层.任何人都可以指导我如何做到这一点?
提前致谢.
google-api google-visualization moving-average candlestick-chart
我正在尝试从服务器上传视频而无需用户在客户端进行任何手动身份验证.我尝试使用以下代码片段进行视频上传,但它会在浏览器中对用户进行身份验证,并要求接受该应用.
var ResumableUpload = require('node-youtube-resumable-upload');
var googleauth = require('google-auth-cli');
var google = require('googleapis');
var getTokens = function(callback) {
googleauth({
access_type: 'offline',
scope: 'https://www.googleapis.com/auth/youtube.upload' //can do just 'youtube', but 'youtube.upload' is more restrictive
},
{ client_id: CLIENT_ID, //replace with your client_id and _secret
client_secret: CLIENT_SECRET,
port: 3000
},
function(err, authClient, tokens) {
console.log(tokens);
callback(tokens);
});
};
getTokens(function(result) {
tokens = result;
upload();
});
var upload = function() {
var metadata = {snippet: { title: 'title', description: 'Uploaded with ResumableUpload' },
status: …Run Code Online (Sandbox Code Playgroud) youtube google-api youtube-api node.js google-api-nodejs-client
我希望获得针对具有特定YouTube ID的视频的评论和/或喜欢的数量.我使用的是YouTube API v3.0.
我正在搜索API文档,但找不到合适的方法.
我不久前创建了一个Google项目.该应用程序可以在appengine.google.com中找到(我可以像这样运行:[my-app-id] .appspot.com)但是我在https://console.developers.google.com找不到它/ project我甚至尝试通过键入以下URL来访问它:https://console.developers.google.com/project/apps~ [ my-app- id],它只是提供"错误您请求的项目不可用"我没有删除该项目.
如何访问控制台页面.问题是我没有控制台就无法访问项目的权限(OAuth密钥).
有什么建议吗?
google-app-engine google-api google-oauth google-api-console
我想创建一个具有特定州区域的地理地图,以及按值的强度着色的各个都市区域.我查看了文档,但未能实现此目的.以下是我的目标示例.

有没有人知道用什么选项来显示例如CA状态,然后用邮政编码标记区域.
javascript google-maps google-api google-visualization google-analytics-api
2014年11月17日,Google使用Zend Framework弃用了其Google Calendar API的v1和v2.
似乎在公开共享的Google日历上列出公开分享活动的唯一方法是使用OAuth 2.0通过GitHub中的新Google客户端库API
这意味着用于显示公共事件的公共网站的访问者现在必须进行身份验证和登录.
真的吗?没有其他方法可以继续展示公开的Google日历活动吗?
oauth google-calendar-api google-api google-oauth google-api-php-client
google-api ×10
google-oauth ×2
javascript ×2
node.js ×2
youtube-api ×2
.net ×1
c# ×1
gmail ×1
gmail-api ×1
google-maps ×1
oauth ×1
php ×1
ruby ×1
snappy ×1
youtube ×1