Browse files

License and readme.

Signed-off-by: Nick Campbell <ncampbell@siteworx.com>
  • Loading branch information...
1 parent a8f3f77 commit 7f947a6f58708a3247608767c9729803ac615336 @ncb000gt committed Oct 8, 2010
Showing with 35 additions and 12 deletions.
  1. +19 −0 LICENSE
  2. +16 −12 README.md
View
19 LICENSE
@@ -0,0 +1,19 @@
+Copyright (c) 2010 Nicholas Campbell
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
View
28 README.md
@@ -9,22 +9,26 @@ The library maintains tracking of the token so that you don't have to and will p
Usage
============
+`
var ga = require('ga')
,sys = require('sys');
var GA = new ga.GA();
-GA.login();
-var options = {
- 'ids': 'ga:<profileid>',
- 'start-date': '2010-09-01',
- 'end-date': '2010-09-30',
- 'dimensions': 'ga:pagePath',
- 'metrics': 'ga:pageviews',
- 'sort': '-ga:pagePath'
-};
-GA.get(options,);
-sys.debug(JSON.stringify(entries));
-
+GA.login(function(err, token) {
+ var options = {
+ 'ids': 'ga:<profileid>',
+ 'start-date': '2010-09-01',
+ 'end-date': '2010-09-30',
+ 'dimensions': 'ga:pagePath',
+ 'metrics': 'ga:pageviews',
+ 'sort': '-ga:pagePath'
+ };
+ GA.get(options, function(err, entries) {
+ sys.debug(JSON.stringify(entries));
+ });
+ });
+
+`
Rudamentary API
============

0 comments on commit 7f947a6

Please sign in to comment.