PHP 클래스 Larabros\Elogram\Client

저자: Hassan Khan ([email protected])
파일 보기 프로젝트 열기: larabros/elogram 1 사용 예제들

보호된 프로퍼티들

프로퍼티 타입 설명
$container League\Container\ContainerInterface The application IoC container.

공개 메소드들

메소드 설명
__construct ( string $clientId, string $clientSecret, string | null $accessToken = null, string $redirectUrl = '', array $options = [] ) Create an instance of :php:class:Client.
comments ( ) : CommentsRepository Returns the current instance of :php:class:CommentsRepository.
getAccessToken ( string $code, string $grant = 'authorization_code' ) : League\OAuth2\Client\Token\AccessToken Sets and returns the access token.
getLoginUrl ( array $options = [] ) : string Gets the login URL.
likes ( ) : LikesRepository Returns the current instance of :php:class:LikesRepository.
locations ( ) : LocationsRepository Returns the current instance of :php:class:LocationsRepository.
media ( ) : MediaRepository Returns the current instance of :php:class:MediaRepository.
paginate ( Response $response, integer | null $limit = null ) : Response Paginates a :php:class:Response.
request ( string $method, string $uri, array $parameters = [] ) : Response Sends a request.
secureRequests ( boolean $enable = true ) : void Enables or disables secure requests by adding or removing SecureRequestMiddleware.
setAccessToken ( League\OAuth2\Client\Token\AccessToken $token ) : void Sets an access token and adds it to AuthMiddleware so the application can make authenticated requests.
tags ( ) : TagsRepository Returns the current instance of :php:class:TagsRepository.
users ( ) : UsersRepository Returns the current instance of :php:class:UsersRepository.

보호된 메소드들

메소드 설명
buildContainer ( array $options ) : League\Container\ContainerInterface Takes the constructor parameters and uses them to instantiate and build a Container object.

메소드 상세

__construct() 공개 메소드

Create an instance of :php:class:Client.
public __construct ( string $clientId, string $clientSecret, string | null $accessToken = null, string $redirectUrl = '', array $options = [] )
$clientId string
$clientSecret string
$accessToken string | null
$redirectUrl string
$options array

buildContainer() 보호된 메소드

Takes the constructor parameters and uses them to instantiate and build a Container object.
protected buildContainer ( array $options ) : League\Container\ContainerInterface
$options array
리턴 League\Container\ContainerInterface

comments() 공개 메소드

Returns the current instance of :php:class:CommentsRepository.
public comments ( ) : CommentsRepository
리턴 Larabros\Elogram\Repositories\CommentsRepository

getAccessToken() 공개 메소드

Sets and returns the access token.
또한 보기: Elogram\Helpers\RedirectLoginHelper::getAccessToken()
public getAccessToken ( string $code, string $grant = 'authorization_code' ) : League\OAuth2\Client\Token\AccessToken
$code string
$grant string
리턴 League\OAuth2\Client\Token\AccessToken

getLoginUrl() 공개 메소드

Gets the login URL.
또한 보기: Elogram\Helpers\RedirectLoginHelper::getLoginUrl()
public getLoginUrl ( array $options = [] ) : string
$options array
리턴 string

likes() 공개 메소드

Returns the current instance of :php:class:LikesRepository.
public likes ( ) : LikesRepository
리턴 Larabros\Elogram\Repositories\LikesRepository

locations() 공개 메소드

Returns the current instance of :php:class:LocationsRepository.
public locations ( ) : LocationsRepository
리턴 Larabros\Elogram\Repositories\LocationsRepository

media() 공개 메소드

Returns the current instance of :php:class:MediaRepository.
public media ( ) : MediaRepository
리턴 Larabros\Elogram\Repositories\MediaRepository

paginate() 공개 메소드

Paginates a :php:class:Response.
또한 보기: Elogram\Http\Clients\AdapterInterface::paginate()
public paginate ( Response $response, integer | null $limit = null ) : Response
$response Larabros\Elogram\Http\Response
$limit integer | null
리턴 Larabros\Elogram\Http\Response

request() 공개 메소드

Sends a request.
또한 보기: Elogram\Http\Clients\AdapterInterface::request()
public request ( string $method, string $uri, array $parameters = [] ) : Response
$method string
$uri string
$parameters array
리턴 Larabros\Elogram\Http\Response

secureRequests() 공개 메소드

Enables or disables secure requests by adding or removing SecureRequestMiddleware.
public secureRequests ( boolean $enable = true ) : void
$enable boolean
리턴 void

setAccessToken() 공개 메소드

Sets an access token and adds it to AuthMiddleware so the application can make authenticated requests.
public setAccessToken ( League\OAuth2\Client\Token\AccessToken $token ) : void
$token League\OAuth2\Client\Token\AccessToken
리턴 void

tags() 공개 메소드

Returns the current instance of :php:class:TagsRepository.
public tags ( ) : TagsRepository
리턴 Larabros\Elogram\Repositories\TagsRepository

users() 공개 메소드

Returns the current instance of :php:class:UsersRepository.
public users ( ) : UsersRepository
리턴 Larabros\Elogram\Repositories\UsersRepository

프로퍼티 상세

$container 보호되어 있는 프로퍼티

The application IoC container.
protected ContainerInterface,League\Container $container
리턴 League\Container\ContainerInterface