PHP 클래스 Piwik\Plugins\Marketplace\Api\Service

파일 보기 프로젝트 열기: piwik/piwik 1 사용 예제들

공개 메소드들

메소드 설명
__construct ( $domain )
authenticate ( $accessToken )
download ( string $url, null | string $destinationPath = null, null | integer $timeout = null ) : boolean | string Downloads data from the given URL via a POST request. If a destination path is given, the downloaded data will be stored in the given path and returned otherwise.
fetch ( string $action, array $params ) : mixed Executes the given API action on the Marketplace using the given params and returns the result.
getAccessToken ( ) : null | string Returns the currently set access token
getDomain ( ) : string Get the domain that is used in order to access the Marketplace. Eg http://plugins.piwik.org
getVersion ( ) : string The API version that will be used on the Marketplace.
hasAccessToken ( )

메소드 상세

__construct() 공개 메소드

public __construct ( $domain )

authenticate() 공개 메소드

public authenticate ( $accessToken )

download() 공개 메소드

Make sure to call {@link authenticate()} to download paid plugins.
public download ( string $url, null | string $destinationPath = null, null | integer $timeout = null ) : boolean | string
$url string An absolute URL to the marketplace including domain.
$destinationPath null | string
$timeout null | integer Defaults to 60 seconds see {@link self::HTTP_REQUEST_METHOD}
리턴 boolean | string Returns the downloaded data or true if a destination path was given.

fetch() 공개 메소드

Make sure to call {@link authenticate()} to download paid plugins.
public fetch ( string $action, array $params ) : mixed
$action string eg 'plugins', 'plugins/$pluginName/info', ...
$params array eg array('sort' => 'alpha')
리턴 mixed

getAccessToken() 공개 메소드

Returns the currently set access token
public getAccessToken ( ) : null | string
리턴 null | string

getDomain() 공개 메소드

Get the domain that is used in order to access the Marketplace. Eg http://plugins.piwik.org
public getDomain ( ) : string
리턴 string

getVersion() 공개 메소드

The API version that will be used on the Marketplace.
public getVersion ( ) : string
리턴 string eg 2.0

hasAccessToken() 공개 메소드

public hasAccessToken ( )