Comparing version 1.2.2 to 1.2.3
@@ -23,3 +23,3 @@ (function() { | ||
*/ | ||
var color, language, limit, possibleColors, ref, safety, searchPrefix, searchUrl, size; | ||
var color, language, limit, possibleColors, ref, rights, safety, searchPrefix, searchUrl, size; | ||
if (options == null) { | ||
@@ -33,2 +33,3 @@ options = {}; | ||
options.limit = options.limit || 5; | ||
options.rights = options.rights || ""; | ||
switch (options.safe) { | ||
@@ -68,4 +69,5 @@ case true: | ||
limit = options.limit; | ||
rights = options.rights; | ||
searchPrefix = "https://ajax.googleapis.com/ajax/services/search/images?v=1.0"; | ||
searchUrl = searchPrefix + "&q=" + searchTerm + "&imgsz=" + size + "&safe=" + safety + "&hl=" + language + "&imgcolor=" + color + "&rsz=" + limit; | ||
searchUrl = searchPrefix + "&q=" + searchTerm + "&as_rights=" + rights + "&imgsz=" + size + "&safe=" + safety + "&hl=" + language + "&imgcolor=" + color + "&rsz=" + limit; | ||
return request(searchUrl, function(error, response, body) { | ||
@@ -72,0 +74,0 @@ var images, parsed, urls; |
{ | ||
"name": "fotology-x", | ||
"version": "1.2.2", | ||
"version": "1.2.3", | ||
"description": "Simplifies Image Searching", | ||
@@ -5,0 +5,0 @@ "main": "compiled/main.js", |
@@ -95,5 +95,14 @@ Fotology | ||
Using a colour not in here will cause Google's servers to ignore you. | ||
### `limit` | ||
Return between 1 and 8 results | ||
Return between 1 and 8 result | ||
Using a colour not in here will cause Google's servers to ignore you. | ||
### `rights` | ||
Limit search results to given license | ||
* cc_publicdomain | ||
* cc_attribute | ||
* cc_sharealike | ||
* cc_noncommercial | ||
* cc_nonderived |
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
41538
88
108