FAQ
Hi everybody,

I want to use the google feed API on my nodejs app. So far I've loaded the
api using the Nodejs http.request but when I call google.load("feeds", "1")
I get an error :

var http = require('http');

var options = {
   host: 'www.google.com',
   port: 80,
   path: '/jsapi',
   method: 'GET'
};

var req = http.request(options, function(res) {

   res.setEncoding('utf8');

   res.on('data', function (chunk) {
     console.log('BODY: ' + chunk.google.load("feeds", "1"));
   });

   res.on('error', function(e) {
     console.log('problem with request: ' + e.message);
   });

});

--
Job Board: http://jobs.nodejs.org/
Posting guidelines: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
You received this message because you are subscribed to the Google
Groups "nodejs" group.
To post to this group, send email to nodejs@googlegroups.com
To unsubscribe from this group, send email to
nodejs+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/nodejs?hl=en?hl=en

Search Discussions

  • Dominic Tarr at Jul 17, 2012 at 1:44 am
    you need to post the error.
    On Mon, Jul 16, 2012 at 9:55 PM, Florian Shena wrote:
    Hi everybody,

    I want to use the google feed API on my nodejs app. So far I've loaded the
    api using the Nodejs http.request but when I call google.load("feeds", "1")
    I get an error :

    var http = require('http');

    var options = {
    host: 'www.google.com',
    port: 80,
    path: '/jsapi',
    method: 'GET'
    };

    var req = http.request(options, function(res) {

    res.setEncoding('utf8');

    res.on('data', function (chunk) {
    console.log('BODY: ' + chunk.google.load("feeds", "1"));
    });

    res.on('error', function(e) {
    console.log('problem with request: ' + e.message);
    });

    });

    --
    Job Board: http://jobs.nodejs.org/
    Posting guidelines:
    https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
    You received this message because you are subscribed to the Google
    Groups "nodejs" group.
    To post to this group, send email to nodejs@googlegroups.com
    To unsubscribe from this group, send email to
    nodejs+unsubscribe@googlegroups.com
    For more options, visit this group at
    http://groups.google.com/group/nodejs?hl=en?hl=en
    --
    Job Board: http://jobs.nodejs.org/
    Posting guidelines: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
    You received this message because you are subscribed to the Google
    Groups "nodejs" group.
    To post to this group, send email to nodejs@googlegroups.com
    To unsubscribe from this group, send email to
    nodejs+unsubscribe@googlegroups.com
    For more options, visit this group at
    http://groups.google.com/group/nodejs?hl=en?hl=en
  • Marco Rogers at Jul 17, 2012 at 6:27 am
    It looks like you want to use the google jsapi in the server in node. I think you'll have a hard time because that library assumes a browser DOM environment. You can't just use it as is.

    But that's not your only problem here. "chunk.google.load" doesn't make any sense. It sounds like you may need to spend a little time with a few tutorials on what's happening with the node http module. I would point you at a few but it's a pain because I'm on my phone.

    Post some more code or ask some more questions and we'll try I help out.

    :Marco

    --
    Job Board: http://jobs.nodejs.org/
    Posting guidelines: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
    You received this message because you are subscribed to the Google
    Groups "nodejs" group.
    To post to this group, send email to nodejs@googlegroups.com
    To unsubscribe from this group, send email to
    nodejs+unsubscribe@googlegroups.com
    For more options, visit this group at
    http://groups.google.com/group/nodejs?hl=en?hl=en
  • Mattijs Spierings at May 6, 2015 at 1:49 pm
    even better, get rid off the callback, it is not required:

    http://www.google.com/uds/Gfeeds?callback=google.feeds.Feed.RawCompletion&context=0&num=50&hl=en&output=json&q=http%3A%2F%2Fnerdist.libsyn.com%2Frss&key=notsupplied&v=1.0&nocache=1430821526494

    Op maandag 16 juli 2012 19:55:53 UTC+10 schreef Florian Shena:
    Hi everybody,

    I want to use the google feed API on my nodejs app. So far I've loaded the
    api using the Nodejs http.request but when I call google.load("feeds", "1")
    I get an error :

    var http = require('http');

    var options = {
    host: 'www.google.com',
    port: 80,
    path: '/jsapi',
    method: 'GET'
    };

    var req = http.request(options, function(res) {

    res.setEncoding('utf8');

    res.on('data', function (chunk) {
    console.log('BODY: ' + chunk.google.load("feeds", "1"));
    });

    res.on('error', function(e) {
    console.log('problem with request: ' + e.message);
    });

    });
    --
    Job board: http://jobs.nodejs.org/
    New group rules: https://gist.github.com/othiym23/9886289#file-moderation-policy-md
    Old group rules: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
    ---
    You received this message because you are subscribed to the Google Groups "nodejs" group.
    To unsubscribe from this group and stop receiving emails from it, send an email to nodejs+unsubscribe@googlegroups.com.
    To post to this group, send email to nodejs@googlegroups.com.
    To view this discussion on the web visit https://groups.google.com/d/msgid/nodejs/ce06ce47-8535-4e9c-8a73-fb4275a95053%40googlegroups.com.
    For more options, visit https://groups.google.com/d/optout.
  • Mattijs Spierings at May 6, 2015 at 1:49 pm
    Maybe a bit late, but I also needed the Google Feed option in NodeJS
    (Meteor) and I just looked at the outgoing communication by the Feed
    service
    http://www.google.com/uds/Gfeeds?callback=google.feeds.Feed.RawCompletion&context=0&num=50&hl=en&output=json&q=http://www.npr.org/rss/podcast.php?id=510289/rss&v=1.0&nocache=1430821526494

    The q=http://www.npr.org/rss/podcast.php?id=510289/rss is what you want to
    change yourself and probably the num=50. That is your return limit.
    Also change the nocache variable for each request if you dont want caching.

    Good luck!

    Op maandag 16 juli 2012 19:55:53 UTC+10 schreef Florian Shena:
    Hi everybody,

    I want to use the google feed API on my nodejs app. So far I've loaded the
    api using the Nodejs http.request but when I call google.load("feeds", "1")
    I get an error :

    var http = require('http');

    var options = {
    host: 'www.google.com',
    port: 80,
    path: '/jsapi',
    method: 'GET'
    };

    var req = http.request(options, function(res) {

    res.setEncoding('utf8');

    res.on('data', function (chunk) {
    console.log('BODY: ' + chunk.google.load("feeds", "1"));
    });

    res.on('error', function(e) {
    console.log('problem with request: ' + e.message);
    });

    });
    --
    Job board: http://jobs.nodejs.org/
    New group rules: https://gist.github.com/othiym23/9886289#file-moderation-policy-md
    Old group rules: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
    ---
    You received this message because you are subscribed to the Google Groups "nodejs" group.
    To unsubscribe from this group and stop receiving emails from it, send an email to nodejs+unsubscribe@googlegroups.com.
    To post to this group, send email to nodejs@googlegroups.com.
    To view this discussion on the web visit https://groups.google.com/d/msgid/nodejs/c9629149-2382-4d1e-9637-98e3cd0b9c9f%40googlegroups.com.
    For more options, visit https://groups.google.com/d/optout.

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupnodejs @
categoriesnodejs
postedJul 16, '12 at 11:34p
activeMay 6, '15 at 1:49p
posts5
users4
websitenodejs.org
irc#node.js

People

Translate

site design / logo © 2022 Grokbase