*
returns the context for the shop

@param {String} [shopId]
@param [locale]
@return {RestDataSource.Context}
350502
function (shopId, locale) {

                shopId = shopId || this.$.shopId;
                locale = locale || this.$.locale;

                var properties = {
                    shopId: shopId
                };

                if (locale) {
                    properties.locale = locale;
                }

                return this.getContext(properties);
            }
572226
function getBackingStore (id) {
  for (var i=0, len=_backingStores.length; i < len; i++) {
    if (_backingStores[i].id === id) {
      return _backingStores[i].canvas;
    }
  }
  return null;
}
877888
function() {
        console.log(
            `LocalIndexedDBStoreBackend: loading account data...`,
        );
        return Promise.try(() => {
            const txn = this.db.transaction(["accountData"], "readonly");
            const store = txn.objectStore("accountData");
            return selectQuery(store, undefined, (cursor) => {
                return cursor.value;
            }).then((result) => {
                console.log(
                    `LocalIndexedDBStoreBackend: loaded account data`,
                );
                return result;
            });
        });
    }
1276824
def get_cart(base_url, env, cart_name):
    
    base_url = base_url.replace('/pulp/api/', '/pulp/repos')
    url = '%s/%s/carts/%s.json' % (base_url, env, cart_name)

    rsock = urllib2.urlopen(url)
    data = rsock.read()
    rsock.close()

    return load_json_str(data)
1106956
function(req, res) {
            var store = onmStoreDictionary[req.query.store];
            if ((store == null) || !store) {
                res.send(404, "No such store '" + req.query.store + "' on this server.");
            } else {
                var addressHash = req.query.address || store.model.jsonTag;
                var address = undefined;
                try {
                    address = store.model.createAddressFromHashString(addressHash);
                    var namespace = store.openNamespace(address);
                    var data = {};
                    data[address.getModel().jsonTag] = namespace.implementation.dataReference;
                    res.send(200, data);
                } catch (exception) {
                    res.send(412, exception);
                }
            }
        }
313142
def get_context(self, name, value, attrs):
        """"""
        context = super().get_context(
            name, value, attrs)
        context['widget']['attrs']['dp_config'] = json_dumps(self.config)
        return context
655367
function (appid) {
    return this.get('/appdetails', {
      'cc': this.options.country,
      'l': this.options.language,
      'appids': appid
    }).then(function (body) {
      var data = body[appid].data;
      if (typeof data === 'object') {
        data.steam_applink = this.getProductLink(appid);
      }
      return Promise.resolve(data);
    }.bind(this));
  }
340216
def get(*args)
      if args.size == 1
        @server.data_store.list(args)
      else
        @server.data_store.get(args)
      end
    end
680276
function validateStoreName(storeName) {
            if (storeName === undefined) {
                throw new TypeError('Please provide a storename');
            }

            if (typeof(storeName) !== 'string') {
                throw new TypeError('The storename has to be a string');
            }

            var chargedStoreName = storeName = ROOT + storeName + '-';
            return chargedStoreName;
        }
171221
protected function loadStoreId() {
    $query = Drupal::entityQuery('commerce_store');
    $result = $query->execute();

    // There should only ever be one value returned so we naively use the first
    // item in the array. This should generally be safe as this should only run
    // within a Drupal site install context.
    $storeId = NULL;
    if (count($result) > 0) {
      $storeId = reset($result);
    }

    return $storeId;
  }
1360827
def _get(self, name):
        
        return self._stores.get(name, self._resolve(name))
879744
def fetch(locale, name)
      Mongoid::Globalize.fallbacks(locale).each do |fallback|
        value = fetch_stash(fallback, name) || fetch_attribute(fallback, name)
        return value unless fallbacks_for?(value)
      end
      return nil
    end
240479
function get(key, store = getDefaultStore()) {
  let req
  return store[IDBStore]('readonly', store => {
    req = store.get(key)
  }).then(() => req.result)
}
956930
function acquireContext(item, config) {
		if (typeof item === 'string') {
			item = document.getElementById(item);
		} else if (item.length) {
			// Support for array based queries (such as jQuery)
			item = item[0];
		}

		if (item && item.canvas) {
			// Support for any object associated to a canvas (including a context2d)
			item = item.canvas;
		}

		if (item instanceof HTMLCanvasElement) {
			// To prevent canvas fingerprinting, some add-ons undefine the getContext
			// method, for example: https://github.com/kkapsner/CanvasBlocker
			// https://github.com/chartjs/Chart.js/issues/2807
			var context = item.getContext && item.getContext('2d');
			if (context instanceof CanvasRenderingContext2D) {
				initCanvas(item, config);
				return context;
			}
		}

		return null;
	}
448261
function (callback, slug) {
        // returns resource and ID
        var host = apiStorefront
        // replace / with $ on slug to escape URL
        var endpoint = '/' + storeId + '@' + slug.replace(/\//g, '$') + '.json'

        // middleware callback
        var Callback = function (err, body) {
          if (!err) {
            var val = body.GET
            if (val) {
              /*
              {
                "GET": "[resource]@[id]"
              }
              */
              val = val.split('@')
              // overwrite body
              body = {
                'resource': val[0],
                '_id': val[1]
              }

              // success, pass the object
              callback(null, body)
            } else {
              // Redis key not found
              body = {
                'status': 404,
                'error_code': -44,
                'message': 'Page not found, invalid slug or store ID'
              }
              var msg = body.message
              errorHandling(callback, msg, body)
            }
          } else {
            // just pass the error
            callback(err, body)
          }
        }

        runMethod(Callback, endpoint, host)
      }
201712
function(req, res) {
            var store = onmStoreDictionary[req.query.store];
            if ((store == null) || !store) {
                res.send(404, "Data store '" + req.query.store + "' does not exist.");
            } else {
                var addressHash = req.query.address || store.model.jsonTag;
                address = undefined
                try {
                    address = store.model.createAddressFromHashString(addressHash);
                    var namespace = store.openNamespace(address);
            
                    var addresses = [];

                    var processNamespace = function (address_) {
                        addresses.push(address_.getHashString());
                        var model = address_.getModel();
                        if (model.namespaceType === "extensionPoint") {
                            var namespace = store.openNamespace(address_);
                            namespace.visitExtensionPointSubcomponents( function(address_) {
                                processNamespace(address_);
                            });
                        } else {
                            address_.visitChildAddresses( function(address_) {
                                processNamespace(address_);
                            });
                        }
                    };

                    processNamespace(address);
                    var result = {};
                    result[req.query.store] = addresses;
                    res.send(200, result);
                } catch (exception) {
                    res.send(412, exception);
                }
           }
        }
993425
function QuestionsStore(options) {
  debug('initializing from <%s>', __filename);
  Cache.call(this, options);
  this.createStores(this, this.options);
  this.listen(this);
}