1
- /*! algoliasearch 3.17 .0 | © 2014, 2015 Algolia SAS | github.com/algolia/algoliasearch-client-js */
1
+ /*! algoliasearch 3.18 .0 | © 2014, 2015 Algolia SAS | github.com/algolia/algoliasearch-client-js */
2
2
( function ( f ) { var g ; if ( typeof window !== 'undefined' ) { g = window } else if ( typeof self !== 'undefined' ) { g = self } g . ALGOLIA_MIGRATION_LAYER = f ( ) } ) ( function ( ) { var define , module , exports ; return ( function e ( t , n , r ) { function s ( o , u ) { if ( ! n [ o ] ) { if ( ! t [ o ] ) { var a = typeof require == "function" && require ; if ( ! u && a ) return a ( o , ! 0 ) ; if ( i ) return i ( o , ! 0 ) ; var f = new Error ( "Cannot find module '" + o + "'" ) ; throw f . code = "MODULE_NOT_FOUND" , f } var l = n [ o ] = { exports :{ } } ; t [ o ] [ 0 ] . call ( l . exports , function ( e ) { var n = t [ o ] [ 1 ] [ e ] ; return s ( n ?n :e ) } , l , l . exports , e , t , n , r ) } return n [ o ] . exports } var i = typeof require == "function" && require ; for ( var o = 0 ; o < r . length ; o ++ ) s ( r [ o ] ) ; return s } ) ( { 1 :[ function ( require , module , exports ) {
3
3
4
4
module . exports = function load ( src , opts , cb ) {
@@ -3447,88 +3447,6 @@ Index.prototype.addObjects = function(objects, callback) {
3447
3447
} ) ;
3448
3448
} ;
3449
3449
3450
- /*
3451
- * Get an object from this index
3452
- *
3453
- * @param objectID the unique identifier of the object to retrieve
3454
- * @param attrs (optional) if set, contains the array of attribute names to retrieve
3455
- * @param callback (optional) the result callback called with two arguments
3456
- * error: null or Error('message')
3457
- * content: the object to retrieve or the error message if a failure occured
3458
- */
3459
- Index . prototype . getObject = function ( objectID , attrs , callback ) {
3460
- var indexObj = this ;
3461
-
3462
- if ( arguments . length === 1 || typeof attrs === 'function' ) {
3463
- callback = attrs ;
3464
- attrs = undefined ;
3465
- }
3466
-
3467
- var params = '' ;
3468
- if ( attrs !== undefined ) {
3469
- params = '?attributes=' ;
3470
- for ( var i = 0 ; i < attrs . length ; ++ i ) {
3471
- if ( i !== 0 ) {
3472
- params += ',' ;
3473
- }
3474
- params += attrs [ i ] ;
3475
- }
3476
- }
3477
-
3478
- return this . as . _jsonRequest ( {
3479
- method : 'GET' ,
3480
- url : '/1/indexes/' + encodeURIComponent ( indexObj . indexName ) + '/' + encodeURIComponent ( objectID ) + params ,
3481
- hostType : 'read' ,
3482
- callback : callback
3483
- } ) ;
3484
- } ;
3485
-
3486
- /*
3487
- * Get several objects from this index
3488
- *
3489
- * @param objectIDs the array of unique identifier of objects to retrieve
3490
- */
3491
- Index . prototype . getObjects = function ( objectIDs , attributesToRetrieve , callback ) {
3492
- var isArray = require ( 10 ) ;
3493
- var map = require ( 29 ) ;
3494
-
3495
- var usage = 'Usage: index.getObjects(arrayOfObjectIDs[, callback])' ;
3496
-
3497
- if ( ! isArray ( objectIDs ) ) {
3498
- throw new Error ( usage ) ;
3499
- }
3500
-
3501
- var indexObj = this ;
3502
-
3503
- if ( arguments . length === 1 || typeof attributesToRetrieve === 'function' ) {
3504
- callback = attributesToRetrieve ;
3505
- attributesToRetrieve = undefined ;
3506
- }
3507
-
3508
- var body = {
3509
- requests : map ( objectIDs , function prepareRequest ( objectID ) {
3510
- var request = {
3511
- indexName : indexObj . indexName ,
3512
- objectID : objectID
3513
- } ;
3514
-
3515
- if ( attributesToRetrieve ) {
3516
- request . attributesToRetrieve = attributesToRetrieve . join ( ',' ) ;
3517
- }
3518
-
3519
- return request ;
3520
- } )
3521
- } ;
3522
-
3523
- return this . as . _jsonRequest ( {
3524
- method : 'POST' ,
3525
- url : '/1/indexes/*/objects' ,
3526
- hostType : 'read' ,
3527
- body : body ,
3528
- callback : callback
3529
- } ) ;
3530
- } ;
3531
-
3532
3450
/*
3533
3451
* Update partially an object (only update attributes passed in argument)
3534
3452
*
@@ -4714,12 +4632,95 @@ IndexCore.prototype._search = function(params, url, callback) {
4714
4632
} ) ;
4715
4633
} ;
4716
4634
4635
+ /*
4636
+ * Get an object from this index
4637
+ *
4638
+ * @param objectID the unique identifier of the object to retrieve
4639
+ * @param attrs (optional) if set, contains the array of attribute names to retrieve
4640
+ * @param callback (optional) the result callback called with two arguments
4641
+ * error: null or Error('message')
4642
+ * content: the object to retrieve or the error message if a failure occured
4643
+ */
4644
+ IndexCore . prototype . getObject = function ( objectID , attrs , callback ) {
4645
+ var indexObj = this ;
4646
+
4647
+ if ( arguments . length === 1 || typeof attrs === 'function' ) {
4648
+ callback = attrs ;
4649
+ attrs = undefined ;
4650
+ }
4651
+
4652
+ var params = '' ;
4653
+ if ( attrs !== undefined ) {
4654
+ params = '?attributes=' ;
4655
+ for ( var i = 0 ; i < attrs . length ; ++ i ) {
4656
+ if ( i !== 0 ) {
4657
+ params += ',' ;
4658
+ }
4659
+ params += attrs [ i ] ;
4660
+ }
4661
+ }
4662
+
4663
+ return this . as . _jsonRequest ( {
4664
+ method : 'GET' ,
4665
+ url : '/1/indexes/' + encodeURIComponent ( indexObj . indexName ) + '/' + encodeURIComponent ( objectID ) + params ,
4666
+ hostType : 'read' ,
4667
+ callback : callback
4668
+ } ) ;
4669
+ } ;
4670
+
4671
+ /*
4672
+ * Get several objects from this index
4673
+ *
4674
+ * @param objectIDs the array of unique identifier of objects to retrieve
4675
+ */
4676
+ IndexCore . prototype . getObjects = function ( objectIDs , attributesToRetrieve , callback ) {
4677
+ var isArray = require ( 10 ) ;
4678
+ var map = require ( 29 ) ;
4679
+
4680
+ var usage = 'Usage: index.getObjects(arrayOfObjectIDs[, callback])' ;
4681
+
4682
+ if ( ! isArray ( objectIDs ) ) {
4683
+ throw new Error ( usage ) ;
4684
+ }
4685
+
4686
+ var indexObj = this ;
4687
+
4688
+ if ( arguments . length === 1 || typeof attributesToRetrieve === 'function' ) {
4689
+ callback = attributesToRetrieve ;
4690
+ attributesToRetrieve = undefined ;
4691
+ }
4692
+
4693
+ var body = {
4694
+ requests : map ( objectIDs , function prepareRequest ( objectID ) {
4695
+ var request = {
4696
+ indexName : indexObj . indexName ,
4697
+ objectID : objectID
4698
+ } ;
4699
+
4700
+ if ( attributesToRetrieve ) {
4701
+ request . attributesToRetrieve = attributesToRetrieve . join ( ',' ) ;
4702
+ }
4703
+
4704
+ return request ;
4705
+ } )
4706
+ } ;
4707
+
4708
+ return this . as . _jsonRequest ( {
4709
+ method : 'POST' ,
4710
+ url : '/1/indexes/*/objects' ,
4711
+ hostType : 'read' ,
4712
+ body : body ,
4713
+ callback : callback
4714
+ } ) ;
4715
+ } ;
4716
+
4717
4717
IndexCore . prototype . as = null ;
4718
4718
IndexCore . prototype . indexName = null ;
4719
4719
IndexCore . prototype . typeAheadArgs = null ;
4720
4720
IndexCore . prototype . typeAheadValueOption = null ;
4721
4721
4722
- } , { "23" :23 , "30" :30 } ] , 17 :[ function ( require , module , exports ) {
4722
+ } , { "10" :10 , "23" :23 , "29" :29 , "30" :30 } ] , 17 :[ function ( require , module , exports ) {
4723
+ ( function ( process ) {
4723
4724
'use strict' ;
4724
4725
4725
4726
// This is the AngularJS Algolia Search module
@@ -4739,7 +4740,7 @@ var places = require(31);
4739
4740
// expose original algoliasearch fn in window
4740
4741
window . algoliasearch = require ( 18 ) ;
4741
4742
4742
- if ( "production" === 'development ' ) {
4743
+ if ( process . env . NODE_ENV === 'debug ' ) {
4743
4744
require ( 3 ) . enable ( 'algoliasearch*' ) ;
4744
4745
}
4745
4746
@@ -4925,7 +4926,8 @@ window.angular.module('algoliasearch', [])
4925
4926
} ;
4926
4927
} ] ) ;
4927
4928
4928
- } , { "12" :12 , "18" :18 , "20" :20 , "21" :21 , "22" :22 , "24" :24 , "27" :27 , "3" :3 , "31" :31 , "32" :32 , "7" :7 , "9" :9 } ] , 18 :[ function ( require , module , exports ) {
4929
+ } ) . call ( this , require ( 2 ) )
4930
+ } , { "12" :12 , "18" :18 , "2" :2 , "20" :20 , "21" :21 , "22" :22 , "24" :24 , "27" :27 , "3" :3 , "31" :31 , "32" :32 , "7" :7 , "9" :9 } ] , 18 :[ function ( require , module , exports ) {
4929
4931
'use strict' ;
4930
4932
4931
4933
var AlgoliaSearch = require ( 12 ) ;
@@ -4934,6 +4936,7 @@ var createAlgoliasearch = require(19);
4934
4936
module . exports = createAlgoliasearch ( AlgoliaSearch ) ;
4935
4937
4936
4938
} , { "12" :12 , "19" :19 } ] , 19 :[ function ( require , module , exports ) {
4939
+ ( function ( process ) {
4937
4940
'use strict' ;
4938
4941
4939
4942
var global = require ( 8 ) ;
@@ -4950,7 +4953,7 @@ module.exports = function createAlgoliasearch(AlgoliaSearch, uaSuffix) {
4950
4953
var places = require ( 31 ) ;
4951
4954
uaSuffix = uaSuffix || '' ;
4952
4955
4953
- if ( "production" === 'development ' ) {
4956
+ if ( process . env . NODE_ENV === 'debug ' ) {
4954
4957
require ( 3 ) . enable ( 'algoliasearch*' ) ;
4955
4958
}
4956
4959
@@ -5154,7 +5157,8 @@ module.exports = function createAlgoliasearch(AlgoliaSearch, uaSuffix) {
5154
5157
return algoliasearch ;
5155
5158
} ;
5156
5159
5157
- } , { "20" :20 , "21" :21 , "22" :22 , "24" :24 , "27" :27 , "3" :3 , "31" :31 , "32" :32 , "5" :5 , "8" :8 , "9" :9 } ] , 20 :[ function ( require , module , exports ) {
5160
+ } ) . call ( this , require ( 2 ) )
5161
+ } , { "2" :2 , "20" :20 , "21" :21 , "22" :22 , "24" :24 , "27" :27 , "3" :3 , "31" :31 , "32" :32 , "5" :5 , "8" :8 , "9" :9 } ] , 20 :[ function ( require , module , exports ) {
5158
5162
'use strict' ;
5159
5163
5160
5164
module . exports = getDocumentProtocol ;
@@ -5549,6 +5553,6 @@ function createPlacesClient(algoliasearch) {
5549
5553
} , { "23" :23 , "24" :24 } ] , 32 :[ function ( require , module , exports ) {
5550
5554
'use strict' ;
5551
5555
5552
- module . exports = '3.17 .0' ;
5556
+ module . exports = '3.18 .0' ;
5553
5557
5554
5558
} , { } ] } , { } , [ 17 ] ) ;
0 commit comments