Next: , Up: Notes   [Contents][Index]

4.1 Using Ghub in Personal Scripts

You can of course use ghub-request and its wrapper functions in your personal scripts. Unlike when you use Ghub in a package that you distribute for others to use, you don’t have to explicitly specify a package in personal scripts.

;; This is perfectly acceptable in personal scripts ...
(ghub-get "/user")

;; ... and actually equals to
(ghub-get "/user" nil :auth 'ghub)

;; In packages you have to specify the package using AUTH.
(ghub-get "/user" nil :auth 'some-package)

When the AUTH argument is not specified, then a request is made on behalf of the ghub package itself. Like for any other package you have to create a dedicated token of coures.