| Did you know ... | Search Documentation: |
| Packs (add-ons) for SWI-Prolog |
| Title: | SourceHut GraphQL API client |
|---|---|
| Rating: | Not rated. Create the first rating! |
| Latest version: | 0.1.10 |
| SHA1 sum: | 2da935db586de9b2f94669097ed813e74a05ad81 |
| Author: | Eshel Yaron <eshelshay.yaron@gmail.com> |
| Home page: | https://git.sr.ht/~eshel/sourcehut.pl |
No reviews. Create the first review!.
| Version | SHA1 | #Downloads | URL |
|---|---|---|---|
| 0.1.10 | 2da935db586de9b2f94669097ed813e74a05ad81 | 8 | https://git.sr.ht/~eshel/sourcehut.pl/refs/download/v0.1.10/sourcehut-0.1.10.zip |

SWI-Prolog pack implementing a SourceHut GraphQL API client.
Clone this repository and cd into the root directory:
$ git clone https://git.sr.ht/~eshel/sourcehut.pl $ cd sourcehut.pl
Run pack_install/1 from the root of the repository:
?- pack_install(.).
If you don't already have one, you can generate a new OAuth2 token here https://meta.sr.ht/oauth2
The token can be passed to predicates of this library via the
token(+Token) option on a per call basis, otherwise define the
multifile predicate sourcehut_token/2 to relate the token by default
to a certain SourceHut instance.
?- sourcehut_git_repository("eshel", "sourcehut.pl", _Repo, []), print_term(_Repo, []).
_{ 'HEAD':_{ name:"refs/heads/main",
target:"4f482c45d418fc5b2dbef84279b7bebfc5726dd7"
},
created:"2022-06-04T13:40:01.424243Z",
description:"SWI-Prolog package implementing a SourceHut GraphQL API client.",
id:130804,
name:"sourcehut.pl",
updated:"2022-06-05T09:27:23.376706Z",
visibility:"PUBLIC"
}
true.
?- sourcehut_git_upload_artifact(Repo.id, "v0.1.2", "/tmp/foo/baz.txt", Artifact, []).
Artifact = _{checksum:"...", created:"2022-06-06T08:16:08.044836Z", filename:"baz.txt", id:2644, size:7}.
?- sourcehut_git_delete_artifact(2644, []).
true.
For questions, requests, patches, please write to ~eshel/dev@lists.sr.ht specifying the name of this repository in mail subject, e.g. `[PATCH sourcehut.pl] fix it`.
Pack contains 8 files holding a total of 27.3K bytes.