SlideShare une entreprise Scribd logo
1  sur  32
Télécharger pour lire hors ligne
Desenvolvendo Aplicativos
Sociais com Rails 3
Carlos Brando
quarta-feira, 27 de outubro de 2010
quarta-feira, 27 de outubro de 2010
<?xml version="1.0" encoding="UTF-8" ?>
<Module>
 <ModulePrefs title="Standard gadget structure">
  <Require feature="opensocial-0.8"/>
 </ModulePrefs>
 <Content type="html">
 <![CDATA[
      Hello, RubyConf!
 ]]>
 </Content>
</Module>
quarta-feira, 27 de outubro de 2010
<?xml version="1.0" encoding="UTF-8" ?>
<Module>
 <ModulePrefs title="Standard gadget structure">
  <Require feature="opensocial-0.8"/>
 </ModulePrefs>
 <Content type="html">
 <![CDATA[
      Hello, RubyConf!
 ]]>
 </Content>
</Module>
quarta-feira, 27 de outubro de 2010
<?xml version="1.0" encoding="UTF-8" ?>
<Module>
 <ModulePrefs title="Standard gadget structure">
  <Require feature="opensocial-0.8"/>
 </ModulePrefs>
 <Content type="html">
 <![CDATA[
      Hello, RubyConf!
 ]]>
 </Content>
</Module>
quarta-feira, 27 de outubro de 2010
<?xml version="1.0" encoding="UTF-8" ?>
<Module>
 <ModulePrefs title="Standard gadget structure">
  <Require feature="opensocial-0.8"/>
 </ModulePrefs>
 <Content type="html">
 <![CDATA[
      Hello, RubyConf!
 ]]>
 </Content>
</Module>
quarta-feira, 27 de outubro de 2010
<?xml version="1.0" encoding="UTF-8" ?>
<Module>
 <ModulePrefs title="Standard gadget structure">
  <Require feature="opensocial-0.8"/>
 </ModulePrefs>
 <Content type="html">
 <![CDATA[
      Hello, RubyConf!
 ]]>
 </Content>
</Module>
quarta-feira, 27 de outubro de 2010
<?xml version="1.0" encoding="UTF-8" ?>
<Module>
 <ModulePrefs title="Standard gadget structure">
  <Require feature="opensocial-0.8"/>
 </ModulePrefs>
 <Content type="html">
 <![CDATA[
      Hello, RubyConf!
 ]]>
 </Content>
</Module>
quarta-feira, 27 de outubro de 2010
quarta-feira, 27 de outubro de 2010
Profiles
quarta-feira, 27 de outubro de 2010
JS
var req = opensocial.newDataRequest();
req.add(req.newFetchPersonRequest("OWNER"), "owner");
req.send(fetchPersonHandler);
function fetchPersonHandler(data) {
var owner = data.get('owner').getData();
alert(owner.getDisplayName());
};
quarta-feira, 27 de outubro de 2010
REST
require 'oauth'
require 'json'
uri = URI.parse "http://sandbox.orkut.com/social/rest/people/#{orkut_uid}/@self?xoauth_requestor_id=#{orkut_uid}"
http = Net::HTTP.new(uri.host, uri.port)
req = Net::HTTP::Get.new(uri.request_uri)
consumer = OAuth::Consumer.new(CONSUMER_KEY, CONSUMER_SECRET)
req.oauth!(http, consumer, nil, :scheme => 'query_string')
resp = http.get(req.path)
JSON.parse(resp.body)
quarta-feira, 27 de outubro de 2010
Friends
quarta-feira, 27 de outubro de 2010
JS
var req = opensocial.newDataRequest();
req.add(req.newFetchPersonRequest("VIEWER"), "viewer");
var viewerFriends = opensocial.newIdSpec({ "userId" :
"VIEWER", "groupId" : "FRIENDS" });
req.add(req.newFetchPeopleRequest(viewerFriends, {}),
'viewerFriends');
req.send(onLoadFriends);
quarta-feira, 27 de outubro de 2010
REST
http://sandbox.orkut.com/social/rest/people/#{orkut_uid}/@all?xoauth_requestor_id=#{orkut_uid}&count=9999
quarta-feira, 27 de outubro de 2010
Activities
quarta-feira, 27 de outubro de 2010
JS
function sendMessage(messageTitle, messageBody, friend) {
var params = [];
params[opensocial.Message.Field.TITLE] = messageTitle;
params[opensocial.Message.Field.TYPE] = opensocial.Message.Type.EMAIL;
var message = opensocial.newMessage(messageBody, params);
opensocial.requestSendMessage(friend, message, function() {});
}
quarta-feira, 27 de outubro de 2010
REST
quarta-feira, 27 de outubro de 2010
function loadInitialData() {
var req = opensocial.newDataRequest();
req.add(req.newFetchPersonRequest("OWNER"), "owner");
req.add(req.newFetchPersonRequest("VIEWER"), "viewer");
req.send(function(dataResponse) {
var owner = dataResponse.get('owner').getData();
var viewer = dataResponse.get('viewer').getData();
OWNER_ID = owner.getId();
VIEWER_ID = viewer.getId();
HOST_WITH_PORT = $('#host_with_port').val();
sendRequest('/speakers', {}, '#speakers');
});
}
gadgets.util.registerOnLoadHandler(loadInitialData);
quarta-feira, 27 de outubro de 2010
function loadInitialData() {
var req = opensocial.newDataRequest();
req.add(req.newFetchPersonRequest("OWNER"), "owner");
req.add(req.newFetchPersonRequest("VIEWER"), "viewer");
req.send(function(dataResponse) {
var owner = dataResponse.get('owner').getData();
var viewer = dataResponse.get('viewer').getData();
OWNER_ID = owner.getId();
VIEWER_ID = viewer.getId();
HOST_WITH_PORT = $('#host_with_port').val();
sendRequest('/speakers', {}, '#speakers');
});
}
gadgets.util.registerOnLoadHandler(loadInitialData);
quarta-feira, 27 de outubro de 2010
function loadInitialData() {
var req = opensocial.newDataRequest();
req.add(req.newFetchPersonRequest("OWNER"), "owner");
req.add(req.newFetchPersonRequest("VIEWER"), "viewer");
req.send(function(dataResponse) {
var owner = dataResponse.get('owner').getData();
var viewer = dataResponse.get('viewer').getData();
OWNER_ID = owner.getId();
VIEWER_ID = viewer.getId();
HOST_WITH_PORT = $('#host_with_port').val();
sendRequest('/speakers', {}, '#speakers');
});
}
gadgets.util.registerOnLoadHandler(loadInitialData);
quarta-feira, 27 de outubro de 2010
function loadInitialData() {
var req = opensocial.newDataRequest();
req.add(req.newFetchPersonRequest("OWNER"), "owner");
req.add(req.newFetchPersonRequest("VIEWER"), "viewer");
req.send(function(dataResponse) {
var owner = dataResponse.get('owner').getData();
var viewer = dataResponse.get('viewer').getData();
OWNER_ID = owner.getId();
VIEWER_ID = viewer.getId();
HOST_WITH_PORT = $('#host_with_port').val();
sendRequest('/speakers', {}, '#speakers');
});
}
gadgets.util.registerOnLoadHandler(loadInitialData);
quarta-feira, 27 de outubro de 2010
function loadInitialData() {
var req = opensocial.newDataRequest();
req.add(req.newFetchPersonRequest("OWNER"), "owner");
req.add(req.newFetchPersonRequest("VIEWER"), "viewer");
req.send(function(dataResponse) {
var owner = dataResponse.get('owner').getData();
var viewer = dataResponse.get('viewer').getData();
OWNER_ID = owner.getId();
VIEWER_ID = viewer.getId();
HOST_WITH_PORT = $('#host_with_port').val();
sendRequest('/speakers', {}, '#speakers');
});
}
gadgets.util.registerOnLoadHandler(loadInitialData);
quarta-feira, 27 de outubro de 2010
function loadInitialData() {
var req = opensocial.newDataRequest();
req.add(req.newFetchPersonRequest("OWNER"), "owner");
req.add(req.newFetchPersonRequest("VIEWER"), "viewer");
req.send(function(dataResponse) {
var owner = dataResponse.get('owner').getData();
var viewer = dataResponse.get('viewer').getData();
OWNER_ID = owner.getId();
VIEWER_ID = viewer.getId();
HOST_WITH_PORT = $('#host_with_port').val();
sendRequest('/speakers', {}, '#speakers');
});
}
gadgets.util.registerOnLoadHandler(loadInitialData);
quarta-feira, 27 de outubro de 2010
function loadInitialData() {
var req = opensocial.newDataRequest();
req.add(req.newFetchPersonRequest("OWNER"), "owner");
req.add(req.newFetchPersonRequest("VIEWER"), "viewer");
req.send(function(dataResponse) {
var owner = dataResponse.get('owner').getData();
var viewer = dataResponse.get('viewer').getData();
OWNER_ID = owner.getId();
VIEWER_ID = viewer.getId();
HOST_WITH_PORT = $('#host_with_port').val();
sendRequest('/speakers', {}, '#speakers');
});
}
gadgets.util.registerOnLoadHandler(loadInitialData);
quarta-feira, 27 de outubro de 2010
function sendRequest(path, options, element) {
var querystring = '?owner_id=' + OWNER_ID + '&viewer_id=' + VIEWER_ID;
if (options) {
$.each(options, function(index, val) {
querystring = querystring + '&' + index + '=' + val;
});
};
var url = HOST_WITH_PORT + '/opensocial' + path + querystring;
var params = {};
params[gadgets.io.RequestParameters.CONTENT_TYPE] = gadgets.io.ContentType.TEXT;
makeCachedRequest(encodeURI(url), function(result) {
$(element).html(result.text);
gadgets.window.adjustHeight();
}, params, 0);
}
quarta-feira, 27 de outubro de 2010
function sendRequest(path, options, element) {
var querystring = '?owner_id=' + OWNER_ID + '&viewer_id=' + VIEWER_ID;
if (options) {
$.each(options, function(index, val) {
querystring = querystring + '&' + index + '=' + val;
});
};
var url = HOST_WITH_PORT + '/opensocial' + path + querystring;
var params = {};
params[gadgets.io.RequestParameters.CONTENT_TYPE] = gadgets.io.ContentType.TEXT;
makeCachedRequest(encodeURI(url), function(result) {
$(element).html(result.text);
gadgets.window.adjustHeight();
}, params, 0);
}
quarta-feira, 27 de outubro de 2010
function sendRequest(path, options, element) {
var querystring = '?owner_id=' + OWNER_ID + '&viewer_id=' + VIEWER_ID;
if (options) {
$.each(options, function(index, val) {
querystring = querystring + '&' + index + '=' + val;
});
};
var url = HOST_WITH_PORT + '/opensocial' + path + querystring;
var params = {};
params[gadgets.io.RequestParameters.CONTENT_TYPE] = gadgets.io.ContentType.TEXT;
makeCachedRequest(encodeURI(url), function(result) {
$(element).html(result.text);
gadgets.window.adjustHeight();
}, params, 0);
}
quarta-feira, 27 de outubro de 2010
function sendRequest(path, options, element) {
var querystring = '?owner_id=' + OWNER_ID + '&viewer_id=' + VIEWER_ID;
if (options) {
$.each(options, function(index, val) {
querystring = querystring + '&' + index + '=' + val;
});
};
var url = HOST_WITH_PORT + '/opensocial' + path + querystring;
var params = {};
params[gadgets.io.RequestParameters.CONTENT_TYPE] = gadgets.io.ContentType.TEXT;
makeCachedRequest(encodeURI(url), function(result) {
$(element).html(result.text);
gadgets.window.adjustHeight();
}, params, 0);
}
quarta-feira, 27 de outubro de 2010
function sendRequest(path, options, element) {
var querystring = '?owner_id=' + OWNER_ID + '&viewer_id=' + VIEWER_ID;
if (options) {
$.each(options, function(index, val) {
querystring = querystring + '&' + index + '=' + val;
});
};
var url = HOST_WITH_PORT + '/opensocial' + path + querystring;
var params = {};
params[gadgets.io.RequestParameters.CONTENT_TYPE] = gadgets.io.ContentType.TEXT;
makeCachedRequest(encodeURI(url), function(result) {
$(element).html(result.text);
gadgets.window.adjustHeight();
}, params, 0);
}
quarta-feira, 27 de outubro de 2010
function sendRequest(path, options, element) {
var querystring = '?owner_id=' + OWNER_ID + '&viewer_id=' + VIEWER_ID;
if (options) {
$.each(options, function(index, val) {
querystring = querystring + '&' + index + '=' + val;
});
};
var url = HOST_WITH_PORT + '/opensocial' + path + querystring;
var params = {};
params[gadgets.io.RequestParameters.CONTENT_TYPE] = gadgets.io.ContentType.TEXT;
makeCachedRequest(encodeURI(url), function(result) {
$(element).html(result.text);
gadgets.window.adjustHeight();
}, params, 0);
}
quarta-feira, 27 de outubro de 2010
@carlosbrando
www.nomedojogo.com
quarta-feira, 27 de outubro de 2010

Contenu connexe

Tendances

ZendCon2010 Doctrine MongoDB ODM
ZendCon2010 Doctrine MongoDB ODMZendCon2010 Doctrine MongoDB ODM
ZendCon2010 Doctrine MongoDB ODMJonathan Wage
 
Delivering a Responsive UI
Delivering a Responsive UIDelivering a Responsive UI
Delivering a Responsive UIRebecca Murphey
 
Doctrine MongoDB Object Document Mapper
Doctrine MongoDB Object Document MapperDoctrine MongoDB Object Document Mapper
Doctrine MongoDB Object Document MapperJonathan Wage
 
Symfony2 from the Trenches
Symfony2 from the TrenchesSymfony2 from the Trenches
Symfony2 from the TrenchesJonathan Wage
 
Beyond the DOM: Sane Structure for JS Apps
Beyond the DOM: Sane Structure for JS AppsBeyond the DOM: Sane Structure for JS Apps
Beyond the DOM: Sane Structure for JS AppsRebecca Murphey
 
Object-oriented Javascript
Object-oriented JavascriptObject-oriented Javascript
Object-oriented JavascriptDaniel Ku
 
Prototype & jQuery
Prototype & jQueryPrototype & jQuery
Prototype & jQueryRemy Sharp
 
Node js mongodriver
Node js mongodriverNode js mongodriver
Node js mongodriverchristkv
 
PHP Static Code Review
PHP Static Code ReviewPHP Static Code Review
PHP Static Code ReviewDamien Seguy
 
PHP 5.3 and Lithium: the most rad php framework
PHP 5.3 and Lithium: the most rad php frameworkPHP 5.3 and Lithium: the most rad php framework
PHP 5.3 and Lithium: the most rad php frameworkG Woo
 
The Zen of Lithium
The Zen of LithiumThe Zen of Lithium
The Zen of LithiumNate Abele
 
Learning jQuery in 30 minutes
Learning jQuery in 30 minutesLearning jQuery in 30 minutes
Learning jQuery in 30 minutesSimon Willison
 
jQuery Fundamentals
jQuery FundamentalsjQuery Fundamentals
jQuery FundamentalsGil Fink
 
Writing Maintainable JavaScript
Writing Maintainable JavaScriptWriting Maintainable JavaScript
Writing Maintainable JavaScriptAndrew Dupont
 
06 jQuery #burningkeyboards
06 jQuery  #burningkeyboards06 jQuery  #burningkeyboards
06 jQuery #burningkeyboardsDenis Ristic
 

Tendances (20)

ZendCon2010 Doctrine MongoDB ODM
ZendCon2010 Doctrine MongoDB ODMZendCon2010 Doctrine MongoDB ODM
ZendCon2010 Doctrine MongoDB ODM
 
Delivering a Responsive UI
Delivering a Responsive UIDelivering a Responsive UI
Delivering a Responsive UI
 
Doctrine MongoDB Object Document Mapper
Doctrine MongoDB Object Document MapperDoctrine MongoDB Object Document Mapper
Doctrine MongoDB Object Document Mapper
 
Symfony2 from the Trenches
Symfony2 from the TrenchesSymfony2 from the Trenches
Symfony2 from the Trenches
 
Beyond the DOM: Sane Structure for JS Apps
Beyond the DOM: Sane Structure for JS AppsBeyond the DOM: Sane Structure for JS Apps
Beyond the DOM: Sane Structure for JS Apps
 
jQuery introduction
jQuery introductionjQuery introduction
jQuery introduction
 
jQuery secrets
jQuery secretsjQuery secrets
jQuery secrets
 
jQuery
jQueryjQuery
jQuery
 
Object-oriented Javascript
Object-oriented JavascriptObject-oriented Javascript
Object-oriented Javascript
 
Prototype & jQuery
Prototype & jQueryPrototype & jQuery
Prototype & jQuery
 
Node js mongodriver
Node js mongodriverNode js mongodriver
Node js mongodriver
 
PHP Static Code Review
PHP Static Code ReviewPHP Static Code Review
PHP Static Code Review
 
PHP 5.3 and Lithium: the most rad php framework
PHP 5.3 and Lithium: the most rad php frameworkPHP 5.3 and Lithium: the most rad php framework
PHP 5.3 and Lithium: the most rad php framework
 
The Zen of Lithium
The Zen of LithiumThe Zen of Lithium
The Zen of Lithium
 
The jQuery Divide
The jQuery DivideThe jQuery Divide
The jQuery Divide
 
Learning jQuery in 30 minutes
Learning jQuery in 30 minutesLearning jQuery in 30 minutes
Learning jQuery in 30 minutes
 
jQuery Fundamentals
jQuery FundamentalsjQuery Fundamentals
jQuery Fundamentals
 
Twitter codeigniter library
Twitter codeigniter libraryTwitter codeigniter library
Twitter codeigniter library
 
Writing Maintainable JavaScript
Writing Maintainable JavaScriptWriting Maintainable JavaScript
Writing Maintainable JavaScript
 
06 jQuery #burningkeyboards
06 jQuery  #burningkeyboards06 jQuery  #burningkeyboards
06 jQuery #burningkeyboards
 

En vedette

Introdução à programação em Android e iOS - iOS
Introdução à programação em Android e iOS - iOSIntrodução à programação em Android e iOS - iOS
Introdução à programação em Android e iOS - iOSLuís Gustavo Martins
 
Introdução à programação em Ruby
Introdução à programação em RubyIntrodução à programação em Ruby
Introdução à programação em RubyDaniel Andrade
 
Apostila ruby-completa
Apostila ruby-completaApostila ruby-completa
Apostila ruby-completamako2887
 
Ebook ITIL Na Prática
Ebook ITIL Na PráticaEbook ITIL Na Prática
Ebook ITIL Na PráticaFernando Palma
 
Apostila Ruby on rails
Apostila Ruby on rails Apostila Ruby on rails
Apostila Ruby on rails Fernando Palma
 
Desenvolvimento de Apps e Games para Android - Parte 1
Desenvolvimento de Apps e Games para Android - Parte 1Desenvolvimento de Apps e Games para Android - Parte 1
Desenvolvimento de Apps e Games para Android - Parte 1Erisvaldo Junior
 
Programação Android - Básico
Programação Android - BásicoProgramação Android - Básico
Programação Android - BásicoHugoDalevedove
 

En vedette (11)

Introdução à programação em Android e iOS - iOS
Introdução à programação em Android e iOS - iOSIntrodução à programação em Android e iOS - iOS
Introdução à programação em Android e iOS - iOS
 
A Linguagem Ruby
A Linguagem RubyA Linguagem Ruby
A Linguagem Ruby
 
Oficina Ruby on Rails Fatec
Oficina Ruby on Rails FatecOficina Ruby on Rails Fatec
Oficina Ruby on Rails Fatec
 
Introdução à programação em Ruby
Introdução à programação em RubyIntrodução à programação em Ruby
Introdução à programação em Ruby
 
Apostila ruby-completa
Apostila ruby-completaApostila ruby-completa
Apostila ruby-completa
 
Ebook ITIL Na Prática
Ebook ITIL Na PráticaEbook ITIL Na Prática
Ebook ITIL Na Prática
 
Apostila Ruby on rails
Apostila Ruby on rails Apostila Ruby on rails
Apostila Ruby on rails
 
Desenvolvimento de Apps e Games para Android - Parte 1
Desenvolvimento de Apps e Games para Android - Parte 1Desenvolvimento de Apps e Games para Android - Parte 1
Desenvolvimento de Apps e Games para Android - Parte 1
 
Programação Android - Básico
Programação Android - BásicoProgramação Android - Básico
Programação Android - Básico
 
Direito administrativo
Direito administrativoDireito administrativo
Direito administrativo
 
Introdução ao Android Studio
Introdução ao Android StudioIntrodução ao Android Studio
Introdução ao Android Studio
 

Similaire à Desenvolvendo Aplicativos Sociais com Rails 3

Understanding backbonejs
Understanding backbonejsUnderstanding backbonejs
Understanding backbonejsNick Lee
 
Mashing up JavaScript – Advanced Techniques for modern Web Apps
Mashing up JavaScript – Advanced Techniques for modern Web AppsMashing up JavaScript – Advanced Techniques for modern Web Apps
Mashing up JavaScript – Advanced Techniques for modern Web AppsBastian Hofmann
 
Paris js extensions
Paris js extensionsParis js extensions
Paris js extensionserwanl
 
A Rich Web experience with jQuery, Ajax and .NET
A Rich Web experience with jQuery, Ajax and .NETA Rich Web experience with jQuery, Ajax and .NET
A Rich Web experience with jQuery, Ajax and .NETJames Johnson
 
ReactJs presentation
ReactJs presentationReactJs presentation
ReactJs presentationnishasowdri
 
YDN KR Tech Talk : Pipes 와 YQL 활용하기
YDN KR Tech Talk : Pipes 와 YQL 활용하기YDN KR Tech Talk : Pipes 와 YQL 활용하기
YDN KR Tech Talk : Pipes 와 YQL 활용하기Jinho Jung
 
international PHP2011_Bastian Feder_jQuery's Secrets
international PHP2011_Bastian Feder_jQuery's Secretsinternational PHP2011_Bastian Feder_jQuery's Secrets
international PHP2011_Bastian Feder_jQuery's Secretssmueller_sandsmedia
 
HTML5 - The 2012 of the Web
HTML5 - The 2012 of the WebHTML5 - The 2012 of the Web
HTML5 - The 2012 of the WebRobert Nyman
 
jQuery Data Manipulate API - A source code dissecting journey
jQuery Data Manipulate API - A source code dissecting journeyjQuery Data Manipulate API - A source code dissecting journey
jQuery Data Manipulate API - A source code dissecting journeyHuiyi Yan
 
Android dev toolbox
Android dev toolboxAndroid dev toolbox
Android dev toolboxShem Magnezi
 
Intoduction on Playframework
Intoduction on PlayframeworkIntoduction on Playframework
Intoduction on PlayframeworkKnoldus Inc.
 
Summer - The HTML5 Library for Java and Scala
Summer - The HTML5 Library for Java and ScalaSummer - The HTML5 Library for Java and Scala
Summer - The HTML5 Library for Java and Scalarostislav
 
Beacons, Raspberry Pi & Node.js
Beacons, Raspberry Pi & Node.jsBeacons, Raspberry Pi & Node.js
Beacons, Raspberry Pi & Node.jsJeff Prestes
 
A Rich Web Experience with jQuery, Ajax and .NET
A Rich Web Experience with jQuery, Ajax and .NETA Rich Web Experience with jQuery, Ajax and .NET
A Rich Web Experience with jQuery, Ajax and .NETJames Johnson
 
CouchDB on Android
CouchDB on AndroidCouchDB on Android
CouchDB on AndroidSven Haiges
 
Тарас Олексин - Sculpt! Your! Tests!
Тарас Олексин  - Sculpt! Your! Tests!Тарас Олексин  - Sculpt! Your! Tests!
Тарас Олексин - Sculpt! Your! Tests!DataArt
 

Similaire à Desenvolvendo Aplicativos Sociais com Rails 3 (20)

Mashing up JavaScript
Mashing up JavaScriptMashing up JavaScript
Mashing up JavaScript
 
Understanding backbonejs
Understanding backbonejsUnderstanding backbonejs
Understanding backbonejs
 
Mashing up JavaScript – Advanced Techniques for modern Web Apps
Mashing up JavaScript – Advanced Techniques for modern Web AppsMashing up JavaScript – Advanced Techniques for modern Web Apps
Mashing up JavaScript – Advanced Techniques for modern Web Apps
 
Paris js extensions
Paris js extensionsParis js extensions
Paris js extensions
 
Intro to Parse
Intro to ParseIntro to Parse
Intro to Parse
 
A Rich Web experience with jQuery, Ajax and .NET
A Rich Web experience with jQuery, Ajax and .NETA Rich Web experience with jQuery, Ajax and .NET
A Rich Web experience with jQuery, Ajax and .NET
 
ReactJs presentation
ReactJs presentationReactJs presentation
ReactJs presentation
 
YDN KR Tech Talk : Pipes 와 YQL 활용하기
YDN KR Tech Talk : Pipes 와 YQL 활용하기YDN KR Tech Talk : Pipes 와 YQL 활용하기
YDN KR Tech Talk : Pipes 와 YQL 활용하기
 
international PHP2011_Bastian Feder_jQuery's Secrets
international PHP2011_Bastian Feder_jQuery's Secretsinternational PHP2011_Bastian Feder_jQuery's Secrets
international PHP2011_Bastian Feder_jQuery's Secrets
 
HTML5 - The 2012 of the Web
HTML5 - The 2012 of the WebHTML5 - The 2012 of the Web
HTML5 - The 2012 of the Web
 
jQuery Data Manipulate API - A source code dissecting journey
jQuery Data Manipulate API - A source code dissecting journeyjQuery Data Manipulate API - A source code dissecting journey
jQuery Data Manipulate API - A source code dissecting journey
 
Android dev toolbox
Android dev toolboxAndroid dev toolbox
Android dev toolbox
 
Intoduction on Playframework
Intoduction on PlayframeworkIntoduction on Playframework
Intoduction on Playframework
 
YAP / Open Mail Overview
YAP / Open Mail OverviewYAP / Open Mail Overview
YAP / Open Mail Overview
 
Summer - The HTML5 Library for Java and Scala
Summer - The HTML5 Library for Java and ScalaSummer - The HTML5 Library for Java and Scala
Summer - The HTML5 Library for Java and Scala
 
Beacons, Raspberry Pi & Node.js
Beacons, Raspberry Pi & Node.jsBeacons, Raspberry Pi & Node.js
Beacons, Raspberry Pi & Node.js
 
A Rich Web Experience with jQuery, Ajax and .NET
A Rich Web Experience with jQuery, Ajax and .NETA Rich Web Experience with jQuery, Ajax and .NET
A Rich Web Experience with jQuery, Ajax and .NET
 
CouchDB on Android
CouchDB on AndroidCouchDB on Android
CouchDB on Android
 
Clean Javascript
Clean JavascriptClean Javascript
Clean Javascript
 
Тарас Олексин - Sculpt! Your! Tests!
Тарас Олексин  - Sculpt! Your! Tests!Тарас Олексин  - Sculpt! Your! Tests!
Тарас Олексин - Sculpt! Your! Tests!
 

Plus de Carlos Brando

Criando uma carreira notável em desenvolvimento de software
Criando uma carreira notável em desenvolvimento de softwareCriando uma carreira notável em desenvolvimento de software
Criando uma carreira notável em desenvolvimento de softwareCarlos Brando
 
A ciência por trás do Ruby
A ciência por trás do RubyA ciência por trás do Ruby
A ciência por trás do RubyCarlos Brando
 
Yet Another Ruby Framework - Como o Rails funciona por dentro
Yet Another Ruby Framework - Como o Rails funciona por dentroYet Another Ruby Framework - Como o Rails funciona por dentro
Yet Another Ruby Framework - Como o Rails funciona por dentroCarlos Brando
 
Como Ruby on Rails pode o tornar um programador pior
Como Ruby on Rails pode o tornar um programador piorComo Ruby on Rails pode o tornar um programador pior
Como Ruby on Rails pode o tornar um programador piorCarlos Brando
 
Só Os Imaturos NãO Testam
Só Os Imaturos NãO TestamSó Os Imaturos NãO Testam
Só Os Imaturos NãO TestamCarlos Brando
 

Plus de Carlos Brando (6)

Criando uma carreira notável em desenvolvimento de software
Criando uma carreira notável em desenvolvimento de softwareCriando uma carreira notável em desenvolvimento de software
Criando uma carreira notável em desenvolvimento de software
 
A ciência por trás do Ruby
A ciência por trás do RubyA ciência por trás do Ruby
A ciência por trás do Ruby
 
Yet Another Ruby Framework - Como o Rails funciona por dentro
Yet Another Ruby Framework - Como o Rails funciona por dentroYet Another Ruby Framework - Como o Rails funciona por dentro
Yet Another Ruby Framework - Como o Rails funciona por dentro
 
Eu odeio OpenSocial
Eu odeio OpenSocialEu odeio OpenSocial
Eu odeio OpenSocial
 
Como Ruby on Rails pode o tornar um programador pior
Como Ruby on Rails pode o tornar um programador piorComo Ruby on Rails pode o tornar um programador pior
Como Ruby on Rails pode o tornar um programador pior
 
Só Os Imaturos NãO Testam
Só Os Imaturos NãO TestamSó Os Imaturos NãO Testam
Só Os Imaturos NãO Testam
 

Dernier

UiPath Studio Web workshop series - Day 7
UiPath Studio Web workshop series - Day 7UiPath Studio Web workshop series - Day 7
UiPath Studio Web workshop series - Day 7DianaGray10
 
Introduction to Matsuo Laboratory (ENG).pptx
Introduction to Matsuo Laboratory (ENG).pptxIntroduction to Matsuo Laboratory (ENG).pptx
Introduction to Matsuo Laboratory (ENG).pptxMatsuo Lab
 
How Accurate are Carbon Emissions Projections?
How Accurate are Carbon Emissions Projections?How Accurate are Carbon Emissions Projections?
How Accurate are Carbon Emissions Projections?IES VE
 
IESVE Software for Florida Code Compliance Using ASHRAE 90.1-2019
IESVE Software for Florida Code Compliance Using ASHRAE 90.1-2019IESVE Software for Florida Code Compliance Using ASHRAE 90.1-2019
IESVE Software for Florida Code Compliance Using ASHRAE 90.1-2019IES VE
 
Linked Data in Production: Moving Beyond Ontologies
Linked Data in Production: Moving Beyond OntologiesLinked Data in Production: Moving Beyond Ontologies
Linked Data in Production: Moving Beyond OntologiesDavid Newbury
 
UiPath Studio Web workshop series - Day 6
UiPath Studio Web workshop series - Day 6UiPath Studio Web workshop series - Day 6
UiPath Studio Web workshop series - Day 6DianaGray10
 
Basic Building Blocks of Internet of Things.
Basic Building Blocks of Internet of Things.Basic Building Blocks of Internet of Things.
Basic Building Blocks of Internet of Things.YounusS2
 
ADOPTING WEB 3 FOR YOUR BUSINESS: A STEP-BY-STEP GUIDE
ADOPTING WEB 3 FOR YOUR BUSINESS: A STEP-BY-STEP GUIDEADOPTING WEB 3 FOR YOUR BUSINESS: A STEP-BY-STEP GUIDE
ADOPTING WEB 3 FOR YOUR BUSINESS: A STEP-BY-STEP GUIDELiveplex
 
Bird eye's view on Camunda open source ecosystem
Bird eye's view on Camunda open source ecosystemBird eye's view on Camunda open source ecosystem
Bird eye's view on Camunda open source ecosystemAsko Soukka
 
UiPath Community: AI for UiPath Automation Developers
UiPath Community: AI for UiPath Automation DevelopersUiPath Community: AI for UiPath Automation Developers
UiPath Community: AI for UiPath Automation DevelopersUiPathCommunity
 
COMPUTER 10 Lesson 8 - Building a Website
COMPUTER 10 Lesson 8 - Building a WebsiteCOMPUTER 10 Lesson 8 - Building a Website
COMPUTER 10 Lesson 8 - Building a Websitedgelyza
 
Designing A Time bound resource download URL
Designing A Time bound resource download URLDesigning A Time bound resource download URL
Designing A Time bound resource download URLRuncy Oommen
 
Building AI-Driven Apps Using Semantic Kernel.pptx
Building AI-Driven Apps Using Semantic Kernel.pptxBuilding AI-Driven Apps Using Semantic Kernel.pptx
Building AI-Driven Apps Using Semantic Kernel.pptxUdaiappa Ramachandran
 
Comparing Sidecar-less Service Mesh from Cilium and Istio
Comparing Sidecar-less Service Mesh from Cilium and IstioComparing Sidecar-less Service Mesh from Cilium and Istio
Comparing Sidecar-less Service Mesh from Cilium and IstioChristian Posta
 
AI You Can Trust - Ensuring Success with Data Integrity Webinar
AI You Can Trust - Ensuring Success with Data Integrity WebinarAI You Can Trust - Ensuring Success with Data Integrity Webinar
AI You Can Trust - Ensuring Success with Data Integrity WebinarPrecisely
 
Apres-Cyber - The Data Dilemma: Bridging Offensive Operations and Machine Lea...
Apres-Cyber - The Data Dilemma: Bridging Offensive Operations and Machine Lea...Apres-Cyber - The Data Dilemma: Bridging Offensive Operations and Machine Lea...
Apres-Cyber - The Data Dilemma: Bridging Offensive Operations and Machine Lea...Will Schroeder
 
Salesforce Miami User Group Event - 1st Quarter 2024
Salesforce Miami User Group Event - 1st Quarter 2024Salesforce Miami User Group Event - 1st Quarter 2024
Salesforce Miami User Group Event - 1st Quarter 2024SkyPlanner
 
Secure your environment with UiPath and CyberArk technologies - Session 1
Secure your environment with UiPath and CyberArk technologies - Session 1Secure your environment with UiPath and CyberArk technologies - Session 1
Secure your environment with UiPath and CyberArk technologies - Session 1DianaGray10
 
KubeConEU24-Monitoring Kubernetes and Cloud Spend with OpenCost
KubeConEU24-Monitoring Kubernetes and Cloud Spend with OpenCostKubeConEU24-Monitoring Kubernetes and Cloud Spend with OpenCost
KubeConEU24-Monitoring Kubernetes and Cloud Spend with OpenCostMatt Ray
 

Dernier (20)

UiPath Studio Web workshop series - Day 7
UiPath Studio Web workshop series - Day 7UiPath Studio Web workshop series - Day 7
UiPath Studio Web workshop series - Day 7
 
Introduction to Matsuo Laboratory (ENG).pptx
Introduction to Matsuo Laboratory (ENG).pptxIntroduction to Matsuo Laboratory (ENG).pptx
Introduction to Matsuo Laboratory (ENG).pptx
 
How Accurate are Carbon Emissions Projections?
How Accurate are Carbon Emissions Projections?How Accurate are Carbon Emissions Projections?
How Accurate are Carbon Emissions Projections?
 
20150722 - AGV
20150722 - AGV20150722 - AGV
20150722 - AGV
 
IESVE Software for Florida Code Compliance Using ASHRAE 90.1-2019
IESVE Software for Florida Code Compliance Using ASHRAE 90.1-2019IESVE Software for Florida Code Compliance Using ASHRAE 90.1-2019
IESVE Software for Florida Code Compliance Using ASHRAE 90.1-2019
 
Linked Data in Production: Moving Beyond Ontologies
Linked Data in Production: Moving Beyond OntologiesLinked Data in Production: Moving Beyond Ontologies
Linked Data in Production: Moving Beyond Ontologies
 
UiPath Studio Web workshop series - Day 6
UiPath Studio Web workshop series - Day 6UiPath Studio Web workshop series - Day 6
UiPath Studio Web workshop series - Day 6
 
Basic Building Blocks of Internet of Things.
Basic Building Blocks of Internet of Things.Basic Building Blocks of Internet of Things.
Basic Building Blocks of Internet of Things.
 
ADOPTING WEB 3 FOR YOUR BUSINESS: A STEP-BY-STEP GUIDE
ADOPTING WEB 3 FOR YOUR BUSINESS: A STEP-BY-STEP GUIDEADOPTING WEB 3 FOR YOUR BUSINESS: A STEP-BY-STEP GUIDE
ADOPTING WEB 3 FOR YOUR BUSINESS: A STEP-BY-STEP GUIDE
 
Bird eye's view on Camunda open source ecosystem
Bird eye's view on Camunda open source ecosystemBird eye's view on Camunda open source ecosystem
Bird eye's view on Camunda open source ecosystem
 
UiPath Community: AI for UiPath Automation Developers
UiPath Community: AI for UiPath Automation DevelopersUiPath Community: AI for UiPath Automation Developers
UiPath Community: AI for UiPath Automation Developers
 
COMPUTER 10 Lesson 8 - Building a Website
COMPUTER 10 Lesson 8 - Building a WebsiteCOMPUTER 10 Lesson 8 - Building a Website
COMPUTER 10 Lesson 8 - Building a Website
 
Designing A Time bound resource download URL
Designing A Time bound resource download URLDesigning A Time bound resource download URL
Designing A Time bound resource download URL
 
Building AI-Driven Apps Using Semantic Kernel.pptx
Building AI-Driven Apps Using Semantic Kernel.pptxBuilding AI-Driven Apps Using Semantic Kernel.pptx
Building AI-Driven Apps Using Semantic Kernel.pptx
 
Comparing Sidecar-less Service Mesh from Cilium and Istio
Comparing Sidecar-less Service Mesh from Cilium and IstioComparing Sidecar-less Service Mesh from Cilium and Istio
Comparing Sidecar-less Service Mesh from Cilium and Istio
 
AI You Can Trust - Ensuring Success with Data Integrity Webinar
AI You Can Trust - Ensuring Success with Data Integrity WebinarAI You Can Trust - Ensuring Success with Data Integrity Webinar
AI You Can Trust - Ensuring Success with Data Integrity Webinar
 
Apres-Cyber - The Data Dilemma: Bridging Offensive Operations and Machine Lea...
Apres-Cyber - The Data Dilemma: Bridging Offensive Operations and Machine Lea...Apres-Cyber - The Data Dilemma: Bridging Offensive Operations and Machine Lea...
Apres-Cyber - The Data Dilemma: Bridging Offensive Operations and Machine Lea...
 
Salesforce Miami User Group Event - 1st Quarter 2024
Salesforce Miami User Group Event - 1st Quarter 2024Salesforce Miami User Group Event - 1st Quarter 2024
Salesforce Miami User Group Event - 1st Quarter 2024
 
Secure your environment with UiPath and CyberArk technologies - Session 1
Secure your environment with UiPath and CyberArk technologies - Session 1Secure your environment with UiPath and CyberArk technologies - Session 1
Secure your environment with UiPath and CyberArk technologies - Session 1
 
KubeConEU24-Monitoring Kubernetes and Cloud Spend with OpenCost
KubeConEU24-Monitoring Kubernetes and Cloud Spend with OpenCostKubeConEU24-Monitoring Kubernetes and Cloud Spend with OpenCost
KubeConEU24-Monitoring Kubernetes and Cloud Spend with OpenCost
 

Desenvolvendo Aplicativos Sociais com Rails 3

  • 1. Desenvolvendo Aplicativos Sociais com Rails 3 Carlos Brando quarta-feira, 27 de outubro de 2010
  • 2. quarta-feira, 27 de outubro de 2010
  • 3. <?xml version="1.0" encoding="UTF-8" ?> <Module>  <ModulePrefs title="Standard gadget structure">   <Require feature="opensocial-0.8"/>  </ModulePrefs>  <Content type="html">  <![CDATA[       Hello, RubyConf!  ]]>  </Content> </Module> quarta-feira, 27 de outubro de 2010
  • 4. <?xml version="1.0" encoding="UTF-8" ?> <Module>  <ModulePrefs title="Standard gadget structure">   <Require feature="opensocial-0.8"/>  </ModulePrefs>  <Content type="html">  <![CDATA[       Hello, RubyConf!  ]]>  </Content> </Module> quarta-feira, 27 de outubro de 2010
  • 5. <?xml version="1.0" encoding="UTF-8" ?> <Module>  <ModulePrefs title="Standard gadget structure">   <Require feature="opensocial-0.8"/>  </ModulePrefs>  <Content type="html">  <![CDATA[       Hello, RubyConf!  ]]>  </Content> </Module> quarta-feira, 27 de outubro de 2010
  • 6. <?xml version="1.0" encoding="UTF-8" ?> <Module>  <ModulePrefs title="Standard gadget structure">   <Require feature="opensocial-0.8"/>  </ModulePrefs>  <Content type="html">  <![CDATA[       Hello, RubyConf!  ]]>  </Content> </Module> quarta-feira, 27 de outubro de 2010
  • 7. <?xml version="1.0" encoding="UTF-8" ?> <Module>  <ModulePrefs title="Standard gadget structure">   <Require feature="opensocial-0.8"/>  </ModulePrefs>  <Content type="html">  <![CDATA[       Hello, RubyConf!  ]]>  </Content> </Module> quarta-feira, 27 de outubro de 2010
  • 8. <?xml version="1.0" encoding="UTF-8" ?> <Module>  <ModulePrefs title="Standard gadget structure">   <Require feature="opensocial-0.8"/>  </ModulePrefs>  <Content type="html">  <![CDATA[       Hello, RubyConf!  ]]>  </Content> </Module> quarta-feira, 27 de outubro de 2010
  • 9. quarta-feira, 27 de outubro de 2010
  • 10. Profiles quarta-feira, 27 de outubro de 2010
  • 11. JS var req = opensocial.newDataRequest(); req.add(req.newFetchPersonRequest("OWNER"), "owner"); req.send(fetchPersonHandler); function fetchPersonHandler(data) { var owner = data.get('owner').getData(); alert(owner.getDisplayName()); }; quarta-feira, 27 de outubro de 2010
  • 12. REST require 'oauth' require 'json' uri = URI.parse "http://sandbox.orkut.com/social/rest/people/#{orkut_uid}/@self?xoauth_requestor_id=#{orkut_uid}" http = Net::HTTP.new(uri.host, uri.port) req = Net::HTTP::Get.new(uri.request_uri) consumer = OAuth::Consumer.new(CONSUMER_KEY, CONSUMER_SECRET) req.oauth!(http, consumer, nil, :scheme => 'query_string') resp = http.get(req.path) JSON.parse(resp.body) quarta-feira, 27 de outubro de 2010
  • 13. Friends quarta-feira, 27 de outubro de 2010
  • 14. JS var req = opensocial.newDataRequest(); req.add(req.newFetchPersonRequest("VIEWER"), "viewer"); var viewerFriends = opensocial.newIdSpec({ "userId" : "VIEWER", "groupId" : "FRIENDS" }); req.add(req.newFetchPeopleRequest(viewerFriends, {}), 'viewerFriends'); req.send(onLoadFriends); quarta-feira, 27 de outubro de 2010
  • 17. JS function sendMessage(messageTitle, messageBody, friend) { var params = []; params[opensocial.Message.Field.TITLE] = messageTitle; params[opensocial.Message.Field.TYPE] = opensocial.Message.Type.EMAIL; var message = opensocial.newMessage(messageBody, params); opensocial.requestSendMessage(friend, message, function() {}); } quarta-feira, 27 de outubro de 2010
  • 18. REST quarta-feira, 27 de outubro de 2010
  • 19. function loadInitialData() { var req = opensocial.newDataRequest(); req.add(req.newFetchPersonRequest("OWNER"), "owner"); req.add(req.newFetchPersonRequest("VIEWER"), "viewer"); req.send(function(dataResponse) { var owner = dataResponse.get('owner').getData(); var viewer = dataResponse.get('viewer').getData(); OWNER_ID = owner.getId(); VIEWER_ID = viewer.getId(); HOST_WITH_PORT = $('#host_with_port').val(); sendRequest('/speakers', {}, '#speakers'); }); } gadgets.util.registerOnLoadHandler(loadInitialData); quarta-feira, 27 de outubro de 2010
  • 20. function loadInitialData() { var req = opensocial.newDataRequest(); req.add(req.newFetchPersonRequest("OWNER"), "owner"); req.add(req.newFetchPersonRequest("VIEWER"), "viewer"); req.send(function(dataResponse) { var owner = dataResponse.get('owner').getData(); var viewer = dataResponse.get('viewer').getData(); OWNER_ID = owner.getId(); VIEWER_ID = viewer.getId(); HOST_WITH_PORT = $('#host_with_port').val(); sendRequest('/speakers', {}, '#speakers'); }); } gadgets.util.registerOnLoadHandler(loadInitialData); quarta-feira, 27 de outubro de 2010
  • 21. function loadInitialData() { var req = opensocial.newDataRequest(); req.add(req.newFetchPersonRequest("OWNER"), "owner"); req.add(req.newFetchPersonRequest("VIEWER"), "viewer"); req.send(function(dataResponse) { var owner = dataResponse.get('owner').getData(); var viewer = dataResponse.get('viewer').getData(); OWNER_ID = owner.getId(); VIEWER_ID = viewer.getId(); HOST_WITH_PORT = $('#host_with_port').val(); sendRequest('/speakers', {}, '#speakers'); }); } gadgets.util.registerOnLoadHandler(loadInitialData); quarta-feira, 27 de outubro de 2010
  • 22. function loadInitialData() { var req = opensocial.newDataRequest(); req.add(req.newFetchPersonRequest("OWNER"), "owner"); req.add(req.newFetchPersonRequest("VIEWER"), "viewer"); req.send(function(dataResponse) { var owner = dataResponse.get('owner').getData(); var viewer = dataResponse.get('viewer').getData(); OWNER_ID = owner.getId(); VIEWER_ID = viewer.getId(); HOST_WITH_PORT = $('#host_with_port').val(); sendRequest('/speakers', {}, '#speakers'); }); } gadgets.util.registerOnLoadHandler(loadInitialData); quarta-feira, 27 de outubro de 2010
  • 23. function loadInitialData() { var req = opensocial.newDataRequest(); req.add(req.newFetchPersonRequest("OWNER"), "owner"); req.add(req.newFetchPersonRequest("VIEWER"), "viewer"); req.send(function(dataResponse) { var owner = dataResponse.get('owner').getData(); var viewer = dataResponse.get('viewer').getData(); OWNER_ID = owner.getId(); VIEWER_ID = viewer.getId(); HOST_WITH_PORT = $('#host_with_port').val(); sendRequest('/speakers', {}, '#speakers'); }); } gadgets.util.registerOnLoadHandler(loadInitialData); quarta-feira, 27 de outubro de 2010
  • 24. function loadInitialData() { var req = opensocial.newDataRequest(); req.add(req.newFetchPersonRequest("OWNER"), "owner"); req.add(req.newFetchPersonRequest("VIEWER"), "viewer"); req.send(function(dataResponse) { var owner = dataResponse.get('owner').getData(); var viewer = dataResponse.get('viewer').getData(); OWNER_ID = owner.getId(); VIEWER_ID = viewer.getId(); HOST_WITH_PORT = $('#host_with_port').val(); sendRequest('/speakers', {}, '#speakers'); }); } gadgets.util.registerOnLoadHandler(loadInitialData); quarta-feira, 27 de outubro de 2010
  • 25. function loadInitialData() { var req = opensocial.newDataRequest(); req.add(req.newFetchPersonRequest("OWNER"), "owner"); req.add(req.newFetchPersonRequest("VIEWER"), "viewer"); req.send(function(dataResponse) { var owner = dataResponse.get('owner').getData(); var viewer = dataResponse.get('viewer').getData(); OWNER_ID = owner.getId(); VIEWER_ID = viewer.getId(); HOST_WITH_PORT = $('#host_with_port').val(); sendRequest('/speakers', {}, '#speakers'); }); } gadgets.util.registerOnLoadHandler(loadInitialData); quarta-feira, 27 de outubro de 2010
  • 26. function sendRequest(path, options, element) { var querystring = '?owner_id=' + OWNER_ID + '&viewer_id=' + VIEWER_ID; if (options) { $.each(options, function(index, val) { querystring = querystring + '&' + index + '=' + val; }); }; var url = HOST_WITH_PORT + '/opensocial' + path + querystring; var params = {}; params[gadgets.io.RequestParameters.CONTENT_TYPE] = gadgets.io.ContentType.TEXT; makeCachedRequest(encodeURI(url), function(result) { $(element).html(result.text); gadgets.window.adjustHeight(); }, params, 0); } quarta-feira, 27 de outubro de 2010
  • 27. function sendRequest(path, options, element) { var querystring = '?owner_id=' + OWNER_ID + '&viewer_id=' + VIEWER_ID; if (options) { $.each(options, function(index, val) { querystring = querystring + '&' + index + '=' + val; }); }; var url = HOST_WITH_PORT + '/opensocial' + path + querystring; var params = {}; params[gadgets.io.RequestParameters.CONTENT_TYPE] = gadgets.io.ContentType.TEXT; makeCachedRequest(encodeURI(url), function(result) { $(element).html(result.text); gadgets.window.adjustHeight(); }, params, 0); } quarta-feira, 27 de outubro de 2010
  • 28. function sendRequest(path, options, element) { var querystring = '?owner_id=' + OWNER_ID + '&viewer_id=' + VIEWER_ID; if (options) { $.each(options, function(index, val) { querystring = querystring + '&' + index + '=' + val; }); }; var url = HOST_WITH_PORT + '/opensocial' + path + querystring; var params = {}; params[gadgets.io.RequestParameters.CONTENT_TYPE] = gadgets.io.ContentType.TEXT; makeCachedRequest(encodeURI(url), function(result) { $(element).html(result.text); gadgets.window.adjustHeight(); }, params, 0); } quarta-feira, 27 de outubro de 2010
  • 29. function sendRequest(path, options, element) { var querystring = '?owner_id=' + OWNER_ID + '&viewer_id=' + VIEWER_ID; if (options) { $.each(options, function(index, val) { querystring = querystring + '&' + index + '=' + val; }); }; var url = HOST_WITH_PORT + '/opensocial' + path + querystring; var params = {}; params[gadgets.io.RequestParameters.CONTENT_TYPE] = gadgets.io.ContentType.TEXT; makeCachedRequest(encodeURI(url), function(result) { $(element).html(result.text); gadgets.window.adjustHeight(); }, params, 0); } quarta-feira, 27 de outubro de 2010
  • 30. function sendRequest(path, options, element) { var querystring = '?owner_id=' + OWNER_ID + '&viewer_id=' + VIEWER_ID; if (options) { $.each(options, function(index, val) { querystring = querystring + '&' + index + '=' + val; }); }; var url = HOST_WITH_PORT + '/opensocial' + path + querystring; var params = {}; params[gadgets.io.RequestParameters.CONTENT_TYPE] = gadgets.io.ContentType.TEXT; makeCachedRequest(encodeURI(url), function(result) { $(element).html(result.text); gadgets.window.adjustHeight(); }, params, 0); } quarta-feira, 27 de outubro de 2010
  • 31. function sendRequest(path, options, element) { var querystring = '?owner_id=' + OWNER_ID + '&viewer_id=' + VIEWER_ID; if (options) { $.each(options, function(index, val) { querystring = querystring + '&' + index + '=' + val; }); }; var url = HOST_WITH_PORT + '/opensocial' + path + querystring; var params = {}; params[gadgets.io.RequestParameters.CONTENT_TYPE] = gadgets.io.ContentType.TEXT; makeCachedRequest(encodeURI(url), function(result) { $(element).html(result.text); gadgets.window.adjustHeight(); }, params, 0); } quarta-feira, 27 de outubro de 2010