Skip to content

Commit

Permalink
Cleanup - remove unused tests, update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
theoephraim committed Oct 15, 2013
1 parent 53c375f commit d0fd8c8
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 50 deletions.
10 changes: 4 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,24 +58,22 @@ The Google Spreadsheets Data API reference and developers guide is a little ambi
If you wish to work with a Google Spreadsheet without authenticating, not only
must the Spreadsheet in question be visible to the web, but it must also have
been explicitly published using the "Share" button in the top right corner of
the Google Spreadsheets GUI.
been explicitly published using "File > Publish to the web" menu option in the google spreadsheets GUI.
Generally, you'll find alot of public spreadsheets may not have had this
treatment, so your best bet is to just authenticate a Google account and
access the API in that manner.
This library uses [googleclientlogin](https://github.com/Ajnasz/GoogleClientLogin) to provide simple authentication. Optionally you can pass in an auth token that you have created already (using googleclientlogin or whatever else)
This library uses [googleclientlogin](https://github.com/Ajnasz/GoogleClientLogin) internally to provide basic authentication. Optionally you can pass in an auth token that you have created already (using googleclientlogin or something else).
## Further possibilities for this library
## Further possibilities & to-do
- Adding cell-based feeds (was in the original package)
- adding query capabilities for list-feeds
- batch requests for cell based updates
- modifying worksheet/spreadsheet properties
- getting list of available spreadsheets for an authenticated user
- add some testing
## Links
Expand Down
9 changes: 5 additions & 4 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -60,9 +60,13 @@ module.exports = function( ss_key, auth_id ){
if ( typeof( opts ) == 'function' ){
cb = opts;
opts = {};
query = null;
// so is query
} else if ( typeof( query ) == 'function' ){
cb = query;
query = null;
}

var query = query;
if ( opts.start ) query["start-index"] = opts.start;
if ( opts.num ) query["max-results"] = opts.num;
if ( opts.orderby ) query["orderby"] = opts.orderby;
Expand Down Expand Up @@ -124,8 +128,6 @@ module.exports = function( ss_key, auth_id ){
url += "?" + querystring.stringify( query_or_data );
}

//console.log( 'making request -- ' + method + ' - ' + url + ' - body: ' + (method == 'POST' || method == 'PUT' ? query_or_data : null) + ' - headers: ');
//console.log(headers);
request( {
url: url,
method: method,
Expand Down Expand Up @@ -221,7 +223,6 @@ var SpreadsheetRow = function( spreadsheet, data, xml ){
}
});
spreadsheet.makeFeedRequest( self['_links']['edit'], 'PUT', data_xml, cb );
//console.log(data_xml);
}
self.del = function( cb ){
spreadsheet.makeFeedRequest( self['_links']['edit'], 'DELETE', null, cb );
Expand Down
9 changes: 1 addition & 8 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"author": "Theo Ephraim <[email protected]> (http://theoephraim.com)",
"name": "google-spreadsheet",
"description": "Google Spreadsheet Data API for Node.js -- has functionality to read, edit, and create rows",
"version": "0.2.2",
"version": "0.2.4",
"keywords": ["google", "spreadsheet", "spreadsheets", "gdata", "api"],
"homepage": "https://github.com/theoephraim/node-google-spreadsheets",
"repository": {
Expand All @@ -17,12 +17,5 @@
"request": ">= 2.0.2",
"xml2js": ">= 0.1.9",
"googleclientlogin": "0.2.x"
},
"devDependencies": {
"mocha": "~1.8.1",
"should": ">1.2.1"
},
"scripts": {
"test": "mocha"
}
}
32 changes: 0 additions & 32 deletions test/test.js

This file was deleted.

0 comments on commit d0fd8c8

Please sign in to comment.