The Libraries object has a method for getting information
    about a user's library account
357275
def get_account(netid, timestamp=None):
    
    response = _get_account(netid, timestamp=timestamp)
    return _account_from_json(response)
384843
function _addLibrary(app, item) {
  if (!item.name || item.name === '') {
    try {
      if (typeof item.fn.publicName === 'string') item.name = item.fn.publicName;
    } catch (e) {
    }
  }
  item.name = item.name.trim();
  if (item.name.indexOf('thorin-lib-') === 0) {
    item.name = item.name.substr(11);
  }
  if (typeof app[libraries][item.name] !== 'undefined') {
    throw new Error('Thorin.addLibrary: library ' + item.name + " is already registered. Please use a different name.");
  }
  /* Check if we have a constructor or an already created object. */
  let libType = Object.prototype.toString.call(item.fn);
  let itemObj;
  if (libType === '[object Object]') {
    itemObj = item.fn;
  } else {
    itemObj = new item.fn(app);
  }
  app[libraries][item.name] = itemObj;
}
563348
def _retrieve_info(self, request):
        
        info = _metadata.get_service_account_info(
            request,
            service_account=self._service_account_email)

        self._service_account_email = info['email']
        self._scopes = info['scopes']
429802
def info(self, account_id, resource_id, parent_id):
        
        resource = self.record(account_id, resource_id)
        if resource is None and not parent_id:
            return {'ResourceId': resource_id,
                    'LockStatus': self.STATE_UNLOCKED}
        elif resource is None:
            parent = self.record(account_id, parent_id)
            if parent is None:
                return {'ResourceId': resource_id,
                        'ParentId': parent_id,
                        'LockStatus': self.STATE_UNLOCKED}
            parent['ResourceId'] = resource_id
            parent['ParentId'] = parent_id
            parent['LockType'] = 'parent'
            return parent
        if resource['ResourceId'].startswith('vpc-'):
            return resource
        if resource['ResourceId'].startswith('sg-'):
            return resource
964478
def get_account_details(self, account):
        
        result = self.get_user(account.username)
        if result is None:
            result = {}
        return result
25752
def extract_library_properties_from_selected_row(self):
        
        (model, row) = self.view.get_selection().get_selected()
        tree_item_key = model[row][self.ID_STORAGE_ID]
        library_item = model[row][self.ITEM_STORAGE_ID]
        library_path = model[row][self.LIB_PATH_STORAGE_ID]
        if isinstance(library_item, dict):  # sub-tree
            os_path = model[row][self.OS_PATH_STORAGE_ID]
            return os_path, None, None, tree_item_key  # relevant elements of sub-tree
        assert isinstance(library_item, string_types)
        library_os_path = library_item

        library_name = library_os_path.split(os.path.sep)[-1]

        return library_os_path, library_path, library_name, tree_item_key
445088
def Account(self):
		

		return(clc.v2.Account(alias=self.alias,session=self.session))
499449
def accounts(self) -> AccountsAggregate:
        
        if not self.__accounts_aggregate:
            self.__accounts_aggregate = AccountsAggregate(self.book)
        return self.__accounts_aggregate
279007
def get_account_details(self):
        
        headers = self._manager.get_account_headers()
        acct_prefix = "x-account-"
        meta_prefix = ACCOUNT_META_PREFIX.lower()
        ret = {}
        for hkey, hval in list(headers.items()):
            lowkey = hkey.lower()
            if lowkey.startswith(acct_prefix):
                if not lowkey.startswith(meta_prefix):
                    cleaned = hkey.replace(acct_prefix, "").replace("-", "_")
                    try:
                        # Most values are ints
                        ret[cleaned] = int(hval)
                    except ValueError:
                        ret[cleaned] = hval
        return ret
629501
private LibBinder getTypeLibInfo(IWTypeLib p) throws BindingException {
        LibBinder tli = typeLibs.get(p);
        if(tli==null) {
            typeLibs.put(p,tli=new LibBinder(p));
        }
        return tli;
    }
234983
def _get_collection_for_user(self, collection_id, user):
        """"""
        collection_query = Collection.objects.filter(pk=collection_id)
        if not collection_query.exists():
            raise exceptions.ValidationError('Collection id does not exist')

        collection = collection_query.first()
        if not user.has_perm('add_collection', obj=collection):
            if user.is_authenticated:
                raise exceptions.PermissionDenied()
            else:
                raise exceptions.NotFound()

        return collection
1322673
function access(permission, account, callback) {
  // User #1 has all privileges:
  if (account.uid === 1) {
    callback(null, true);
    return;
  }

  // If permissions is already loaded, use them.
  if (account.permissions) {
    callback(null, account.permissions.indexOf(permission) > -1);
    return;
  }

  role_permissions(account.roles, function (err, permissions) {
    if (err) {
      callback(err);
      return;
    }

    callback(null, permissions.indexOf(permission) > -1);
  });
}
765712
public AccountInfo getAccountInfo() {
        OAuthRequest request = new OAuthRequest(Verb.GET, INFO_URL);
        service.signRequest(accessToken, request);
        String content = check(request.send()).getBody();

        return Json.parse(content, AccountInfo.class);
    }
678224
def user(self, name):
        
        anime_data = requests.get(self.apiusers, params={'u': name, 'status': 'all', 'type': 'anime'},
                                  headers=self.header)

        if anime_data.status_code != 200:
            raise ConnectionError(
                "Anime Data Request failed. Please Open a bug on https://github.com/ccubed/Pymoe and include the following data.\nStatus Code: {}\n\nText:{}".format(
                    anime_data.status_code, anime_data.text))

        manga_data = requests.get(self.apiusers, params={'u': name, 'status': 'all', 'type': 'manga'},
                                  headers=self.header)

        if manga_data.status_code != 200:
            raise ConnectionError(
                "Manga Data Request failed. Please Open a bug on https://github.com/ccubed/Pymoe and include the following data.\nStatus Code: {}\n\nText:{}".format(
                    manga_data.status_code, manga_data.text))

        root = ET.fromstring(anime_data.text)
        uid = root.find('myinfo').find('user_id').text
        uname = root.find('myinfo').find('user_name').text
        anime_object_list = self.parse_anime_data(anime_data.text)
        manga_object_list = self.parse_manga_data(manga_data.text)
        return User(uid=uid,
                    name=uname,
                    anime_list=NT_USER_ANIME(
                        watching=[x for x in anime_object_list['data'] if x.status.user == "Currently Watching"],
                        completed=[x for x in anime_object_list['data'] if x.status.user == "Completed"],
                        held=[x for x in anime_object_list['data'] if x.status.user == "On Hold"],
                        dropped=[x for x in anime_object_list['data'] if x.status.user == "Dropped"],
                        planned=[x for x in anime_object_list['data'] if x.status.user == "Plan to Watch"]
                    ),
                    anime_days=anime_object_list['days'],
                    manga_list=NT_USER_MANGA(
                        reading=[x for x in manga_object_list['data'] if x.status.user == "Currently Reading"],
                        completed=[x for x in manga_object_list['data'] if x.status.user == "Completed"],
                        held=[x for x in manga_object_list['data'] if x.status.user == "On Hold"],
                        dropped=[x for x in manga_object_list['data'] if x.status.user == "Dropped"],
                        planned=[x for x in manga_object_list['data'] if x.status.user == "Plan to Read"]
                    ),
                    manga_days=manga_object_list['days'])
340455
function _getUserDetailsFromFacebook() {
    return BB
        .bind(this)
        .then(function() {
            return facebook.query()
                .get('/me?access_token=' + this.params.access_token)
                .request();
        })
        .then(function(res) {
            this.socialUserInfo = res[1];
        });
}
853685
function _getLibraries() {
			var libraries = Global.versioninfo ? Global.versioninfo.libraries : undefined;
			var formattedLibraries = Object.create(null);

			if (libraries !== undefined) {
				libraries.forEach(function (element, index, array) {
					formattedLibraries[element.name] = element.version;
				});
			}

			return formattedLibraries;
		}
1337160
public LibraryService getLibraryService() {
        if (_libraryService == null) {
            synchronized (CCApi2.class) {
                if (_libraryService == null) {
                    _libraryService = _retrofit.create(LibraryService.class);
                }
            }
        }

        return _libraryService;
    }