Page 1 of 1

Github.ahk - additional functions for downloading from the github API, as well as version data

Posted: 10 Mar 2023, 13:19
by sashaatx
Quick function list:
Version := GitGetVersion(Username,Repo)
Asset := GitGetAsset(Username,Repo)
ReleaseUrl := GitGetReleaseUrl(Username,Repo)
UpdateDetails := GitGetUpdateDetails(Username,Repo)
msgbox % GitDownload("samfisherirl","github.ahk", Path) ; download the latest release


https://github.com/samfisherirl/github.ahk

There's still object based usage, found in the description of the repo.

Code: Select all

#include json.ahk
#include github.ahk
;using this url as an example
;https://github.com/samfisherirl/github.ahk

path := A_Desktop

Username := "samfisherirl"
Repo := "github.ahk"

Version := GitGetVersion(Username,Repo)
Asset := GitGetAsset(Username,Repo)
ReleaseUrl := GitGetReleaseUrl(Username,Repo)
UpdateDetails := GitGetUpdateDetails(Username,Repo)

message=
(
Below are details about the requested:
    - The current version is %version% 
        (great for apps that need to check for updates)
    - The release file is %asset%
    - The download link is %releaseurl%

    - The details of the update changes are:
        %UpdateDetails%
)

msgbox, %message%


GitDownload("samfisherirl","github.ahk", Path)
msgbox, Download Finished!