Метод | Описание | |
---|---|---|
__construct ( object $type ) | Constructor. | |
construct_download_link ( boolean $rollback = false, boolean $branch_switch = false ) : string | Construct $this->type->download_link using Repository Contents API | |
get_language_pack ( array $headers ) : boolean | Get/process Language Packs. | |
get_remote_branches ( ) : boolean | Create array of branches and download links as array. | |
get_remote_changes ( $changes ) : boolean | Read the remote CHANGES.md file. | |
get_remote_info ( $file ) : boolean | Read the remote file and parse headers. | |
get_remote_readme ( ) : boolean | Read and parse remote readme.txt. | |
get_remote_tag ( ) : boolean | Get remote info for tags. | |
get_repo_meta ( ) : boolean | Read the repository meta from API. | |
set_github_release_asset_header ( $args, string $url = '' ) : mixed | Set HTTP header for following GitHub release assets. |
Метод | Описание | |
---|---|---|
add_endpoints ( $git, $endpoint ) : string | Create GitHub API endpoints. | |
parse_changelog_response ( object $response ) : array | Parse API response and return array with changelog in base64. | |
parse_meta_response ( object $response ) : array | Parse API response and return array of meta variables. | |
parse_tag_response ( object | array $response ) : object | array | Parse API response call and return only array of tag numbers. | |
ratelimit_reset ( $response, $repo ) | Calculate and store time until rate limit reset. |
Метод | Описание | |
---|---|---|
add_access_token_endpoint ( $git, $endpoint ) : string | Add appropriate access token to endpoint. | |
get_github_release_asset_url ( ) : array | boolean | object | stdClass | Return the AWS download link for a GitHub release asset. | |
parse_repos_response ( array $response ) : array | Parse API response and return array of owner's repos. |
protected add_endpoints ( $git, $endpoint ) : string | ||
$git | object | |
$endpoint | string | |
Результат | string | $endpoint |
public get_language_pack ( array $headers ) : boolean | ||
$headers | array | Array of headers of Language Pack. |
Результат | boolean | When invalid response. |
public get_remote_branches ( ) : boolean | ||
Результат | boolean |
public get_remote_changes ( $changes ) : boolean | ||
$changes | ||
Результат | boolean |
public get_remote_info ( $file ) : boolean | ||
$file | ||
Результат | boolean |
public get_remote_readme ( ) : boolean | ||
Результат | boolean |
public get_remote_tag ( ) : boolean | ||
Результат | boolean |
public get_repo_meta ( ) : boolean | ||
Результат | boolean |
protected parse_changelog_response ( object $response ) : array | ||
$response | object | Response from API call. |
Результат | array | $arr Array of changes in base64. |
protected parse_meta_response ( object $response ) : array | ||
$response | object | Response from API call. |
Результат | array | $arr Array of meta variables. |
protected static ratelimit_reset ( $response, $repo ) | ||
$response | ||
$repo |
public set_github_release_asset_header ( $args, string $url = '' ) : mixed | ||
$args | ||
$url | string | |
Результат | mixed | $args |