Skip to content

transpect/github-api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 

Repository files navigation

github-api

XProc steps that implement the GitHub API

Description

Currently there exist two XProc steps for requesting the GitHub API. They use primarily XProc's p:http-request and rely on the capability of the XProc processor to expose JSON as XML.

Dependencies

The GitHub API responds to HTTP requests with JSON messages. In order, the XProc steps rely on an XProc processor which is able to automatically convert the JSON provided by the API to an XML representation. XML Calabash use a proprietary extension named transparentJSON for this purpose. MorganaXProc is currently not capable of exposing JSON as XML so we suggest to use XML Calabash.

Authentification

The GitHub API limits the number of requests to 60 requests per day. To bypass this limit, you have to generate an access token in your GitHub settings. You can pass this token with the equally named option token.

Steps

tr:list-repos

output ports

result: provides the repositories and their metadata as transparentJSON XML document.

options

token: GitHub access token

username: name of the user or organization

group: Belongs the username to a regular user or to an organization? The following values are permitted: users and orgs

tr:repo-directory-list

output ports

result: provides the directories and files below the submitted contents URL as XML representation.

options

token: GitHub access token

contents-url: GitHub contents URL. If you request a repository, this information is shipped within j:contents_005furl. Here is an example for a contents URL: https://api.github.com/repos/transpect/github-api/contents

About

XProc steps that implement the GitHub API

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages