-
Notifications
You must be signed in to change notification settings - Fork 4
/
ionImageSearch.config.js
54 lines (45 loc) · 1.51 KB
/
ionImageSearch.config.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
angular.module('ion-image-search').
config(function($provide) {
"use strict";
var searchProviders = {
Google: 'googleSearch',
Bing: 'bingSearch',
Flickr: 'flickrSearch'
};
var imgSizes = {
small: 'small'
};
var fileTypes = {
png: 'png',
gif: 'gif',
jpg: 'jpg'
};
var defaultConfiguration = {
searchProviders: [searchProviders.Google, searchProviders.Bing, searchProviders.Flickr],
imgSize: imgSizes.small,
fileType: fileTypes.jpg,
maxSuccessiveFails: 5
};
var googleParams = {
address: 'https://www.googleapis.com/customsearch/v1?',
key: '',
customSearch: '',
pageSize: 10
};
var bingParams = {
address: 'https://api.datamarket.azure.com/Bing/Search/v1/Image?',
key: '',
auth: 'Basic ',
pageSize: 50
};
var flickrParams = {
address: 'https://api.flickr.com/services/rest/?method=flickr.photos.search&',
key: '',
pageSize: 100
};
$provide.value('ionImageSearchProviders', searchProviders);
$provide.value('ionImageSearchDefaultConfiguration', defaultConfiguration);
$provide.value('googleParams', googleParams);
$provide.value('bingParams', bingParams);
$provide.value('flickrParams', flickrParams);
});