Comparing version 0.0.5 to 0.0.6
{ | ||
"name": "calendarth", | ||
"version": "0.0.5", | ||
"version": "0.0.6", | ||
"main": "./build/calendarth.min.js", | ||
@@ -5,0 +5,0 @@ "ignore": [ |
{ | ||
"name": "calendarth", | ||
"version": "0.0.5", | ||
"version": "0.0.6", | ||
"description": "Fetch a public Google Calendar using AJAX", | ||
@@ -5,0 +5,0 @@ "main": "./src/", |
@@ -55,3 +55,3 @@ # Calendarth | ||
#### calendarth.getEventLink(eventItem) | ||
#### calendarth.getEventUrl(eventItem) | ||
@@ -67,3 +67,3 @@ Will return a url that can be used to add the event to a user's Google Calendar. | ||
var addEventToCal = cal.getEventLink(eventItem); | ||
var addEventToCal = cal.getEventUrl(eventItem); | ||
console.log(addEventToCal); | ||
@@ -75,4 +75,4 @@ }); | ||
- **v0.0.5**, *12 Apr 2014* | ||
- Add getEventLink() feature. | ||
- **v0.0.6**, *12 Apr 2014* | ||
- Add getEventUrl() feature. | ||
- **v0.0.3**, *9 Apr 2014* | ||
@@ -79,0 +79,0 @@ - Published to NPM. |
@@ -66,16 +66,9 @@ /* | ||
*/ | ||
Calendarth.prototype.getEventLink = function(eventItem) { | ||
var out = 'http://www.google.com/calendar/event?action=TEMPLATE&text='; | ||
out += encodeURIComponent(eventItem.summary); | ||
out += '&dates='; | ||
out += encodeURIComponent(eventItem.start.dateTime ? | ||
eventItem.start.dateTime : eventItem.start.date); | ||
out += '/'; | ||
out += encodeURIComponent(eventItem.end.dateTime ? | ||
eventItem.end.dateTime : eventItem.end.date); | ||
out += '&details='; | ||
out += encodeURIComponent(eventItem.description); | ||
out += '&location='; | ||
out += encodeURIComponent(eventItem.location); | ||
out += '&trp=false&sprop=name:'; | ||
Calendarth.prototype.getEventUrl = function(eventItem) { | ||
var linkParts = eventItem.htmlLink.split('='); | ||
var out = 'http://www.google.com/calendar/event?action=TEMPLATE&tmeid='; | ||
out += linkParts[1]; | ||
out += '&tmsrc='; | ||
out += encodeURIComponent(eventItem.organizer.email); | ||
return out; | ||
}; |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
1931945
37970