Code Monkey home page Code Monkey logo

gdata-js's Introduction

gdata-js

Simple Google Data API client for OAuth 2.0 with express + connect.

npm install gdata-js

Usage

gdata-js has two methods:

  • getAccessToken(req, res, callback): Goes through the OAuth 2.0 flow to get an access token
  • getFeed(http_method, path, params, callback): Does a call to the Google Data API to get a feed object.

oauth_token must be contained in the params argument as demonstrated in test.js

Test

Enter your consumer key and secret in test.js

cd test
node test.js

open http://localhost:8553

gdata-js's People

Contributors

ctide avatar garyp avatar glen-nicol avatar lguzzon avatar quartzjer avatar smurthas avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

gdata-js's Issues

Google Apps Marketplace (2LO OAuth) support

Is there any support for two-legged OAuth of the kind used in the Google Apps Marketplace?

I'm working on a contextual gadget and we use Google's Apps Marketplace two-legged OAuth 1.0, and I don't think this library supports that authentication scheme?

Error displays in connect module

Hello,I am getting the following errors when running the test.js file.

Errors:

TypeError: Object function createServer() {
function app(req, res, next){ app.handle(req, res, next); }
merge(app, proto);
merge(app, EventEmitter.prototype);
app.route = '/';
app.stack = [];
return app;
} has no method 'bodyParser'

Can you please help me for resolving this problem.?

Problem accessing document-list api

Hi,
After reading this 'n that, I have made following changes in test.js

var scope = 'https://docs.google.com/feeds/';

& then

app.get('/getStuff', function(req, res) {
    gdataClient.getFeed(scope + 'documents/private/full?v=3', {'max-results':3},
    function(err, feed) {
        res.writeHead(200);
        console.log(err);     // I was just curious to see the error message
        for(var i in feed.feed.entry) {
            res.write(JSON.stringify(feed.feed.entry[i]['title']));
            res.write('\n\n')
        } 
        res.end();
    });
});

I'm getting following error:

[SyntaxError: Unexpected token <]

The same code is working fine for contacts example.
Can you please help me to understand what's going wrong ?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.