@@ -168,7 +168,6 @@ class Box {
168
168
* @param {String } opts.profileServer URL of Profile API server
169
169
* @return {Object } a json object with the profile for the given address
170
170
*/
171
-
172
171
static async getProfile ( address , opts = { } ) {
173
172
const normalizedAddress = address . toLowerCase ( )
174
173
opts = Object . assign ( { useCacheService : true } , opts )
@@ -189,11 +188,35 @@ class Box {
189
188
* @param {String } opts.profileServer URL of Profile API server
190
189
* @return {Object } a json object with each key an address and value the profile
191
190
*/
192
-
193
191
static async getProfiles ( addressArray , opts = { } ) {
194
192
return API . getProfiles ( addressArray , opts )
195
193
}
196
194
195
+ /**
196
+ * Get the public data in a space of a given address with the given name
197
+ *
198
+ * @param {String } address An ethereum address
199
+ * @param {String } name A space name
200
+ * @param {Object } opts Optional parameters
201
+ * @param {String } opts.profileServer URL of Profile API server
202
+ * @return {Object } a json object with the public space data
203
+ */
204
+ static async getSpace ( address , name , opts = { } ) {
205
+ return API . getSpace ( address , name , opts . profileServer )
206
+ }
207
+
208
+ /**
209
+ * Get the names of all spaces a user has
210
+ *
211
+ * @param {String } address An ethereum address
212
+ * @param {Object } opts Optional parameters
213
+ * @param {String } opts.profileServer URL of Profile API server
214
+ * @return {Object } an array with all spaces as strings
215
+ */
216
+ static async listSpaces ( address , opts = { } ) {
217
+ return API . listSpaces ( address , opts . profileServer )
218
+ }
219
+
197
220
static async _getProfileOrbit ( address , opts = { } ) {
198
221
// opts = Object.assign({ iframeStore: true }, opts)
199
222
console . log ( opts . addressServer )
0 commit comments