watzon / octokit.cr Goto Github PK
View Code? Open in Web Editor NEWCrystal toolkit for the GitHub API (in development)
Home Page: https://octokit-cr.github.io/octokit.cr/
License: MIT License
Crystal toolkit for the GitHub API (in development)
Home Page: https://octokit-cr.github.io/octokit.cr/
License: MIT License
JSON.mapping is depreciated in recent crystal versions.
In test.cr
:
require "octokit"
# Create a new Octokit Client
github = Octokit.client("curquiza", "password")
# Fetch information about the logged in user
pp github.user
# Fetch information about another user
pp github.user("asterite")
puts "Hello"
shards.yml
:
name: crystal-test
version: 0.1.0
authors:
- your-name-here <your-email-here>
targets:
crystal-test:
main: src/crystal-test.cr
dependencies:
octokit:
github: watzon/octokit.cr
crystal: 0.35.1
license: MIT
Run crystal run test.cr
:
$ crystal run src/crystal-test.cr
In /usr/local/Cellar/crystal/0.35.1_1/src/logger.cr:124:3
124 | def initialize(@io : IO?, @level = Severity::INFO, @formatter = DEFAULT_FORMATTER, @progname = "")
^---------
Warning: Deprecated Logger#initialize. Use `Log` module instead
A total of 1 warnings were found.
Fetching repositories
Unhandled exception: Missing hash key: HTTP::Headers::Key(@name="X-GitHub-OTP") (KeyError)
from ../../../../../usr/local/Cellar/crystal/0.35.1_1/src/hash.cr:1030:9 in '[]'
from ../../../../../usr/local/Cellar/crystal/0.35.1_1/src/http/headers.cr:71:5 in '[]'
from lib/octokit/src/octokit/error.cr:202:34 in 'required_header'
from lib/octokit/src/octokit/error.cr:54:10 in 'error_for_401'
from lib/octokit/src/octokit/error.cr:19:37 in 'from_response'
from lib/octokit/src/octokit/connection.cr:160:9 in 'handle_error'
from lib/octokit/src/octokit/connection.cr:137:7 in 'request'
from lib/octokit/src/octokit/connection.cr:268:18 in 'fetch_page'
from lib/octokit/src/octokit/connection.cr:289:9 in 'fetch_next'
from lib/octokit/src/octokit/connection.cr:245:11 in 'fetch_all'
from lib/octokit/src/octokit.cr:53:9 in '__crystal_main'
from ../../../../../usr/local/Cellar/crystal/0.35.1_1/src/crystal/main.cr:105:5 in 'main_user_code'
from ../../../../../usr/local/Cellar/crystal/0.35.1_1/src/crystal/main.cr:91:7 in 'main'
from ../../../../../usr/local/Cellar/crystal/0.35.1_1/src/crystal/main.cr:114:3 in 'main'
Having tests will make it easier to contribute. Maybe octokit could use the same framework setup as gitlab.cr?
On master
, when doing:
$ shards install
...
$ crystal spec
....
In lib/halite/src/halite/features/logging/json.cr:47:28
47 | @request_time = Time.now
^--
Error: undefined method 'now' for Time.class
Did you mean 'new'?
Hi folks! ๐
I went ahead and moved this project over to https://github.com/GrantBirki/octokit.cr. I kinda just assumed that this project isn't being actively worked on since the last commit was over three years ago. If that is not the case, and you would like me to contribute my changes back here let me know. Or if you would like me to continue working on it on my own, let me know.
I have already published a new version of the project that implements deployments
on-par with octokit.rb
and I plan on continuing out more features in the near future.
Hello!
I would like to do the labels methods.
Any tips or things to know before starting? ๐ I'm not sure to understand how the tests work in this package for example.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.