Returns issue by id or key.

@link  https://docs.atlassian.com/jira/REST/latest/#d2e1375

@param  integer|string $idOrKey
@param  array          $fields array of fields to be returns (return all by default)

@return \GuzzleHttp\Message\Response
189179
public function get($idOrKey, array $fields = null)
    {
        $parameters = $fields ?
            sprintf(
                '?%s',
                $this->createUriParameters(
                    ['fields' => implode(',', $fields)]
                )
            )
            : ''
        ;

        return $this->getRequest(sprintf('issue/%s%s', $idOrKey, $parameters));
    }
141090
public function getMe($fields)
	{
		$accessTokenObject = $this->helper->getAccessToken($this->callBackUrl);
		if ($accessTokenObject == null) {
			throw new Exception('User not allowed permissions');
		}

		if ($fields == '' || !is_array($fields) || count($fields) == 0) {
			//array is empty
			$fields = [self::ID];//set ID field
		}

		try {
			if (isset($_SESSION['facebook_access_token'])) {
				$this->fb->setDefaultAccessToken($_SESSION['facebook_access_token']);
			} else {
				$_SESSION['facebook_access_token'] = (string) $accessTokenObject;
			}

			$client = $this->fb->getOAuth2Client();
			$accessToken = $client->getLongLivedAccessToken($accessTokenObject->getValue());
			$response = $this->fb->get('/me?fields=' . implode(',', $fields), $accessToken);

			$this->setSocialLoginCookie(self::SOCIAL_NAME);

			return $response->getDecodedBody();

		} catch (Facebook\Exceptions\FacebookResponseException $e) {
			// When Graph returns an error
			throw new Exception($e->getMessage());
		} catch (Facebook\Exceptions\FacebookSDKException $e) {
			// When validation fails or other local issues
			throw new Exception($e->getMessage());
		}
	}
148697
public function hGet($key, $field) {
        return $this->getHandler($this->judge(__FUNCTION__))->hGet($key, $field);
    }
1202258
public function hdel($key, ...$fields)
    {
        $fields = $this->prepareArguments('hdel', ...$fields);
        $this->init();
        return $this->driver->hdel($key, ...$fields);
    }
115975
public function byId($id, $fields = null)
    {
        if (is_null($fields)) {
            $fields = self::$defaultFields;
        }

        return $this->get("employees/{$id}/", ['fields' => implode(',', $fields)]);
    }
1351411
public function getField($key) {
        if (array_key_exists($key, $this->_fields)) {
            return $this->_fields['' . $key . ''];
        }

        return null;
    }
187480
function exists($key, $relField = false) {
		if (!$this->dry() && $key == '_id') return true;
		return $this->mapper->exists($key) ||
			($relField && isset($this->fieldConf[$key]['relType']));
	}
260480
public final function findOne($id, $fields = '*') {
        if (is_array($id)) {
            $where = $id;
        } else {
            $idf   = $this->primaryKey;
            $where = [$idf => $id];
        }
        if (is_array($fields)) {
            $sql = $this->select(...$fields);
        } else {
            $sql = $this->select($fields);
        }
        $sql->where($where)->limit(0, 1);

        return $sql;
    }
113602
public function fields($fields) {
        if (!is_array($fields)) {
            $fields = func_get_args();
        }

        $this->_fields = $fields;

        return $this;
    }
1095919
public function select(array $fields)
    {
        if (empty($fields)) {
            throw new InvalidArgumentException('The field array must not be' .
                ' empty.');
        }

        foreach ($fields as $field) {
            $validationResult = QueryValidator::validateFieldName($field);
            if ($validationResult->isFailed()) {
                throw new InvalidArgumentException('The field array for' .
                    ' building the SELECT clause contains invalid field name.' .
                    ' Validation fail reason: ' .
                    $validationResult->getFailReason());
            }
        }

        // Flipping an array will create a new associative array. The keys of
        // the new associative array make a set of distinct fields.
        $distinctFields = array_flip($fields);
        $this->selectFields = array_keys($distinctFields);
    }
1027553
public function getCurrent(array $fields = []): User
    {
        $response = $this->client->get($this->prepareUrlForKey('get-current-user'), ['_fields' => $fields]);

        return new User($response->getDecodedBody());
    }
657893
protected function getPrimaryField(array $fields)
    {
        foreach ($fields as $field) {
            if ($this->isField($field) && ($field->isPrimary || $field->isAutoIncrement)) {
                return $field;
            }
        }

        return null;
    }
265469
public function checkFieldKey(ServerRequest $request, Response $response): Response
    {
        $queryParams = $request->getQueryParams();
        $fieldKey = $queryParams['key'];
        $table = 'tt_content';
        if (isset($queryParams['table'])) {
            $table = $queryParams['table'];
        }

        $objectManager = GeneralUtility::makeInstance(ObjectManager::class);
        $storageRepository = $objectManager->get(StorageRepository::class);

        // check if fieldKey is available for this table
        $isAvailable = true;
        if ($storageRepository->loadField($table, $fieldKey)) {
            $isAvailable = false;
        }

        return new JsonResponse(['isAvailable' => $isAvailable]);
    }
483177
public function read($model, $ids, $fields = array())
	{
		$params = $this->buildParams(array(
			$model,
			'read',
			$ids,
			$fields
		));

		$response = $this->getClient('object')->call('execute', $params);

		return $response;
	}
49077
public function getField($id, $field)
    {
        if (!in_array($field, static::$fields)) {
            throw new InvalidArgumentException(sprintf('There is no field named %s.', $field));
        }

        $response = $this->get($this->path.'/'.rawurlencode($id).'/'.rawurlencode($field));

        return isset($response['_value']) ? $response['_value'] : $response;
    }
523956
public function hget($key, $field, $default=null) {

        $set = $this->get($key, array());

        return isset($set[$field]) ? $set[$field]:$default;
    }
108689
public function fields(array $fields)
    {
        foreach ($fields as $field => &$value) {
            $value = $value ? 1 : -1;
        }

        $this->fields = array_merge($this->fields, $fields);

        return $this;
    }