Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/matiaslina/net-github-v4
Github GraphQL api
https://github.com/matiaslina/net-github-v4
Last synced: 12 days ago
JSON representation
Github GraphQL api
- Host: GitHub
- URL: https://github.com/matiaslina/net-github-v4
- Owner: matiaslina
- License: artistic-2.0
- Created: 2020-04-13T00:28:10.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2020-04-13T00:29:02.000Z (over 4 years ago)
- Last Synced: 2024-11-05T22:03:16.401Z (2 months ago)
- Language: Raku
- Size: 5.86 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: Changes
- License: LICENSE
Awesome Lists containing this project
README
NAME
====Net::Github::V4 - Github GraphQL API
SYNOPSIS
========```raku
use Net::Github::V4;my $client = Net::Github::V4.new(
:access-token(%*ENV)
);my $data = $client.query(q:to/IQL/, limit => 2);
query($limit:Int!) {
repository(owner: "rakudo", name: "rakudo") {
issues(last: $limit, states:OPEN) {
edges {
node {
title
url
}
}
}
}
}
IQLfor $data -> $edge {
my $node = $edge;
say "The link for '{$node}' is {$node}"
}
```DESCRIPTION
===========Net::Github::V4 is a library to talk to the v4 of github apis
Methods
=======new
---Defined as:
```raku
method new(:$access-token! --> Net::Github::V4:D)
```Create and returns an instance of `Net::Github::V4`.
query
-----Defined as:
```raku
method query(Str $query, *%variables --> Map)
```Query the Github API with `$query`. `*%variables` are the variables that will be replaced on the `$query` parameter.
rate-limit
----------```raku
method rate-limit(Net::Github::V4:D: --> Int)
```Returns the amount of queries that the server will accept before rate limiting the client.
rate-limit-remaining
--------------------```raku
method rate-limit-remaining(Net::Github::V4:D: --> Int)
```Returns the remaining queries before rate limiting.
rate-limit-reset
----------------```raku
method rate-limit-reset(Net::Github::V4:D: --> DateTime)
```Returns when the rate limit will reset to the `rate-limit` number.
AUTHOR
======Matias Linares
COPYRIGHT AND LICENSE
=====================Copyright 2020 Matias Linares
This library is free software; you can redistribute it and/or modify it under the Artistic License 2.0.