Skip to content

Instantly share code, notes, and snippets.

'use strict';
function getInstance(consumer_key, consumer_secret) {
return new TwitterWebService_(consumer_key, consumer_secret);
}
var TwitterWebService_ = function (consumer_key, consumer_secret) {
this.consumer_key = consumer_key;
this.consumer_secret = consumer_secret;
}
@supersupermomonga
supersupermomonga / HatenaBlog.gs
Created October 12, 2015 06:20
My7DzK_6fJTPmyz1FbJKEpMLo7O4tWOsV
'use strict';
function getInstance(service, hatenaId, blogId) {
return new HatenaBlog_(service, hatenaId, blogId);
}
var HatenaBlog_ = (function() {
var validates = {
entryId: function(value) {
if (value == null) throw new Error('Missing required parameter');
@supersupermomonga
supersupermomonga / HatenaBookmark.gs
Created October 12, 2015 02:14
MYkfPTbIKGEDQ4CBIBKtjfMLo7O4tWOsV
'use strict';
function getInstance(service) {
return new HatenaBookmark_(service);
}
var HatenaBookmark_ = (function() {
var root = 'http://api.b.hatena.ne.jp';
var validates = {
url: function(value) {
@supersupermomonga
supersupermomonga / HatenaWebService.gs
Created October 12, 2015 02:13
M2L32TH_TklmEvt57DzRR-sLo7O4tWOsV
'use strict';
function getInstance(consumer_key, consumer_secret, scope) {
return new HatenaWebService_(consumer_key, consumer_secret, scope);
}
var HatenaWebService_ = function (consumer_key, consumer_secret, scope) {
this.consumer_key = consumer_key;
this.consumer_secret = consumer_secret;
this.scope = scope;
'use strict';
function getInstance(consumer_key, consumer_secret, scope) {
return new HatenaBookmark_(consumer_key, consumer_secret, scope);
}
var HatenaBookmark_ = (function() {
var root = 'http://api.b.hatena.ne.jp';
var validates = {
url: function(value) {
<script>
var factory = {
video: function() {
var setQuery = function (q) {
this.q = q;
}
var setToken = function (results) {
this.token = results.nextPageToken;
}
var setResults = function (results) {
<script src='//ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js'></script>
<script src='//maxcdn.bootstrapcdn.com/bootstrap/3.3.5/js/bootstrap.min.js'></script>
<script src='//cdnjs.cloudflare.com/ajax/libs/marked/0.3.5/marked.js'></script>
<script>
marked.setOptions({
renderer: new marked.Renderer(),
gfm: true,
tables: true,
breaks: false,
pedantic: false,
/*
* Feedly library for Google Apps Script
* @author Yoshiyuki Hirano <[email protected]>
*
*/
/* constructs an Feedly service
*
* @constructor
* @param {string} url
/**
* Observe MailBox
*
* @param {string} condition メール検索条件(require)
* @param {function} onSuccess 条件合致時のコールバック(optional)
* @param {function} onFailure 例外発生時のコールバック(optional)
**/
function observe(condition, onSuccess, onFailure) {
try {
var observer = new GmailObserver(condition),
/*
* DejizoJp - library to get a description from デ辞蔵Webサービス for Apps Script
* author: yoshiyuki hirano
*
* @doc http://dejizo.jp/dev/rest.html
*/
/**
* Get description by EJDict英和辞典 in Japanese from English
*