@@ -59,7 +59,7 @@ def sources(self):
59
59
return r .json ()
60
60
61
61
def bands (self , products = None , limit = None , offset = None , wavelength = None , resolution = None , tags = None ):
62
- """Seach for imagery data bands that you have access to.
62
+ """Search for imagery data bands that you have access to.
63
63
64
64
:param list(str) products: A list of product(s) to return bands for.
65
65
:param int limit: Number of results to return.
@@ -82,6 +82,26 @@ def bands(self, products=None, limit=None, offset=None, wavelength=None, resolut
82
82
r = self .session .post ('/bands/search' , json = kwargs )
83
83
return r .json ()
84
84
85
+ def derived_bands (self , bands = None , limit = None , offset = None ):
86
+ """Search for predefined derived bands that you have access to.
87
+
88
+ :param list(str) bands: A list of source bands that must be part of
89
+ the derived band i.e ["nir"]
90
+ :param int limit: Number of results to return.
91
+ :param int offset: Index to start at when returning results.
92
+ """
93
+ params = ['bands' , 'limit' , 'offset' ]
94
+
95
+ args = locals ()
96
+ kwargs = {
97
+ param : args [param ]
98
+ for param in params
99
+ if args [param ] is not None
100
+ }
101
+
102
+ r = self .session .post ('/bands/derived/search' , json = kwargs )
103
+ return r .json ()
104
+
85
105
def products (self , bands = None , limit = None , offset = None ):
86
106
"""Search products that are available on the platform.
87
107
@@ -119,7 +139,7 @@ def available_products(self):
119
139
120
140
return r .json ()
121
141
122
- def translate (const_id ):
142
+ def translate (self , const_id ):
123
143
"""Translate a deprecated constellation identifier
124
144
into a new-style product identifier.
125
145
@@ -525,3 +545,12 @@ def get_band(self, band_id):
525
545
"""
526
546
r = self .session .get ('/bands/%s' % band_id )
527
547
return r .json ()
548
+
549
+ def get_derived_band (self , derived_band_id ):
550
+ """Get information about a single product.
551
+
552
+ :param str derived_band_id: Derived band identifier.
553
+
554
+ """
555
+ r = self .session .get ('/bands/derived/%s' % derived_band_id )
556
+ return r .json ()
0 commit comments