SlideShare a Scribd company logo
1 of 32
Download to read offline
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

More Related Content

What's hot

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
 

What's hot (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
 

Viewers also liked

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
 

Viewers also liked (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
 

Similar to 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
 
! Modernizr v2.0.6 httpwww.modernizr.com Copyri.docx
!  Modernizr v2.0.6  httpwww.modernizr.com   Copyri.docx!  Modernizr v2.0.6  httpwww.modernizr.com   Copyri.docx
! Modernizr v2.0.6 httpwww.modernizr.com Copyri.docxMARRY7
 
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
 

Similar to 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
 
! Modernizr v2.0.6 httpwww.modernizr.com Copyri.docx
!  Modernizr v2.0.6  httpwww.modernizr.com   Copyri.docx!  Modernizr v2.0.6  httpwww.modernizr.com   Copyri.docx
! Modernizr v2.0.6 httpwww.modernizr.com Copyri.docx
 
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
 

More from 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
 

More from 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
 

Recently uploaded

Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...Neo4j
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Paola De la Torre
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...gurkirankumar98700
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsTop 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsRoshan Dwivedi
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Servicegiselly40
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Igalia
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfEnterprise Knowledge
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...Martijn de Jong
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc
 

Recently uploaded (20)

Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsTop 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 

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